]> granicus.if.org Git - libvpx/commitdiff
vp9: 1 pass cbr: Adjustments to usage of gf_cbr_boost and aq=3 mode.
authorMarco <marpan@google.com>
Tue, 10 Jan 2017 00:38:49 +0000 (16:38 -0800)
committerMarco <marpan@google.com>
Tue, 10 Jan 2017 17:42:06 +0000 (09:42 -0800)
When aq=3 mode is on and the gf_cbr_boost is set: make sure golden frame
is always refreshed, and don't incorporate segement cost in qp setting
on the boosted golden frame.

Better performance on RTC set with gf_cbr_boost on,
for example with gf_cbr_boost=50, gains from ~0.5-3%.

Change-Id: Ie811f5e4d444ff3320bd6e2c1745b2c4c09a8460

vp9/encoder/vp9_encoder.c
vp9/encoder/vp9_ratectrl.c

index 432eac8da00b3ef186fee039bfa7437e1331e5a1..37cf8257a27e64d0e08453d977062ffdeb1a8013 100644 (file)
@@ -3247,7 +3247,8 @@ static void encode_without_recode_loop(VP9_COMP *cpi, size_t *size,
   // golden reference, for non-SVC 1 pass CBR.
   if (cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ && cm->frame_type != KEY_FRAME &&
       !cpi->use_svc && cpi->ext_refresh_frame_flags_pending == 0 &&
-      (cpi->oxcf.pass == 0 && cpi->oxcf.rc_mode == VPX_CBR))
+      (cpi->oxcf.pass == 0 && cpi->oxcf.rc_mode == VPX_CBR &&
+       !cpi->oxcf.gf_cbr_boost_pct))
     vp9_cyclic_refresh_check_golden_update(cpi);
 
   // Update the skip mb flag probabilities based on the distribution
index 02059a7054461de3bfd65335b203b7a20e86e694..3a5abfa200cc151d687ebd4ce9651abbb9ab93cf 100644 (file)
@@ -537,7 +537,8 @@ int vp9_rc_regulate_q(const VP9_COMP *cpi, int target_bits_per_frame,
 
   do {
     if (cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ && cm->seg.enabled &&
-        cpi->svc.temporal_layer_id == 0) {
+        cpi->svc.temporal_layer_id == 0 &&
+        (!cpi->oxcf.gf_cbr_boost_pct || !cpi->refresh_golden_frame)) {
       bits_per_mb_at_this_q =
           (int)vp9_cyclic_refresh_rc_bits_per_mb(cpi, i, correction_factor);
     } else {