]> granicus.if.org Git - libvpx/commitdiff
vp9: Speed >= 8: avoid chrome check under some condition.
authorMarco <marpan@google.com>
Fri, 24 Mar 2017 18:31:19 +0000 (11:31 -0700)
committerMarco <marpan@google.com>
Mon, 27 Mar 2017 20:18:21 +0000 (13:18 -0700)
For non-rd variance partition, avoid the chrome check
unless y_sad is below some threshold.

Small decrease in avgPSNR (~0.3) on RTC set.
Small/negligible decrease on RTC_derf.

Change-Id: I7af44235af514058ccf9a4f10bb737da9d720866

vp9/encoder/vp9_encodeframe.c

index b6668462b40f273b877c24bdbefc37ad6995e29e..f5f9fa9d9fb94d8fa989e6088040ac76178259e2 100644 (file)
@@ -945,7 +945,9 @@ static void chroma_check(VP9_COMP *cpi, MACROBLOCK *x, int bsize,
                          unsigned int y_sad, int is_key_frame) {
   int i;
   MACROBLOCKD *xd = &x->e_mbd;
-  if (is_key_frame) return;
+  // For speed >= 8, avoid the chroma check if y_sad is above threshold.
+  if (is_key_frame || (cpi->oxcf.speed >= 8 && y_sad > cpi->vbp_thresholds[1]))
+    return;
 
   for (i = 1; i <= 2; ++i) {
     unsigned int uv_sad = UINT_MAX;