dcadec: replace ldexpf with a multiplication by a constant
authorNiels Möller <nisse@lysator.liu.se>
Wed, 18 Jun 2014 06:23:15 +0000 (08:23 +0200)
committerAnton Khirnov <anton@khirnov.net>
Wed, 18 Jun 2014 06:23:15 +0000 (08:23 +0200)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavcodec/dcadec.c

index 0727857..e988e94 100644 (file)
@@ -1699,7 +1699,7 @@ static float dca_dmix_code(unsigned code)
 {
     int sign = (code >> 8) - 1;
     code &= 0xff;
-    return ldexpf((dca_dmixtable[code] ^ sign) - sign, -15);
+    return ((dca_dmixtable[code] ^ sign) - sign) * (1.0 / (1U << 15));
 }
 
 /**