]> granicus.if.org Git - libvpx/commitdiff
Fixing the newbintramodes experiment
authorDeb Mukherjee <debargha@google.com>
Thu, 4 Apr 2013 19:32:34 +0000 (12:32 -0700)
committerDeb Mukherjee <debargha@google.com>
Thu, 4 Apr 2013 19:40:55 +0000 (12:40 -0700)
Adds back special casing B_PRED mode decoding but protected
within the experimental macro.

Change-Id: If98dc8e56b0ecfb1202540c2b7dfdd070cb81ca0

vp9/decoder/vp9_decodframe.c
vp9/decoder/vp9_detokenize.c
vp9/decoder/vp9_detokenize.h

index ddc0a52aefeaf5df944a2a4280af621dd32e7ac6..7d71ceba3645009428b25b88a9b90c7c766a8c1d 100644 (file)
@@ -353,7 +353,7 @@ static void decode_8x8(VP9D_COMP *pbi, MACROBLOCKD *xd,
 static void decode_4x4(VP9D_COMP *pbi, MACROBLOCKD *xd,
                        BOOL_DECODER* const bc) {
   TX_TYPE tx_type;
-  int i;
+  int i = 0;
   MB_PREDICTION_MODE mode = xd->mode_info_context->mbmi.mode;
 #if 0  // def DEC_DEBUG
   if (dec_debug) {
@@ -404,6 +404,8 @@ static void decode_4x4(VP9D_COMP *pbi, MACROBLOCKD *xd,
 #if CONFIG_NEWBINTRAMODES
       xd->mode_info_context->bmi[i].as_mode.context = b->bmi.as_mode.context =
           vp9_find_bpred_context(xd, b);
+      if (!xd->mode_info_context->mbmi.mb_skip_coeff)
+        vp9_decode_coefs_4x4(pbi, xd, bc, PLANE_TYPE_Y_WITH_DC, i);
 #endif
       vp9_intra4x4_predict(xd, b, b_mode, b->predictor);
       tx_type = get_tx_type_4x4(xd, i);
@@ -417,6 +419,10 @@ static void decode_4x4(VP9D_COMP *pbi, MACROBLOCKD *xd,
                       *(b->base_dst) + b->dst, 16, b->dst_stride, xd->eobs[i]);
       }
     }
+#if CONFIG_NEWBINTRAMODES
+    if (!xd->mode_info_context->mbmi.mb_skip_coeff)
+      vp9_decode_mb_tokens_4x4_uv(pbi, xd, bc);
+#endif
     vp9_build_intra_predictors_mbuv(xd);
     xd->itxm_add_uv_block(xd->qcoeff + 16 * 16,
                            xd->block[16].dequant,
@@ -813,7 +819,10 @@ static void decode_mb(VP9D_COMP *pbi, MACROBLOCKD *xd,
   if (xd->mode_info_context->mbmi.mb_skip_coeff) {
     vp9_reset_mb_tokens_context(xd);
   } else if (!bool_error(bc)) {
-    eobtotal = vp9_decode_mb_tokens(pbi, xd, bc);
+#if CONFIG_NEWBINTRAMODES
+    if (mode != B_PRED)
+#endif
+      eobtotal = vp9_decode_mb_tokens(pbi, xd, bc);
   }
 
   //mode = xd->mode_info_context->mbmi.mode;
index 9db9d42c1430a65b1669e958af5ca014a7aad858..e55826379abc8361969fe4400ce61ca6fae2d247 100644 (file)
@@ -584,3 +584,13 @@ int vp9_decode_mb_tokens(VP9D_COMP* const dx,
       return vp9_decode_mb_tokens_4x4(dx, xd, bc);
   }
 }
+
+#if CONFIG_NEWBINTRAMODES
+int vp9_decode_coefs_4x4(VP9D_COMP *dx, MACROBLOCKD *xd,
+                         BOOL_DECODER* const bc,
+                         PLANE_TYPE type, int i) {
+  const int segment_id = xd->mode_info_context->mbmi.segment_id;
+  const int seg_eob = get_eob(xd, segment_id, 16);
+  return decode_coefs_4x4(dx, xd, bc, type, i, seg_eob);
+}
+#endif
index c9569bf345fc70721cb7cc90547e6c20313602c9..97de72b9a0b7dcb2e80dcaa1f1ba3df4fb2bfd56 100644 (file)
@@ -27,5 +27,10 @@ int vp9_decode_sb64_tokens(VP9D_COMP* const pbi,
 
 int vp9_decode_mb_tokens_4x4_uv(VP9D_COMP* const dx, MACROBLOCKD* const xd,
                                 BOOL_DECODER* const bc);
+#if CONFIG_NEWBINTRAMODES
+int vp9_decode_coefs_4x4(VP9D_COMP *dx, MACROBLOCKD *xd,
+                         BOOL_DECODER* const bc,
+                         PLANE_TYPE type, int i);
+#endif
 
 #endif  // VP9_DECODER_VP9_DETOKENIZE_H_