]> granicus.if.org Git - libvpx/commitdiff
vp9-svc: Adjust logic on intra mode search.
authorMarco <marpan@google.com>
Fri, 26 Jan 2018 03:00:31 +0000 (19:00 -0800)
committerMarco <marpan@google.com>
Fri, 26 Jan 2018 03:11:42 +0000 (19:11 -0800)
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

vp9/encoder/vp9_pickmode.c

index 185653d803c210471a441bed4552b856411a136b..d4622408e4a0618a16ae16ef4d1c9973085dd7ee 100644 (file)
@@ -2211,9 +2211,11 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, TileDataEnc *tile_data,
 
   // 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 &&