Commit 05b05a7a authored by Michael Niedermayer's avatar Michael Niedermayer

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

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 791ea23e
...@@ -128,10 +128,10 @@ static inline av_const int av_cmp_sf(SoftFloat a, SoftFloat b){ ...@@ -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) static inline av_const int av_gt_sf(SoftFloat a, SoftFloat b)
{ {
int t= a.exp - b.exp; 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 < 0) return (a.mant >> (-t)) > b.mant ;
else if (t < 32) return a.mant > (b.mant >> t); 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){ static inline av_const SoftFloat av_add_sf(SoftFloat a, SoftFloat b){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment