]> granicus.if.org Git - libvpx/commitdiff
Add high bit depth support to rtc sub8x8 block coding
authorJingning Han <jingning@google.com>
Wed, 18 Feb 2015 23:48:40 +0000 (15:48 -0800)
committerJingning Han <jingning@google.com>
Fri, 20 Feb 2015 16:36:33 +0000 (08:36 -0800)
This commit adds proper buffer handle to support high bit depth
in rtc sub8x8 block coding.

Change-Id: Ibaf8a2160194121aec9ca68b8094817fed9ccaea

vp9/encoder/vp9_pickmode.c

index 071747e177e6a22b4c6cff9aa074c511a8c80ae6..ef2a13c1ef948e43bd58ac5d91cfa7c6cfd71c11 100644 (file)
@@ -1224,7 +1224,9 @@ void vp9_pick_inter_mode_sub8x8(VP9_COMP *cpi, MACROBLOCK *x,
                                           [INTER_OFFSET(this_mode)];
           }
 
-          vp9_build_inter_predictor(pd->pre[0].buf, pd->pre[0].stride,
+#if CONFIG_VP9_HIGHBITDEPTH
+          if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
+            vp9_highbd_build_inter_predictor(pd->pre[0].buf, pd->pre[0].stride,
                                     pd->dst.buf, pd->dst.stride,
                                     &xd->mi[0].bmi[i].as_mv[0].as_mv,
                                     &xd->block_refs[0]->sf,
@@ -1233,7 +1235,24 @@ void vp9_pick_inter_mode_sub8x8(VP9_COMP *cpi, MACROBLOCK *x,
                                     vp9_get_interp_kernel(mbmi->interp_filter),
                                     MV_PRECISION_Q3,
                                     mi_col * MI_SIZE + 4 * (i & 0x01),
-                                    mi_row * MI_SIZE + 4 * (i >> 1));
+                                    mi_row * MI_SIZE + 4 * (i >> 1), xd->bd);
+          } else {
+#endif
+            vp9_build_inter_predictor(pd->pre[0].buf, pd->pre[0].stride,
+                                     pd->dst.buf, pd->dst.stride,
+                                     &xd->mi[0].bmi[i].as_mv[0].as_mv,
+                                     &xd->block_refs[0]->sf,
+                                     4 * num_4x4_blocks_wide,
+                                     4 * num_4x4_blocks_high, 0,
+                                     vp9_get_interp_kernel(mbmi->interp_filter),
+                                     MV_PRECISION_Q3,
+                                     mi_col * MI_SIZE + 4 * (i & 0x01),
+                                     mi_row * MI_SIZE + 4 * (i >> 1));
+
+#if CONFIG_VP9_HIGHBITDEPTH
+          }
+#endif
+
           model_rd_for_sb_y(cpi, bsize, x, xd, &this_rdc.rate, &this_rdc.dist,
                             &var_y, &sse_y);