]> granicus.if.org Git - libvpx/commitdiff
Remove the speed condition on scene detection in 1 pass code.
authorMarco <marpan@google.com>
Wed, 27 Sep 2017 17:11:24 +0000 (10:11 -0700)
committerMarco <marpan@google.com>
Wed, 27 Sep 2017 17:32:54 +0000 (10:32 -0700)
Scene detection is used for VBR mode and for screen_content mode.

It was also enabled for CBR mode via the speed condition,
but currently the analysis in the scene detection is not used
in CRB mode (similar computations are done locally at superblock level
when the source_sad feature is enabled).

For 1 pass code.
No change in behavior. Small speed gain, ~0.5%.

Change-Id: I59991d7ef2af320bea7af4b907596e057affa42f

vp9/encoder/vp9_encoder.c

index bb93da4f4763e3c228d4614d630917fa84048504..8e793774300d2c91a16a9fc9547bbc62112fcd6b 100644 (file)
@@ -3524,12 +3524,9 @@ static void encode_without_recode_loop(VP9_COMP *cpi, size_t *size,
   vp9_update_noise_estimate(cpi);
 
   // 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).
   if (cpi->compute_source_sad_onepass &&
       (cpi->oxcf.rc_mode == VPX_VBR ||
-       cpi->oxcf.content == VP9E_CONTENT_SCREEN ||
-       (cpi->oxcf.speed >= 5 && cpi->oxcf.speed < 8)))
+       cpi->oxcf.content == VP9E_CONTENT_SCREEN))
     vp9_scene_detection_onepass(cpi);
 
   // For 1 pass CBR SVC, only ZEROMV is allowed for spatial reference frame