choppy 10bit/HDR video playback on mpv with crocus vs. i965 (also works with zink)
Playing a specific HDR/10bit colorspace video with mpv (-vo=gpu) results in slow/choppy playback when using Crocus. When running under legacy i965, playback is smooth. However, playback is also smooth when running through Zink.
While I am no expert, I suspect the colorspace transforming shader may be the culprit, though I do not understand how it could result in different outcome between Crocus and Zink. Could also be something else, of course.
The video in question is identified via ffprobe as: Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 1920x800 [SAR 1:1 DAR 12:5], 23.98 fps, 23.98 tbr, 1k tbn (default)
The key difference here seems to be the "bt2020nc/bt2020/smpte208" part, with that mpv seems to compile a shader program to convert the colorspace (compared to, say, yuv420p10le with bt709, which gets no such shader).
Sample video file exhibiting the problem
Short apitrace trace of mpv playing the above file
System information:
- Linux distribution: Debian GNU/Linux bookworm/sid
- System architecture: amd64 Foreign architectures: i386
- Machine: Asus H97M-PLUS, Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
- Kernel version: 5.19.4
- Chipset: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06)
- Display connector(s): HDMI (2560x1440)
- Window manager: WindowMaker 0.95.9-3
- xf86-video-intel: GIT
- X server: Xorg 2:21.1.4-1
- Mesa: 22.2.0~rc3-1 (also tested with GIT head)
- libpixman: 0.40.0-1
- libdrm version: 2.4.112-3 (also tested with GIT head)
- mpv version 0.34.1 and latest GIT head