From: Marco Date: Fri, 26 Jan 2018 03:00:31 +0000 (-0800) Subject: vp9-svc: Adjust logic on intra mode search. X-Git-Tag: v1.8.0~867 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a9bbff1049ea774ed07286d979dbda7e7f2fe430;p=libvpx 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 --- diff --git a/vp9/encoder/vp9_pickmode.c b/vp9/encoder/vp9_pickmode.c index 185653d80..d4622408e 100644 --- a/vp9/encoder/vp9_pickmode.c +++ b/vp9/encoder/vp9_pickmode.c @@ -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 &&