diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-05-23 21:59:04 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-05-23 22:08:41 +0200 |
commit | 6da06ef6bbc01b713f67ffb94e7697eb2393ebe4 (patch) | |
tree | 08381598641671a378f2c6c0fab2fa142d3c3d7e /libavcodec/dcadec.c | |
parent | 9340ced47b5b13991619d56c2be86a6604e63f5b (diff) | |
download | ffmpeg-6da06ef6bbc01b713f67ffb94e7697eb2393ebe4.tar.gz |
avcodec/dcadec: make dca_dmix_code() 650% faster
This effectively replaces the ldexpf() function call by a multiplication
with a constant.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dcadec.c')
-rw-r--r-- | libavcodec/dcadec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c index 868e3b67b9..684294e8bf 100644 --- a/libavcodec/dcadec.c +++ b/libavcodec/dcadec.c @@ -2107,7 +2107,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) * pow(2, -15); } /** |