Add dav1d for software AV1 decoding

This commit is contained in:
Cameron Gutman
2023-07-16 02:13:07 +00:00
parent 03ee4eaf2c
commit fb0d531ed9
7 changed files with 22 additions and 2 deletions

3
.gitmodules vendored
View File

@@ -19,3 +19,6 @@
[submodule "FFmpeg-l4t"]
path = FFmpeg-l4t
url = https://gitlab.com/switchroot/switch-l4t-multimedia/FFmpeg.git
[submodule "dav1d"]
path = dav1d
url = https://code.videolan.org/videolan/dav1d.git

View File

@@ -8,6 +8,7 @@ RUN /bin/bash -c /opt/scripts/install-base-deps.sh && \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/*
COPY dav1d /opt/dav1d
COPY FFmpeg /opt/FFmpeg
COPY nv-codec-headers /opt/nv-codec-headers
COPY SDL2 /opt/SDL2

View File

@@ -12,6 +12,7 @@ RUN /bin/bash -c /opt/scripts/install-base-deps.sh && \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/*
COPY dav1d /opt/dav1d
COPY FFmpeg-rpi /opt/FFmpeg
COPY SDL2 /opt/SDL2
COPY SDL_ttf /opt/SDL_ttf

View File

@@ -13,6 +13,7 @@ RUN /bin/bash -c /opt/scripts/install-base-deps.sh && \
rm -rf /var/lib/apt/lists/*
COPY rpi-userland /opt/rpi-userland
COPY dav1d /opt/dav1d
COPY FFmpeg-rpi /opt/FFmpeg
COPY SDL2 /opt/SDL2
COPY SDL_ttf /opt/SDL_ttf

1
dav1d Submodule

Submodule dav1d added at 8a6f054ef1

View File

@@ -56,8 +56,20 @@ sed -i 's/-lSDL2_ttf/-lSDL2_ttf -lfreetype/g' SDL2_ttf.pc
cat SDL2_ttf.pc
make install
# FFmpeg-l4t is too old to support dav1d 1.2.1
if [ "$TARGET" != "l4t" ]; then
# Build and install libdav1d
cd /opt/dav1d
meson setup build -Ddefault_library=static -Dbuildtype=debugoptimized -Denable_tools=false -Denable_tests=false
ninja -C build
ninja install -C build
# Enable libdav1d during FFmpeg build
DAV1D_FFMPEG_ARGS="--enable-libdav1d --enable-decoder=libdav1d"
fi
cd /opt/FFmpeg
./configure $BASE_FFMPEG_ARGS $EXTRA_FFMPEG_ARGS
./configure $BASE_FFMPEG_ARGS $EXTRA_FFMPEG_ARGS $DAV1D_FFMPEG_ARGS
make -j$(nproc)
make install

View File

@@ -1,5 +1,6 @@
set -e
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y curl g++ make devscripts fakeroot debhelper git nasm libgbm-dev libdrm-dev libfreetype6-dev libasound2-dev libdbus-1-dev libegl1-mesa-dev libgl1-mesa-dev libgles2-mesa-dev libglu1-mesa-dev libibus-1.0-dev libpulse-dev libudev-dev libx11-dev libxcursor-dev libxext-dev libxi-dev libxinerama-dev libxkbcommon-dev libxrandr-dev libxss-dev libxt-dev libxv-dev libxxf86vm-dev cmake
apt-get install -y curl g++ make ninja-build python3-pip devscripts fakeroot debhelper git nasm libgbm-dev libdrm-dev libfreetype6-dev libasound2-dev libdbus-1-dev libegl1-mesa-dev libgl1-mesa-dev libgles2-mesa-dev libglu1-mesa-dev libibus-1.0-dev libpulse-dev libudev-dev libx11-dev libxcursor-dev libxext-dev libxi-dev libxinerama-dev libxkbcommon-dev libxrandr-dev libxss-dev libxt-dev libxv-dev libxxf86vm-dev cmake
apt-get install -y --no-install-recommends libssl-dev qtbase5-dev qtquickcontrols2-5-dev qtdeclarative5-dev libqt5svg5-dev libopus-dev
pip3 install meson==0.61.5 # Last version compatible with Python 3.6 on Bionic