From ad563713437b8c0fd0aabaa9df9473385acd300d Mon Sep 17 00:00:00 2001 From: Marco Date: Mon, 17 Jul 2017 16:04:04 -0700 Subject: [PATCH] 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 --- vp9/encoder/vp9_encodeframe.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index 7cc6e20a3..e69b337b6 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -1013,8 +1013,7 @@ static void avg_source_sad(VP9_COMP *cpi, MACROBLOCK *x, int shift, // 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) { -- 2.40.0