Commit 6da06ef6 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/dcadec: make dca_dmix_code() 650% faster

This effectively replaces the ldexpf() function call by a multiplication
with a constant.
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 9340ced4
......@@ -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);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment