avutil/softfloat: Fix thresholds in av_normalize_sf()
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 5 Jun 2015 10:56:12 +0000 (12:56 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 5 Jun 2015 10:56:12 +0000 (12:56 +0200)
Found-by: Nedeljko Babic <Nedeljko.Babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavutil/softfloat.h

index 6aecdf3..7938c20 100644 (file)
@@ -39,7 +39,7 @@ typedef struct SoftFloat{
 static av_const SoftFloat av_normalize_sf(SoftFloat a){
     if(a.mant){
 #if 1
-        while((a.mant + 0x20000000U)<0x40000000U){
+        while((a.mant + 0x1FFFFFFFU)<0x3FFFFFFFU){
             a.mant += a.mant;
             a.exp  -= 1;
         }