VAAPI interop: handle all 420/420_10BPP fourccs
Since 08cbeca2 the fourcc is not always NV12.
Other fourccs (like YV12) need to be handled.
Example with VC1 codec (outputting YV12):
flexo ~/work/git/vlc/build-linux $ ./vlc vc1_in_avi.avi
VLC media player 4.0.0-dev Otto Chriek (revision 4.0.0-dev-17082-g18dda527147)
[00005602105bbd40] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
(vlc-qt-check:168913): Gdk-WARNING **: 15:47:13.177: The GDK_NATIVE_WINDOWS environment variable is not supported in GTK3.
See the documentation for gdk_window_ensure_native() on how to get native windows.
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
(vlc:168902): Gdk-WARNING **: 15:47:13.261: The GDK_NATIVE_WINDOWS environment variable is not supported in GTK3.
See the documentation for gdk_window_ensure_native() on how to get native windows.
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
libva info: VA-API version 1.10.0
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
[00007fbca4dea0f0] decdev_vaapi_x11 generic error: vaInitialize: unknown libva error
libva info: VA-API version 1.10.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_10
libva error: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so init failed
libva info: va_openDriver() returns 1
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_8
libva info: va_openDriver() returns 0
[00007fbca4dff430] vaapi generic: Using Intel i965 driver for Intel(R) Haswell Mobile - 2.4.1
[00007fbca4e0d650] gl gl: Initialized libplacebo v2.72.0 (API v72)
vlc: ../../modules/video_output/opengl/interop_vaapi.c:207: tc_vaegl_update: Assertion `va_image.format.fourcc == priv->fourcc' failed.
zsh: abort ./vlc /home/tom/Videos/vlc/avi/vc1_in_avi.avi
Edited by Thomas Guillem