]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/h264_cabac.c
CMOV-ify vp56 arithcoder
[ffmpeg] / libavcodec / h264_cabac.c
index b0c2e3ae51ddcfe371c213f392a2e52c6eec3d8a..485837879d39f0f4bc249c885e2d91f2c03397ec 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 /**
- * @file libavcodec/h264_cabac.c
+ * @file
  * H.264 / AVC / MPEG4 part10 cabac decoding.
  * @author Michael Niedermayer <michaelni@gmx.at>
  */
@@ -827,13 +827,13 @@ static int decode_cabac_mb_cbp_luma( H264Context *h) {
     cbp_b = h->top_cbp;
 
     ctx = !(cbp_a & 0x02) + 2 * !(cbp_b & 0x04);
-    cbp |= get_cabac_noinline(&h->cabac, &h->cabac_state[73 + ctx]);
+    cbp += get_cabac_noinline(&h->cabac, &h->cabac_state[73 + ctx]);
     ctx = !(cbp   & 0x01) + 2 * !(cbp_b & 0x08);
-    cbp |= get_cabac_noinline(&h->cabac, &h->cabac_state[73 + ctx]) << 1;
+    cbp += get_cabac_noinline(&h->cabac, &h->cabac_state[73 + ctx]) << 1;
     ctx = !(cbp_a & 0x08) + 2 * !(cbp   & 0x01);
-    cbp |= get_cabac_noinline(&h->cabac, &h->cabac_state[73 + ctx]) << 2;
+    cbp += get_cabac_noinline(&h->cabac, &h->cabac_state[73 + ctx]) << 2;
     ctx = !(cbp   & 0x04) + 2 * !(cbp   & 0x02);
-    cbp |= get_cabac_noinline(&h->cabac, &h->cabac_state[73 + ctx]) << 3;
+    cbp += get_cabac_noinline(&h->cabac, &h->cabac_state[73 + ctx]) << 3;
     return cbp;
 }
 static int decode_cabac_mb_cbp_chroma( H264Context *h) {
@@ -1181,7 +1181,7 @@ static void decode_cabac_residual_nondc( H264Context *h, DCTELEM *block, int cat
 
 /**
  * decodes a macroblock
- * @returns 0 if OK, AC_ERROR / DC_ERROR / MV_ERROR if an error is noticed
+ * @return 0 if OK, AC_ERROR / DC_ERROR / MV_ERROR if an error is noticed
  */
 int ff_h264_decode_mb_cabac(H264Context *h) {
     MpegEncContext * const s = &h->s;
@@ -1244,9 +1244,9 @@ int ff_h264_decode_mb_cabac(H264Context *h) {
         }else{
             int bits;
             bits = get_cabac_noinline( &h->cabac, &h->cabac_state[27+4] ) << 3;
-            bits|= get_cabac_noinline( &h->cabac, &h->cabac_state[27+5] ) << 2;
-            bits|= get_cabac_noinline( &h->cabac, &h->cabac_state[27+5] ) << 1;
-            bits|= get_cabac_noinline( &h->cabac, &h->cabac_state[27+5] );
+            bits+= get_cabac_noinline( &h->cabac, &h->cabac_state[27+5] ) << 2;
+            bits+= get_cabac_noinline( &h->cabac, &h->cabac_state[27+5] ) << 1;
+            bits+= get_cabac_noinline( &h->cabac, &h->cabac_state[27+5] );
             if( bits < 8 ){
                 mb_type= bits + 3; /* B_Bi_16x16 through B_L1_L0_16x8 */
             }else if( bits == 13 ){
@@ -1257,7 +1257,7 @@ int ff_h264_decode_mb_cabac(H264Context *h) {
             }else if( bits == 15 ){
                 mb_type= 22; /* B_8x8 */
             }else{
-                bits= ( bits<<1 ) | get_cabac_noinline( &h->cabac, &h->cabac_state[27+5] );
+                bits= ( bits<<1 ) + get_cabac_noinline( &h->cabac, &h->cabac_state[27+5] );
                 mb_type= bits - 4; /* B_L0_Bi_* through B_Bi_Bi_* */
             }
         }