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:
parent
9340ced47b
commit
6da06ef6bb
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user