shithub: libvpx

Download patch

ref: a9bbff1049ea774ed07286d979dbda7e7f2fe430
parent: 067457339bc6dce72cc07cb0ebf9f549f452250a
author: Marco <marpan@google.com>
date: Thu Jan 25 14:00:31 EST 2018

vp9-svc: Adjust logic on intra mode search.

For SVC, on spatial enhancement layer, intra
search was disabled unless best reference frame
is golden (i.e., spatial/inter-layer prediction),
except for some other conditions (lower layer is key
or golden is not an allowed reference).

Fix is to add the base temporal layer condition,
so intra search will not be force-disabled for base
temporal layer frames.

This improves metrics (-1-2%) for SVC 3 and 2 layer config.
Some small encode time is expected, but since condition
only affect base temporal layers (i.e., every 4 frames
for 3 layers), increase is small.

Change-Id: I10b824faef99560dfdeeb02ba8bf8e3e1eea6255

--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -2211,9 +2211,11 @@
 
   // 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.
+  // LAST is the only reference, or is_key_frame is set, or on base
+  // temporal layer.
   if (cpi->svc.spatial_layer_id) {
     perform_intra_pred =
+        cpi->svc.temporal_layer_id == 0 ||
         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 &&