shithub: libvpx

Download patch

ref: 13d4a0d011be218cbe513fdf72c5b3b262b476bc
parent: 3704807805895850671261fa4470f1ce41dd2ac9
author: Marco Paniconi <marpan@google.com>
date: Tue May 16 18:50:19 EDT 2017

Revert "Revert "vp8: Real-time mode: reduce mode_check_freq thresh for speed 10.""

This reverts commit 3704807805895850671261fa4470f1ce41dd2ac9.

Reason for revert: <INSERT REASONING HERE>
Does not look to be the cause of the test failures.

Original change's description:
> Revert "vp8: Real-time mode: reduce mode_check_freq thresh for speed 10."
> 
> This reverts commit 4a7424adba7a65766a92635dc67b6e7d94646693.
> 
> Reason for revert: <INSERT REASONING HERE>
> Possibly causing test failures in roll into chromium.
> 
> Original change's description:
> > vp8: Real-time mode: reduce mode_check_freq thresh for speed 10.
> > 
> > Reduces quality regression at speed 10 for real-time mode.
> > 
> > Change-Id: I9f624bea9ca262dab32ce9de7d6d91175d6becc8
> > 
> 
> TBR=marpan@google.com,builds@webmproject.org,jianj@google.com
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Change-Id: I1defcb74e78a5a3bd29b7d1b21a96a79fa26a457
> 

TBR=marpan@google.com,builds@webmproject.org,jianj@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I13d86a2a68b8aa8c0c7465e6e58cff0e00bc7862

--- a/vp8/encoder/onyx_if.c
+++ b/vp8/encoder/onyx_if.c
@@ -728,6 +728,7 @@
   SPEED_FEATURES *sf = &cpi->sf;
   int Mode = cpi->compressor_speed;
   int Speed = cpi->Speed;
+  int Speed2;
   int i;
   VP8_COMMON *cm = &cpi->common;
   int last_improved_quant = sf->improved_quant;
@@ -829,9 +830,16 @@
   cpi->mode_check_freq[THR_V_PRED] = cpi->mode_check_freq[THR_H_PRED] =
       cpi->mode_check_freq[THR_B_PRED] =
           speed_map(Speed, mode_check_freq_map_vhbpred);
-  cpi->mode_check_freq[THR_NEW1] = speed_map(Speed, mode_check_freq_map_new1);
+
+  // For real-time mode at speed 10 keep the mode_check_freq threshold
+  // for NEW1 similar to that of speed 9.
+  Speed2 = Speed;
+  if (cpi->Speed == 10 && Mode == 2) Speed2 = RT(9);
+  cpi->mode_check_freq[THR_NEW1] = speed_map(Speed2, mode_check_freq_map_new1);
+
   cpi->mode_check_freq[THR_NEW2] = cpi->mode_check_freq[THR_NEW3] =
       speed_map(Speed, mode_check_freq_map_new2);
+
   cpi->mode_check_freq[THR_SPLIT1] =
       speed_map(Speed, mode_check_freq_map_split1);
   cpi->mode_check_freq[THR_SPLIT2] = cpi->mode_check_freq[THR_SPLIT3] =