mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-25 04:30:02 +00:00
avutil/softfloat: Fix exponent underflow in av_mul_sf()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
4135a2bfd6
commit
a1e3303fc0
@ -98,7 +98,10 @@ static inline av_const SoftFloat av_mul_sf(SoftFloat a, SoftFloat b){
|
||||
a.exp += b.exp;
|
||||
av_assert2((int32_t)((a.mant * (int64_t)b.mant) >> ONE_BITS) == (a.mant * (int64_t)b.mant) >> ONE_BITS);
|
||||
a.mant = (a.mant * (int64_t)b.mant) >> ONE_BITS;
|
||||
return av_normalize1_sf((SoftFloat){a.mant, a.exp - 1});
|
||||
a = av_normalize1_sf((SoftFloat){a.mant, a.exp - 1});
|
||||
if (!a.mant || a.exp < MIN_EXP)
|
||||
return FLOAT_0;
|
||||
return a;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user