From: Marco Date: Tue, 22 Aug 2017 21:46:39 +0000 (-0700) Subject: vp9: Condition lighting change detection on CBR mode. X-Git-Tag: v1.7.0~221^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a31461c853f65e5fd9c20dfdeb82b18d6590eff8;p=libvpx vp9: Condition lighting change detection on CBR mode. This feature is used for the CBR RTC encoding mode at speed >= 6. This change will exclude it for VBR mode. For speed 6 live encoding (VBR): avgPSNR/SSIM metrics on ytlive set up by ~1% (few clips up by 2/3%). No change in speed. Change-Id: I1a0dd94c334f7df309ab5a48d477d7e25355b798 --- diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index 175856b8b..a0a7ff51d 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -1012,7 +1012,8 @@ static uint64_t avg_source_sad(VP9_COMP *cpi, MACROBLOCK *x, int shift, // Detect large lighting change. if (cpi->oxcf.content != VP9E_CONTENT_SCREEN && - tmp_variance < (tmp_sse >> 3) && (tmp_sse - tmp_variance) > 10000) + cpi->oxcf.rc_mode == VPX_CBR && tmp_variance < (tmp_sse >> 3) && + (tmp_sse - tmp_variance) > 10000) x->content_state_sb = kLowVarHighSumdiff; else if (tmp_sad > (avg_source_sad_threshold << 1)) x->content_state_sb = kVeryHighSad;