Message ID | 20240612015218.10103-1-jamrial@gmail.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel] avcodec/vorbisdec: don't use double intermediate in vorbisfloat2float | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c index 700c6c8918..218e855f7a 100644 --- a/libavcodec/vorbisdec.c +++ b/libavcodec/vorbisdec.c @@ -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); }
Signed-off-by: James Almer <jamrial@gmail.com> --- libavcodec/vorbisdec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)