]> granicus.if.org Git - libvpx/commitdiff
vp9: Adjust logic in source sad for screen content.
authorJerome Jiang <jianj@google.com>
Fri, 28 Jul 2017 23:34:04 +0000 (16:34 -0700)
committerJerome Jiang <jianj@google.com>
Sat, 29 Jul 2017 00:25:41 +0000 (17:25 -0700)
Change-Id: I917d106f4c95ea44e413e23881f6303982e1a6a3

vp9/encoder/vp9_encodeframe.c

index d8115bc256274c9ea695e98c66b589f1321ab36d..b927bac02614f70855ef0f0becfcf8e7c39c50df 100644 (file)
@@ -1011,7 +1011,8 @@ static void avg_source_sad(VP9_COMP *cpi, MACROBLOCK *x, int shift,
                                                           : kHighSadHighSumdiff;
 
   // Detect large lighting change.
-  if (tmp_variance < (tmp_sse >> 3) && (tmp_sse - tmp_variance) > 10000)
+  if (cpi->oxcf.content != VP9E_CONTENT_SCREEN &&
+      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;