intel iHD va-api support in snap
The vlc snap is currently missing the intel iHD drivers. This prevents va-api hardware acceleration from working on recent intel CPUs. This leads to high CPU use and not making use of the build in video decoding hardware. The required driver intel-media-va-driver-non-free
does not appear to be available for ubuntu bionic (the version of ubuntu used to build the current vlc snap). However it is availiable for ubuntu focal (the version of ubuntu used to build snaps in the vlc master branch). I've tested adding the driver to snaps built against the master branch and it is successful in enabling va-api hardware acceleration, so should be a simple change for the future. My patch for this is a simple one linere here (https://github.com/zebardy/vlc/commit/50d4b83b952e18153da2775cddbc3b2c772b5d77)
I've also attempted to patch the 3.0.x branch with the driver. However this entailed switching to ubuntu focal for building the snap, updating the dependencies and rebuilding the contribs. I got pretty far with this but hit a wall with the following error while linking:-
libavcodec.a(fft.o): relocation R_X86_64_PC32 against symbol ff_cos_32' can not be used when making a shared object; recompile with -fPIC
If you have suggestions for resolving this error, I can keep trying. My patch to the snapcraft.yaml can be seen here (https://github.com/zebardy/vlc/commit/b443490fa1cc6e417f07648a66b55d1ab30967f8)
Patching the current snap should be possible and would be beneficial, however appears to be a non trivial change.