[dav1d Git regression] Heavily seeking in a video file creates random blocking artifacts
What steps will reproduce the problem?
- Build dav1d from Git.
- Build mpv from ffmpeg master using mpv-build and the instructions provided: https://github.com/mpv-player/mpv-build
- Play a file using mpv, and start heavily seeking either from keyframes to keyframes, or just pure random seeking.
What is the expected output?
It seeks normally.
What do you see instead?
At random occasions, random block artifacts will appear.
What version / commit were you testing with? (git describe can produce this info if building from source). On what operating system?
dav1d 0.9.2-14-gd9c01c34
Openmandriva 4.3RC
mpv and ffmpeg git
Please provide any additional information below.
The issue seems to only be present when threading is being used(--vd-lavc-threads>1), which is rather weird.
I have encoded Tears of Steel from Netflix's open library using aomenc-av1 and rav1e to check if it was related to bad encoder behavior, but it happens with both AV1 encodes.
aomenc: https://drive.google.com/file/d/1S8eGtNAgpLsgRo8Rd8tK5jdK6cj5VCjg/view?usp=sharing
rav1e: https://drive.google.com/file/d/1IXuuQGDYH1rGe0yR_4U5A89Wck5EHCNx/view?usp=sharing
Here is a screenshot of the issue in question: https://slow.pics/c/u7jrUD8Y
The conditions it can usually be noticed are:
- Random (the blocks tend to instantly appear right on the seek) or sequential seeking(the blocks tend to gradually appear)
- Low variance background.
Edit: The issue has been narrowed down to framedelay being a problem when multi-threading is being active:
- Single-threaded decoding with normal framedelay does not have the issue written above.
- Multi-threaded decoding, but with low-delay being activated does not have the issue written above.
Here are screenshots with the 1st screenshot being MT decoding with low-delay diabled(mpv --vd-lavc-threads=16 input.mkv
), and the 2nd screenshot is with low-delay enabled(mpv --vd-lavc-threads=16 --vd-lavc-o=flags=low_delay input.mkv
)
Edit 2: I have added a clip of Sol Levante since it's animation with many low variance parts, which makes it easy to see the iDCT artifacts.
https://drive.google.com/file/d/14TMyp_-PVXpxR12EwKoFNeQVsRcUFwhI/view?usp=sharing