]> granicus.if.org Git - libvpx/commitdiff
vp9-svc: Clean conditon for allowing copy_partition.
authorMarco <marpan@google.com>
Wed, 29 Nov 2017 20:48:20 +0000 (12:48 -0800)
committerMarco <marpan@google.com>
Wed, 29 Nov 2017 21:19:09 +0000 (13:19 -0800)
Make condition explicit on non_reference_frame.

No change in behavior.

Change-Id: Iec5068bccd93c7c7be67634c5c090580b2dbb20d

vp9/encoder/vp9_encodeframe.c

index d46a76074e8bc9af2e13b446c0e0c2748a90f389..dfeaa3e512ed6bb2498da00f7c70331632adadfe 100644 (file)
@@ -907,10 +907,7 @@ static int copy_partitioning(VP9_COMP *cpi, MACROBLOCK *x, MACROBLOCKD *xd,
     int layer = LAYER_IDS_TO_IDX(0, cpi->svc.temporal_layer_id,
                                  cpi->svc.number_temporal_layers);
     const LAYER_CONTEXT *lc = &cpi->svc.layer_context[layer];
-    if (lc->is_key_frame ||
-        (cpi->svc.temporal_layer_id != cpi->svc.number_temporal_layers - 1 &&
-         cpi->svc.number_temporal_layers > 1))
-      svc_copy_allowed = 0;
+    if (lc->is_key_frame || !cpi->svc.non_reference_frame) svc_copy_allowed = 0;
     frames_since_key_thresh = cpi->svc.number_spatial_layers << 1;
   }
   if (cpi->rc.frames_since_key > frames_since_key_thresh && svc_copy_allowed &&