shithub: libvpx

Download patch

ref: f03dfcb11839bcbaa883a065f13072d21317fa33
parent: 627a3ddcbef521fb85b1980e701d4d71fb177f40
author: Marco <[email protected]>
date: Wed Mar 16 07:53:43 EDT 2016

vp9-svc: Bugfix on usage of svc_force_zeromv in non-rd pickmode.

Only affects 1 pass cbr svc mode.

Change-Id: Ifc0948b4aabffa64a9701295d8dbc58a7208a30f

--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -1689,12 +1689,15 @@
   xd->mi[0]->bmi[0].as_mv[0].as_int = mi->mv[0].as_int;
   x->skip_txfm[0] = best_mode_skip_txfm;
 
-  // Perform intra prediction only if base layer is chosen as the reference.
+  // For spatial enhancemanent layer: perform intra prediction only if base
+  // layer is chosen as the reference. Always perform intra prediction if
+  // LAST is the only reference or is_key_frame is set.
   if (cpi->svc.spatial_layer_id) {
     perform_intra_pred =
         cpi->svc.layer_context[cpi->svc.temporal_layer_id].is_key_frame ||
+        !(cpi->ref_frame_flags & flag_list[GOLDEN_FRAME])  ||
         (!cpi->svc.layer_context[cpi->svc.temporal_layer_id].is_key_frame
-            && svc_force_zero_mode[best_ref_frame]);
+            && svc_force_zero_mode[best_ref_frame - 1]);
     inter_mode_thresh = (inter_mode_thresh << 1) + inter_mode_thresh;
   }
   // Perform intra prediction search, if the best SAD is above a certain