diff --git a/.github/actions/deploy-ubuntu/action.yml b/.github/actions/deploy-ubuntu/action.yml index 108bea62600..bb6d13b9d06 100644 --- a/.github/actions/deploy-ubuntu/action.yml +++ b/.github/actions/deploy-ubuntu/action.yml @@ -129,6 +129,29 @@ runs: $SUDO curl -s -o /etc/apt/sources.list.d/lunarg-vulkan-1.3.280-focal.list https://packages.lunarg.com/vulkan/1.3.280/lunarg-vulkan-1.3.280-focal.list fi $SUDO apt-get update && $SUDO apt-get install -y libvulkan1 libvulkan-dev vulkan-sdk + + if [[ "$CI_DEPLOY_PLATFORM" == "linux-x86_64" ]]; then + # Install required packages for building libva + $SUDO apt-get update + # Install common build tools and libraries + $SUDO apt-get install -y autoconf libtool build-essential libdrm-dev libgl1-mesa-dev + + # Install VAAPI driver development packages for Intel, AMD and potentially NVIDIA + $SUDO apt-get install -y libva-dev libva-drm2 libva-x11-2 libva-glx2 libva-wayland2 libva2 libwayland-dev + + # Additional drivers for different hardware + $SUDO apt-get install -y va-driver-all + + # Cloning and building libva (Intel's Video Acceleration API implementation) + git clone https://github.com/intel/libva.git + cd libva + git checkout master # Specify a tag or commit for a specific version if needed + ./autogen.sh + ./configure --prefix=/usr + make -j$(nproc) + $SUDO make install + cd .. + fi if [[ -n ${USERLAND_BUILDME:-} ]]; then curl -LOJ https://github.com/raspberrypi/userland/archive/master.tar.gz diff --git a/ffmpeg/cppbuild.sh b/ffmpeg/cppbuild.sh index dbc412e6472..812ee56f4ed 100755 --- a/ffmpeg/cppbuild.sh +++ b/ffmpeg/cppbuild.sh @@ -10,6 +10,7 @@ fi DISABLE="--disable-iconv --disable-opencl --disable-sdl2 --disable-bzlib --disable-lzma --disable-linux-perf --disable-xlib" ENABLE="--enable-shared --enable-version3 --enable-runtime-cpudetect --enable-zlib --enable-libmp3lame --enable-libspeex --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-openssl --enable-libopenh264 --enable-libvpx --enable-libfreetype --enable-libopus --enable-libxml2 --enable-libsrt --enable-libwebp --enable-libaom --enable-libsvtav1 --enable-libzimg" ENABLE_VULKAN="--enable-vulkan --enable-hwaccel=h264_vulkan --enable-hwaccel=hevc_vulkan --enable-hwaccel=av1_vulkan" +ENABLE_VAAPI="--enable-vaapi --enable-hwaccel=h264_vaapi --enable-hwaccel=hevc_vaapi" if [[ "$EXTENSION" == *gpl ]]; then # Enable GPLv3 modules @@ -886,7 +887,7 @@ EOF make install cd .. cd ../ffmpeg-$FFMPEG_VERSION - LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-libdrm --enable-cuda --enable-cuvid --enable-nvenc --enable-pthreads --enable-libxcb --enable-libpulse --cc="gcc -m32 -D__ILP32__" --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1" --extra-ldflags="-L../lib/" --extra-libs="-lstdc++ -lpthread -ldl -lz -lm $LIBS" || cat ffbuild/config.log + LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-libdrm $ENABLE_VAAPI --enable-cuda --enable-cuvid --enable-nvenc --enable-pthreads --enable-libxcb --enable-libpulse --cc="gcc -m32 -D__ILP32__" --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1" --extra-ldflags="-L../lib/" --extra-libs="-lstdc++ -lpthread -ldl -lz -lm $LIBS" || cat ffbuild/config.log make -j $MAKEJ make install ;; @@ -1036,7 +1037,7 @@ EOF make install cd .. cd ../ffmpeg-$FFMPEG_VERSION - LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-libdrm --enable-cuda --enable-cuvid --enable-nvenc --enable-pthreads --enable-libxcb --enable-libpulse --cc="gcc -m64" --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1" --extra-ldflags="-L../lib/" --extra-libs="-lstdc++ -lpthread -ldl -lz -lm $LIBS" || cat ffbuild/config.log + LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-libdrm $ENABLE_VAAPI --enable-cuda --enable-cuvid --enable-nvenc --enable-pthreads --enable-libxcb --enable-libpulse --cc="gcc -m64" --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1" --extra-ldflags="-L../lib/" --extra-libs="-lstdc++ -lpthread -ldl -lz -lm $LIBS" || cat ffbuild/config.log make -j $MAKEJ make install ;;