Use get_cabac_bypass_sign instead of an if/else.
authorAlexander Strange <astrange@ithinksw.com>
Wed, 2 Jul 2008 22:25:17 +0000 (22:25 +0000)
committerAlexander Strange <astrange@ithinksw.com>
Wed, 2 Jul 2008 22:25:17 +0000 (22:25 +0000)
Originally committed as revision 14054 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/h264.c

index 561d68e..26dcd90 100644 (file)
@@ -5549,11 +5549,9 @@ static av_always_inline void decode_cabac_residual_internal( H264Context *h, DCT
             }
 
             if( is_dc ) {
             }
 
             if( is_dc ) {
-                if( get_cabac_bypass( CC ) ) block[j] = -coeff_abs;
-                else                                block[j] =  coeff_abs;
+                block[j] = get_cabac_bypass_sign( CC, -coeff_abs );
             }else{
             }else{
-                if( get_cabac_bypass( CC ) ) block[j] = (-coeff_abs * qmul[j] + 32) >> 6;
-                else                                block[j] = ( coeff_abs * qmul[j] + 32) >> 6;
+                block[j] = (get_cabac_bypass_sign( CC, -coeff_abs ) * qmul[j] + 32) >> 6;
             }
         }
     }
             }
         }
     }