ffmpeg | branch: master | James Almer <jamr...@gmail.com> | Tue Jun 11 22:50:50 
2024 -0300| [08383443ff695816297f94775ab793159ff38422] | committer: James Almer

avcodec/vorbisdec: don't use double intermediate in vorbisfloat2float

Signed-off-by: James Almer <jamr...@gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=08383443ff695816297f94775ab793159ff38422
---

 libavcodec/vorbisdec.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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);
 }
 
 

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to