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>
pull/72/head
Michael Niedermayer 11 years ago
parent 6da06ef6bb
commit 9ccb5455ca
  1. 2
      libavcodec/dcadec.c

@ -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;
}
/**

Loading…
Cancel
Save