Use high bd path to substract blocks in hbd build.
authorJerome Jiang <jianj@google.com>
Sat, 23 Mar 2019 00:27:24 +0000 (17:27 -0700)
committerJerome Jiang <jianj@google.com>
Mon, 25 Mar 2019 03:13:49 +0000 (20:13 -0700)
BUG=webm:1609

Change-Id: Ifc15d616e7cfb247b399def64ef7691589d90075

test/vp9_end_to_end_test.cc
vp9/encoder/vp9_pickmode.c

index 76fc5b4..6a0bf25 100644 (file)
@@ -30,7 +30,7 @@ const int kBitrate = 500;
 const double kPsnrThreshold[][5] = {
   { 36.0, 37.0, 37.0, 37.0, 37.0 }, { 35.0, 36.0, 36.0, 36.0, 36.0 },
   { 34.0, 35.0, 35.0, 35.0, 35.0 }, { 33.0, 34.0, 34.0, 34.0, 34.0 },
-  { 32.0, 33.0, 33.0, 33.0, 33.0 }, { 31.0, 32.0, 32.0, 32.0, 32.0 },
+  { 32.0, 33.0, 33.0, 33.0, 33.0 }, { 30.5, 32.0, 32.0, 32.0, 32.0 },
   { 30.0, 31.0, 31.0, 31.0, 31.0 }, { 29.0, 30.0, 30.0, 30.0, 30.0 },
 };
 
index 54479b5..845f674 100644 (file)
@@ -698,9 +698,19 @@ static void block_yrd(VP9_COMP *cpi, MACROBLOCK *x, RD_COST *this_rdc,
 
   // The max tx_size passed in is TX_16X16.
   assert(tx_size != TX_32X32);
-
+#if CONFIG_VP9_HIGHBITDEPTH
+  if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
+    vpx_highbd_subtract_block(bh, bw, p->src_diff, bw, p->src.buf,
+                              p->src.stride, pd->dst.buf, pd->dst.stride,
+                              x->e_mbd.bd);
+  } else {
+    vpx_subtract_block(bh, bw, p->src_diff, bw, p->src.buf, p->src.stride,
+                       pd->dst.buf, pd->dst.stride);
+  }
+#else
   vpx_subtract_block(bh, bw, p->src_diff, bw, p->src.buf, p->src.stride,
                      pd->dst.buf, pd->dst.stride);
+#endif
   *skippable = 1;
   // Keep track of the row and column of the blocks we use so that we know
   // if we are in the unrestricted motion border.