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

Idea-by: nevcairiel and wm4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-05-23 22:15:57 +02:00
parent 6da06ef6bb
commit 9ccb5455ca

View File

@ -2107,7 +2107,7 @@ static float dca_dmix_code(unsigned code)
{
int sign = (code >> 8) - 1;
code &= 0xff;
return ((dca_dmixtable[code] ^ sign) - sign) * pow(2, -15);
return ((dca_dmixtable[code] ^ sign) - sign) * 0x1p-15;
}
/**