mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-24 03:39:45 +00: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