1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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>
This commit is contained in:
Michael Niedermayer 2014-05-23 21:59:04 +02:00
parent 9340ced47b
commit 6da06ef6bb

View File

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