From 15389ab11d1001749ea796e0c86b345555703d15 Mon Sep 17 00:00:00 2001 From: Marco Paniconi Date: Thu, 13 Dec 2018 15:40:09 -0800 Subject: [PATCH] vp9-svc: On scene change: only reset TL in flexible mode. On scene/slide change detected on TL > 0 frame, only reset the temporal layer pattern for flexible/bypass mode. Change-Id: Ib848778addc10ef6981b92839af397833fd4a908 --- vp9/encoder/vp9_encoder.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c index df4223a23..32e31be29 100644 --- a/vp9/encoder/vp9_encoder.c +++ b/vp9/encoder/vp9_encoder.c @@ -3853,7 +3853,9 @@ static int encode_without_recode_loop(VP9_COMP *cpi, size_t *size, // inserting base layer here, we force max-q for the next superframe // with lower spatial layers: this is done in vp9_encodedframe_overshoot() // when max-q is decided for the current layer. - if (svc->high_source_sad_superframe && svc->temporal_layer_id > 0) { + // Only do this reset for bypass/flexible mode. + if (svc->high_source_sad_superframe && svc->temporal_layer_id > 0 && + svc->temporal_layering_mode == VP9E_TEMPORAL_LAYERING_MODE_BYPASS) { // rc->high_source_sad will get reset so copy it to restore it. int tmp_high_source_sad = cpi->rc.high_source_sad; vp9_svc_reset_temporal_layers(cpi, cm->frame_type == KEY_FRAME); -- 2.40.0