From: Paul Wilkins Date: Thu, 28 Feb 2019 16:23:35 +0000 (+0000) Subject: Changes to rd_variance_adjustment() X-Git-Tag: v1.8.1~174^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b5707b6f14ea1e368ad739d2ae9748086b488a45;p=libvpx Changes to rd_variance_adjustment() Always calculate per block variance values vs per pixel. Change-Id: I760b3ba1a250d7544813a1b93923eedc207cbd60 --- diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c index 5fc3b7c05..a21681c4e 100644 --- a/vp9/encoder/vp9_rdopt.c +++ b/vp9/encoder/vp9_rdopt.c @@ -3019,34 +3019,17 @@ static void rd_variance_adjustment(VP9_COMP *cpi, MACROBLOCK *x, #if CONFIG_VP9_HIGHBITDEPTH if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) { - if (source_variance > 100) { - rec_variance = vp9_high_get_sby_perpixel_variance(cpi, &xd->plane[0].dst, - bsize, xd->bd); - src_variance = source_variance; - } else { - rec_variance = - vp9_high_get_sby_variance(cpi, &xd->plane[0].dst, bsize, xd->bd); - src_variance = - vp9_high_get_sby_variance(cpi, &x->plane[0].src, bsize, xd->bd); - } - } else { - if (source_variance > 100) { - rec_variance = - vp9_get_sby_perpixel_variance(cpi, &xd->plane[0].dst, bsize); - src_variance = source_variance; - } else { - rec_variance = vp9_get_sby_variance(cpi, &xd->plane[0].dst, bsize); - src_variance = vp9_get_sby_variance(cpi, &x->plane[0].src, bsize); - } - } -#else - if (source_variance > 100) { - rec_variance = vp9_get_sby_perpixel_variance(cpi, &xd->plane[0].dst, bsize); - src_variance = source_variance; + rec_variance = + vp9_high_get_sby_variance(cpi, &xd->plane[0].dst, bsize, xd->bd); + src_variance = + vp9_high_get_sby_variance(cpi, &x->plane[0].src, bsize, xd->bd); } else { rec_variance = vp9_get_sby_variance(cpi, &xd->plane[0].dst, bsize); src_variance = vp9_get_sby_variance(cpi, &x->plane[0].src, bsize); } +#else + rec_variance = vp9_get_sby_variance(cpi, &xd->plane[0].dst, bsize); + src_variance = vp9_get_sby_variance(cpi, &x->plane[0].src, bsize); #endif // CONFIG_VP9_HIGHBITDEPTH // Lower of source (raw per pixel value) and recon variance. Note that