From d6e40b68bceac111652f89dc2c3e2b7c65bf3356 Mon Sep 17 00:00:00 2001 From: Jerome Jiang Date: Fri, 22 Mar 2019 17:27:24 -0700 Subject: [PATCH] Use high bd path to substract blocks in hbd build. BUG=webm:1609 Change-Id: Ifc15d616e7cfb247b399def64ef7691589d90075 --- test/vp9_end_to_end_test.cc | 2 +- vp9/encoder/vp9_pickmode.c | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/test/vp9_end_to_end_test.cc b/test/vp9_end_to_end_test.cc index 76fc5b4..6a0bf25 100644 --- a/test/vp9_end_to_end_test.cc +++ b/test/vp9_end_to_end_test.cc @@ -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 }, }; diff --git a/vp9/encoder/vp9_pickmode.c b/vp9/encoder/vp9_pickmode.c index 54479b5..845f674 100644 --- a/vp9/encoder/vp9_pickmode.c +++ b/vp9/encoder/vp9_pickmode.c @@ -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. -- 2.7.4