Allow disable of refresh golden for more than 1 layer encoding.
authorMarco <marpan@google.com>
Mon, 3 Nov 2014 06:10:56 +0000 (22:10 -0800)
committerMarco <marpan@google.com>
Mon, 3 Nov 2014 06:24:00 +0000 (22:24 -0800)
The current logic was allowing for disabling golden refresh only
for two pass svc encoding. This change disables it as long as
more than 1 layer encoding is used (for example temporal layers under 1pass CBR).

Change-Id: I4dc5204a7ad365c821ec7963e93b59da82e1826b

vp9/encoder/vp9_encoder.c

index f8ff299..24ee722 100644 (file)
@@ -2983,7 +2983,9 @@ static int get_ref_frame_flags(const VP9_COMP *cpi) {
   if (gold_is_last)
     flags &= ~VP9_GOLD_FLAG;
 
-  if (cpi->rc.frames_till_gf_update_due == INT_MAX && !is_two_pass_svc(cpi))
+  if (cpi->rc.frames_till_gf_update_due == INT_MAX &&
+      (cpi->svc.number_temporal_layers == 1 &&
+       cpi->svc.number_spatial_layers == 1))
     flags &= ~VP9_GOLD_FLAG;
 
   if (alt_is_last)