avcodec/vorbisdec: don't use double intermediate in vorbisfloat2float
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
1b9af306da
commit
08383443ff
@ -181,11 +181,11 @@ static const char idx_err_str[] = "Index value %d out of range (0 - %d) for %s a
|
||||
|
||||
static float vorbisfloat2float(unsigned val)
|
||||
{
|
||||
double mant = val & 0x1fffff;
|
||||
long exp = (val & 0x7fe00000L) >> 21;
|
||||
float mant = val & 0x1fffff;
|
||||
int exp = (val & 0x7fe00000) >> 21;
|
||||
if (val & 0x80000000)
|
||||
mant = -mant;
|
||||
return ldexp(mant, exp - 20 - 768);
|
||||
return ldexpf(mant, exp - 20 - 768);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user