]> granicus.if.org Git - libvpx/commit
vp9-svc: Fix issue with reseting lst_fb_idx.
authorMarco Paniconi <marpan@google.com>
Fri, 18 May 2018 21:50:46 +0000 (14:50 -0700)
committerMarco Paniconi <marpan@google.com>
Sun, 20 May 2018 01:38:37 +0000 (18:38 -0700)
commita2d5a4a9566874aea4f32303f74cad7ca408933a
tree5d9d5d7d9d98839b660088e93e989ee7a07ab83b
parente5b858740aed35a6f2eb7bf84adb993ccd1962f2
vp9-svc: Fix issue with reseting lst_fb_idx.

When encoding a given spatial layer and the same spatial layer
on previous superframe was dropped (or disabled due to 0 bitrate),
the lst_fb_idx for current layer is set to the buffer index that
was last updated on TL0 frame (for the same spatial layer).

This condition was to maintain proper temporal prediction pattern
under frame drops, and it should only apply to INTER frames.

But the condition was causing an assert to be triggered on spatial
layers whose base are key frames. Fix is to condition this reset of
lst_fb_idx on the "is_key_frame" flag. Also initialize the
fb_idx_upd_tl0 to -1 and only use it for a given spatial layer
if its been set.

These issues can happen when superframe drop happens just before
a key frame, or when stream starts with lower layers and dynamically
enabled higher spatial layers.

Added datarate unittest the inserts key frame after superframe drop,
and verified that this fix is needed for test to pass.
Also modified the existing DisableEnable spatial layer test to trigger
the issue of using fb_idx_upd_tl0 when it hasn't been set for a
spatial layer.

Change-Id: I059d1135736aca17e1326b9b4a2b16371eb4634e
test/svc_datarate_test.cc
vp9/encoder/vp9_svc_layercontext.c
vp9/encoder/vp9_svc_layercontext.h