get rid of an if() 1 cpu cycle faster.
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 19 Feb 2010 03:10:26 +0000 (03:10 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 19 Feb 2010 03:10:26 +0000 (03:10 +0000)
Originally committed as revision 21889 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/h264_cabac.c

index 641827d..8d471b2 100644 (file)
@@ -937,8 +937,7 @@ static int decode_cabac_mb_mvd( H264Context *h, int list, int n, int l ) {
             }
         }
         while( k-- ) {
-            if( get_cabac_bypass( &h->cabac ) )
-                mvd += 1 << k;
+            mvd += get_cabac_bypass( &h->cabac )<<k;
         }
     }
     return get_cabac_bypass_sign( &h->cabac, -mvd );