Commit 9ccb5455 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/dcadec: use a constant instead of assuming every compiler can optimize pow(2,-15)

Idea-by: nevcairiel and wm4
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 6da06ef6
...@@ -2107,7 +2107,7 @@ static float dca_dmix_code(unsigned code) ...@@ -2107,7 +2107,7 @@ static float dca_dmix_code(unsigned code)
{ {
int sign = (code >> 8) - 1; int sign = (code >> 8) - 1;
code &= 0xff; code &= 0xff;
return ((dca_dmixtable[code] ^ sign) - sign) * pow(2, -15); return ((dca_dmixtable[code] ^ sign) - sign) * 0x1p-15;
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment