Set rc->high_source_sad = 0 before scene detection.
authorMarco <marpan@google.com>
Thu, 28 Sep 2017 17:47:34 +0000 (10:47 -0700)
committerMarco <marpan@google.com>
Thu, 28 Sep 2017 17:49:45 +0000 (10:49 -0700)
Only has effect when sf->use_altref_onepass is enabled,
as in that case scene detection is skipped for non-show frame
and so high_source_sad does not get reset to 0.

No change in metrics or speed.

Change-Id: I421f066d239341449c18826089e1810b9fc5967f

vp9/encoder/vp9_encoder.c

index 6bb21fc..37ecca7 100644 (file)
@@ -3531,6 +3531,7 @@ static void encode_without_recode_loop(VP9_COMP *cpi, size_t *size,
   // Scene detection is always used for VBR mode or screen-content case.
   // For other cases (e.g., CBR mode) use it for 5 <= speed < 8 for now
   // (need to check encoding time cost for doing this for speed 8).
+  cpi->rc.high_source_sad = 0;
   if (cpi->compute_source_sad_onepass &&
       (cpi->oxcf.rc_mode == VPX_VBR ||
        cpi->oxcf.content == VP9E_CONTENT_SCREEN ||