AV1 video with spatial layers: all frames shown instead of only the highest layer
AV1 videos support Scalable Video Coding (SVC) where video frames a placed on temporal or spatial "layers". Spatial layers are used to provide multiple qualities/video resolutions within a single video stream. Decoders are expected to only display the highest spatial layer they support (see https://aomediacodec.github.io/av1-spec/#output-process). Instead, VLC currently shows frames from all layers.
Example video: https://storage.googleapis.com/aom-test-data/av1-1-b8-22-svc-L2T1.ivf VLC will alternate between small frames and large frames, instead of displaying only the large frames. (Version tested: 3.0.20 Vetinari (Apple Silicon))
I believe that setting the all_layers
field in Dav1dSettings
to 0 somewhere in modules/codec/dav1d.c
should fix this.
The fact that this setting is set to 1 by default seems like an unfortunate choice that's stuck around for historical reasons? https://github.com/videolan/dav1d/blob/d2687884674cb91ff9ac4c1d8b2dd63517ed7b71/src/lib.c#L81 "// just until the tests are adjusted" from 6 years ago...