avcodec/dcadec: use a constant instead of assuming every compiler can optimize pow...
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 23 May 2014 20:15:57 +0000 (22:15 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 23 May 2014 20:19:11 +0000 (22:19 +0200)
Idea-by: nevcairiel and wm4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/dcadec.c

index 684294e..c072044 100644 (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;
 }
 
 /**