]> granicus.if.org Git - libvpx/commitdiff
vp9-svc: On scene change: only reset TL in flexible mode.
authorMarco Paniconi <marpan@google.com>
Thu, 13 Dec 2018 23:40:09 +0000 (15:40 -0800)
committerMarco Paniconi <marpan@google.com>
Thu, 13 Dec 2018 23:43:33 +0000 (15:43 -0800)
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

index df4223a235dd18c835b59ba9f4416833bea0439c..32e31be29bd2d77f4c1a76f43904e5b49c05aef1 100644 (file)
@@ -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);