shithub: libvpx

Download patch

ref: 0e945223382694cf62a6fcd18b0b8e4970e90345
parent: 3ae909b0f9a8c957c65acbc82d8c4f3c58f25417
author: Marco <marpan@google.com>
date: Wed Nov 29 07:48:20 EST 2017

vp9-svc: Clean conditon for allowing copy_partition.

Make condition explicit on non_reference_frame.

No change in behavior.

Change-Id: Iec5068bccd93c7c7be67634c5c090580b2dbb20d

--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -907,10 +907,7 @@
     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 &&