shithub: libvpx

Download patch

ref: ad563713437b8c0fd0aabaa9df9473385acd300d
parent: 0c9e2f4c15a6edd982cdd3fed1209c7a93b9ecd2
author: Marco <marpan@google.com>
date: Mon Jul 17 12:04:04 EDT 2017

vp9: Fix to setting content_state for real-time mode.

When content_state_sb is set to LowVarHighSumdiff, don't reset
it to VeryHighSad. Visually better on clips with strong lighting changes.

Small/negligible change in RTC metrics and speed.

Change-Id: I20c383e3c4cf8d1149de5f9260449c0b7cf7c6aa

--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -1013,8 +1013,7 @@
   // Detect large lighting change.
   if (tmp_variance < (tmp_sse >> 3) && (tmp_sse - tmp_variance) > 10000)
     x->content_state_sb = kLowVarHighSumdiff;
-
-  if (tmp_sad > (avg_source_sad_threshold << 1))
+  else if (tmp_sad > (avg_source_sad_threshold << 1))
     x->content_state_sb = kVeryHighSad;
 
   if (cpi->content_state_sb_fd != NULL) {