[SCM] libav/experimental: dcadec: replace ldexpf with a multiplication by a constant

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Aug 10 16:03:29 UTC 2014


The following commit has been merged in the experimental branch:
commit f2ce63246f5c934429f9cb857a794e07624d7912
Author: Niels Möller <nisse at lysator.liu.se>
Date:   Wed Jun 18 08:23:15 2014 +0200

    dcadec: replace ldexpf with a multiplication by a constant
    
    Signed-off-by: Anton Khirnov <anton at khirnov.net>

diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c
index 0727857..e988e94 100644
--- a/libavcodec/dcadec.c
+++ b/libavcodec/dcadec.c
@@ -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));
 }
 
 /**

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list