]> granicus.if.org Git - libvpx/commitdiff
Cherry-pick changes related to highbd substract func. m74-3729
authorJerome Jiang <jianj@google.com>
Sat, 23 Mar 2019 00:27:24 +0000 (17:27 -0700)
committerJerome Jiang <jianj@google.com>
Mon, 1 Apr 2019 18:27:33 +0000 (11:27 -0700)
d6e40b6 Use high bd path to substract blocks in hbd build.
0d2299c Change PSNR threshold for high bitdepth.

BUG=945084

Change-Id: I3909e9e48b031b6d7ceb3fffe4ebe5bd43fcde5e

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

index 76fc5b4d8210e813afe6131b615d99ccc51e71cd..2d7bd70a50f15affc35affb0e77373115c3a374a 100644 (file)
@@ -30,8 +30,8 @@ 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 },
-  { 30.0, 31.0, 31.0, 31.0, 31.0 }, { 29.0, 30.0, 30.0, 30.0, 30.0 },
+  { 32.0, 33.0, 33.0, 33.0, 33.0 }, { 28.0, 32.0, 32.0, 32.0, 32.0 },
+  { 28.5, 31.0, 31.0, 31.0, 31.0 }, { 28.0, 30.0, 30.0, 30.0, 30.0 },
 };
 
 typedef struct {
index b799a11602554bde07d379a31faa02151115532f..fcdcdf70d8ef1b3de7ccf3591ac3531504c83675 100644 (file)
@@ -717,9 +717,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.