From 26c32265345080932ffdce1da631c5df1c502d54 Mon Sep 17 00:00:00 2001 From: aptalca <541623+aptalca@users.noreply.github.com> Date: Tue, 5 Dec 2023 12:32:43 -0500 Subject: [PATCH] Fix amd vaapi, fix vdpau, bump mesa, update readme --- Dockerfile | 43 ++++++++++++++++++++++++++----------------- README.md | 8 +++++++- readme-vars.yml | 8 +++++++- 3 files changed, 40 insertions(+), 19 deletions(-) diff --git a/Dockerfile b/Dockerfile index c88a091..b6752ea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,7 +31,7 @@ ENV \ LIBVIDSTAB=1.1.1 \ LIBVMAF=2.3.1 \ LIBVPL=2023.3.1 \ - MESA=23.2.1 \ + MESA=23.3.0 \ NVCODEC=n12.1.14.0 \ OGG=1.3.5 \ ONEVPL=23.3.4 \ @@ -280,6 +280,22 @@ RUN \ /usr/local/lib/libva-glx.so \ /usr/local/lib/libva-wayland.so \ /usr/local/lib/libva-x11.so +RUN \ + echo "**** grabbing libvdpau ****" && \ + mkdir -p /tmp/libvdpau && \ + git clone \ + --branch ${LIBVDPAU} \ + --depth 1 https://gitlab.freedesktop.org/vdpau/libvdpau.git \ + /tmp/libvdpau +RUN \ + echo "**** compiling libvdpau ****" && \ + cd /tmp/libvdpau && \ + meson setup \ + --prefix=/usr --libdir=/usr/local/lib \ + -Ddocumentation=false \ + build && \ + ninja -C build install && \ + strip -d /usr/local/lib/libvdpau.so RUN \ echo "**** grabbing mesa ****" && \ mkdir -p /tmp/mesa && \ @@ -382,22 +398,6 @@ RUN \ strip -d \ /usr/local/lib/libmfxhw64.so \ /usr/local/lib/mfx/libmfx_*.so -RUN \ - echo "**** grabbing libvdpau ****" && \ - mkdir -p /tmp/libvdpau && \ - git clone \ - --branch ${LIBVDPAU} \ - --depth 1 https://gitlab.freedesktop.org/vdpau/libvdpau.git \ - /tmp/libvdpau -RUN \ - echo "**** compiling libvdpau ****" && \ - cd /tmp/libvdpau && \ - meson setup \ - --prefix=/usr --libdir=/usr/local/lib \ - -Ddocumentation=false \ - build && \ - ninja -C build install && \ - strip -d /usr/local/lib/libvdpau.so RUN \ echo "**** grabbing vmaf ****" && \ mkdir -p /tmp/vmaf && \ @@ -731,7 +731,9 @@ RUN \ /buildout/usr/local/lib/mfx \ /buildout/usr/local/lib/vpl \ /buildout/usr/local/lib/x86_64-linux-gnu/dri \ + /buildout/usr/local/lib/x86_64-linux-gnu/vdpau \ /buildout/usr/local/share/vulkan \ + /buildout/usr/share/libdrm \ /buildout/etc/OpenCL/vendors && \ cp \ /tmp/ffmpeg/ffmpeg \ @@ -757,9 +759,15 @@ RUN \ cp -a \ /usr/local/lib/x86_64-linux-gnu/dri/*.so \ /buildout/usr/local/lib/x86_64-linux-gnu/dri/ && \ + cp -a \ + /usr/local/lib/x86_64-linux-gnu/vdpau/*.so \ + /buildout/usr/local/lib/x86_64-linux-gnu/vdpau/ && \ cp -a \ /usr/lib/x86_64-linux-gnu/dri/i965* \ /buildout/usr/local/lib/x86_64-linux-gnu/dri/ && \ + cp -a \ + /usr/share/libdrm/amdgpu.ids \ + /buildout/usr/share/libdrm/ && \ cp -a \ /usr/local/share/vulkan/* \ /buildout/usr/local/share/vulkan/ && \ @@ -805,6 +813,7 @@ RUN \ libwayland-client0 \ libx11-6 \ libx11-xcb1 \ + libxcb-dri2-0 \ libxcb-dri3-0 \ libxcb-present0 \ libxcb-randr0 \ diff --git a/README.md b/README.md index e63a603..4296ab0 100644 --- a/README.md +++ b/README.md @@ -132,7 +132,7 @@ docker run --rm -it \ ### Vulkan support -Vulkan support has been added to x86_64 (tested with Intel iGPU) ([click for more info](https://trac.ffmpeg.org/wiki/HWAccelIntro#Vulkan)). +Vulkan support has been added to x86_64 (tested with Intel and AMD iGPU) ([click for more info](https://trac.ffmpeg.org/wiki/HWAccelIntro#Vulkan)). ``` docker run --rm -it \ @@ -147,6 +147,11 @@ docker run --rm -it \ -f null - -benchmark ``` +**Note:** Vulkan supports three drivers: + - ANV: To enable for Intel, set the env var `ANV_VIDEO_DECODE=1` + - RADV: To enable on AMD, set the env var `RADV_PERFTEST=video_decode` + - NVIDIA: To enable on Nvidia, install Nvidia Vulkan Beta drivers on the host per [this article](https://lynne.ee/vulkan-video-decoding.html#driver-support) + ## Building locally If you want to make local modifications to these images for development purposes or just to customize the logic: @@ -168,6 +173,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **05.12.23:** - Bump Mesa. Fix vdpau. Fix AMD VAAPI. * **25.11.23:** - Compile Mesa from source. Add proper Vulkan support (env var `ENABLE_VULKAN=true` no longer needed)(tested with Intel). * **22.11.23:** - Add shaderc and (preliminary) Vulkan support (via env var `ENABLE_VULKAN=true`) to x86_64. Bump Intel drivers and other libs. * **13.11.23:** - Bump FFmpeg to 6.1. diff --git a/readme-vars.yml b/readme-vars.yml index 325b9c0..6e15631 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -136,7 +136,7 @@ full_custom_readme: | ### Vulkan support - Vulkan support has been added to x86_64 (tested with Intel iGPU) ([click for more info](https://trac.ffmpeg.org/wiki/HWAccelIntro#Vulkan)). + Vulkan support has been added to x86_64 (tested with Intel and AMD iGPU) ([click for more info](https://trac.ffmpeg.org/wiki/HWAccelIntro#Vulkan)). ``` docker run --rm -it \ @@ -151,6 +151,11 @@ full_custom_readme: | -f null - -benchmark ``` + **Note:** Vulkan supports three drivers: + - ANV: To enable for Intel, set the env var `ANV_VIDEO_DECODE=1` + - RADV: To enable on AMD, set the env var `RADV_PERFTEST=video_decode` + - NVIDIA: To enable on Nvidia, install Nvidia Vulkan Beta drivers on the host per [this article](https://lynne.ee/vulkan-video-decoding.html#driver-support) + ## Building locally If you want to make local modifications to these images for development purposes or just to customize the logic: @@ -172,6 +177,7 @@ full_custom_readme: | ## Versions + * **05.12.23:** - Bump Mesa. Fix vdpau. Fix AMD VAAPI. * **25.11.23:** - Compile Mesa from source. Add proper Vulkan support (env var `ENABLE_VULKAN=true` no longer needed)(tested with Intel). * **22.11.23:** - Add shaderc and (preliminary) Vulkan support (via env var `ENABLE_VULKAN=true`) to x86_64. Bump Intel drivers and other libs. * **13.11.23:** - Bump FFmpeg to 6.1.