[FFmpeg-cvslog] avutil/softfloat: Fix av_gt_sf() with large exponents try #2

Michael Niedermayer git at videolan.org
Thu Nov 12 00:24:09 CET 2015


ffmpeg | branch: release/2.8 | Michael Niedermayer <michael at niedermayer.cc> | Sun Nov  8 15:03:28 2015 +0100| [6581e40e1a566d8df2908a12028db6e55f97541d] | committer: Michael Niedermayer

avutil/softfloat: Fix av_gt_sf() with large exponents try #2

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 05b05a7a841c0c67cce319941104d6f11b9ecd84)

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavutil/softfloat.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavutil/softfloat.h b/libavutil/softfloat.h
index ae11bdb..651bbf4 100644
--- a/libavutil/softfloat.h
+++ b/libavutil/softfloat.h
@@ -128,10 +128,10 @@ static inline av_const int av_cmp_sf(SoftFloat a, SoftFloat b){
 static inline av_const int av_gt_sf(SoftFloat a, SoftFloat b)
 {
     int t= a.exp - b.exp;
-    if      (t <-31) return 0;
+    if      (t <-31) return 0                >  b.mant      ;
     else if (t <  0) return (a.mant >> (-t)) >  b.mant      ;
     else if (t < 32) return  a.mant          > (b.mant >> t);
-    else             return 1;
+    else             return  a.mant          >  0           ;
 }
 
 static inline av_const SoftFloat av_add_sf(SoftFloat a, SoftFloat b){



More information about the ffmpeg-cvslog mailing list