shithub: libvpx

Download patch

ref: b5707b6f14ea1e368ad739d2ae9748086b488a45
parent: c48b2c96adab9055e97a84ac11d5ff3dde62afca
author: Paul Wilkins <[email protected]>
date: Thu Feb 28 11:23:35 EST 2019

Changes to rd_variance_adjustment()

Always calculate per block variance values vs per pixel.

Change-Id: I760b3ba1a250d7544813a1b93923eedc207cbd60

--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -3019,34 +3019,17 @@
 
 #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);
-    }
+    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;
-  } 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