Hardware video decoding on Snapdragon laptops moves to the chip in quattro
Pull request 15697, merged into quattro, moves video decoding in mpv and Chromium on Snapdragon laptops from software to the video chip. The merge is not in version 4.0.4.
The pull request says mpv and Chromium decode all video in software on Snapdragon laptops, although the video chip handles H.264, HEVC, VP9, and AV1, and Omarchy's kernel ships its driver. The command omarchy-install-video-decode changes that on Snapdragon laptops only and leaves every other machine as it is.
It runs at install, through a migration on existing installs, and again after omarchy-refresh-chromium, omarchy-reinstall-configs, or reinstalling the browser. For mpv it puts hwdec=auto-safe,v4l2m2m-copy on top of ~/.config/mpv/mpv.conf, unless the user set an hwdec there.
mpv tries the list in order, so it falls back to the V4L2 decoder instead of software. The shared /etc/mpv/mpv.conf stays at auto-safe, so other ARM boards with a V4L2 decoder, such as the Raspberry Pi 4, keep software decoding until someone tests them.
The pull request says Arch Linux ARM builds Chromium with the V4L2 decoder, and that Chromium turns that decoder on only with --use-angle=gles-egl and the AcceleratedVideoDecoder feature. The helper puts both into ~/.config/chromium-flags.conf. A --use-angle flag the user set stays.
birkskyum wrote that the test was a Yoga Slim 7x with linux-omarchy 7.2.8, which has the same video driver and config as the published 7.2.8-11. birkskyum wrote that 1080p in mpv takes about a fifth of the CPU of software decoding, and that in Chromium, with the screen on, 1080p H.264, VP9, and AV1 take about 20% of a core instead of 50 to 60%.