forked from FFmpeg/FFmpeg
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
1 changed files with 3 additions and 3 deletions
|
@ -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)
|
static float vorbisfloat2float(unsigned val)
|
||||||
{
|
{
|
||||||
double mant = val & 0x1fffff;
|
float mant = val & 0x1fffff;
|
||||||
long exp = (val & 0x7fe00000L) >> 21;
|
int exp = (val & 0x7fe00000) >> 21;
|
||||||
if (val & 0x80000000)
|
if (val & 0x80000000)
|
||||||
mant = -mant;
|
mant = -mant;
|
||||||
return ldexp(mant, exp - 20 - 768);
|
return ldexpf(mant, exp - 20 - 768);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue