Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 25 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ prepare_dependencies() {
build-essential \
apt-utils cmake cython3 flex bison gcc g++ git make patch pkg-config wget \
libdrm-dev libtool libusb-1.0-0-dev xz-utils ocl-icd-opencl-dev opencl-headers \
apt-utils gpg-agent software-properties-common wget python3-dev libpython3-dev python3-pip
apt-utils gpg-agent software-properties-common wget python3-dev libpython3-dev python3-pip nasm yasm
}

config_git_users() {
Expand Down Expand Up @@ -103,11 +103,27 @@ build_install_ivsr_sdk() {
echo "Build ivsr sdk finished."
}

build_install_svt_av1() {
echo "Building and installing SVT-AV1 library..."
svtav1_repo=https://gitlab.com/AOMediaCodec/SVT-AV1.git
svtav1_branch=v4.0.1
ivsr_svtav1_dir=${base_dir}/ivsr_svtav1/SVT-AV1
if [ ! -d "${ivsr_svtav1_dir}" ]; then
git clone --depth 1 --branch ${svtav1_branch} ${svtav1_repo} ${ivsr_svtav1_dir}
git config --global --add safe.directory ${ivsr_svtav1_dir}
fi
cd ${ivsr_svtav1_dir}/Build
cmake .. -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release
make -j$(nproc)
sudo make install
echo "Build svt-av1 finished."
}

build_ffmpeg() {
echo "Building FFMPEG with specific libraries support..."
sudo -E apt-get update && \
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y --no-install-recommends \
ca-certificates tar g++ wget pkg-config nasm yasm libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev \
ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev \
python3-dev libx11-dev libxv-dev libxt-dev libasound2-dev libpango1.0-dev libtheora-dev libvisual-0.4-dev libgl1-mesa-dev \
libcurl4-gnutls-dev librtmp-dev libx264-dev libx265-dev libde265-dev libva-dev libtbb-dev

Expand All @@ -124,6 +140,10 @@ build_ffmpeg() {
cd ${ffmpeg_dir} && cp -rf $base_dir/ivsr_ffmpeg_plugin/patches/*.patch .
git am --whitespace=fix *.patch

# patches for SVT-AV1
git am --whitespace=fix ${base_dir}/ivsr_svtav1/SVT-AV1/.gitlab/workflows/linux/0001-avcodec-libsvtav1-unbreak-build-with-latest-svtav1.patch
git am --whitespace=fix ${base_dir}/ivsr_svtav1/SVT-AV1/.gitlab/workflows/linux/0001-avcodec-libsvtav1-rename-aq_mode-for-v4.0.0.patch

./configure \
--enable-gpl \
--enable-nonfree \
Expand All @@ -133,7 +153,8 @@ build_ffmpeg() {
--enable-version3 \
--enable-libivsr \
--enable-libx264 \
--enable-libx265
--enable-libx265 \
--enable-libsvtav1

make -j$(nproc)
sudo make install
Expand Down Expand Up @@ -173,6 +194,7 @@ main() {
install_openvino_from_apt "$ov_version"
fi
build_install_ivsr_sdk
build_install_svt_av1
build_ffmpeg
}

Expand Down
19 changes: 18 additions & 1 deletion ivsr_ffmpeg_plugin/dockerfiles/rockylinux9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,20 @@ RUN wget ${LIBX265} && \
make -j16 && \
make install

# Build SVT-AV1
ARG SVTAV1_VER="v4.0.1"
ARG SVTAV1_REPO="https://gitlab.com/AOMediaCodec/SVT-AV1.git"
ARG SVTAV1_DIR=${WORKSPACE}/ivsr/svt-av1
WORKDIR ${SVTAV1_DIR}
RUN git clone ${SVTAV1_REPO} . && \
git checkout ${SVTAV1_VER} && \
cd Build && \
cmake .. -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release && \
make -j$(nproc) && \
make install

ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
ENV LD_LIBRARY_PATH=${IVSR_SDK_DIR}/lib:/usr/local/lib:$LD_LIBRARY_PATH
ENV LD_LIBRARY_PATH=${IVSR_SDK_DIR}/lib:/usr/local/lib64:/usr/local/lib:$LD_LIBRARY_PATH

ARG FFMPEG_IVSR_SDK_PLUGIN_DIR=${IVSR_DIR}/ivsr_ffmpeg_plugin
ARG FFMPEG_DIR=${FFMPEG_IVSR_SDK_PLUGIN_DIR}/ffmpeg
Expand All @@ -206,6 +218,10 @@ RUN { set -e; \
git am --whitespace=fix ${patch_file}; \
done; }

# patches for SVT-AV1
RUN git am --whitespace=fix ${SVTAV1_DIR}/.gitlab/workflows/linux/0001-avcodec-libsvtav1-unbreak-build-with-latest-svtav1.patch &&\
git am --whitespace=fix ${SVTAV1_DIR}/.gitlab/workflows/linux/0001-avcodec-libsvtav1-rename-aq_mode-for-v4.0.0.patch

RUN ./configure \
--extra-cflags=-fopenmp \
--extra-ldflags=-fopenmp \
Expand All @@ -216,6 +232,7 @@ RUN ./configure \
--enable-gpl \
--enable-libx264 \
--enable-libx265 \
--enable-libsvtav1 \
--enable-version3 && \
make -j16 && \
make install
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,20 @@ RUN wget ${LIBX265} && \
make -j16 && \
make install

# Build SVT-AV1
ARG SVTAV1_VER="v4.0.1"
ARG SVTAV1_REPO="https://gitlab.com/AOMediaCodec/SVT-AV1.git"
ARG SVTAV1_DIR=${WORKSPACE}/ivsr/svt-av1
WORKDIR ${SVTAV1_DIR}
RUN git clone ${SVTAV1_REPO} . && \
git checkout ${SVTAV1_VER} && \
cd Build && \
cmake .. -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release && \
make -j$(nproc) && \
make install

ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
ENV LD_LIBRARY_PATH=${IVSR_SDK_DIR}/lib:/usr/local/lib:$LD_LIBRARY_PATH
ENV LD_LIBRARY_PATH=${IVSR_SDK_DIR}/lib:/usr/local/lib64:/usr/local/lib:$LD_LIBRARY_PATH

ARG FFMPEG_IVSR_SDK_PLUGIN_DIR=${IVSR_DIR}/ivsr_ffmpeg_plugin
ARG FFMPEG_DIR=${FFMPEG_IVSR_SDK_PLUGIN_DIR}/ffmpeg
Expand All @@ -119,6 +131,10 @@ RUN { set -e; \
git am --whitespace=fix ${patch_file}; \
done; }

# patches for SVT-AV1
RUN git am --whitespace=fix ${SVTAV1_DIR}/.gitlab/workflows/linux/0001-avcodec-libsvtav1-unbreak-build-with-latest-svtav1.patch &&\
git am --whitespace=fix ${SVTAV1_DIR}/.gitlab/workflows/linux/0001-avcodec-libsvtav1-rename-aq_mode-for-v4.0.0.patch

RUN ./configure \
--extra-cflags=-fopenmp \
--extra-ldflags=-fopenmp \
Expand All @@ -129,6 +145,7 @@ RUN ./configure \
--enable-gpl \
--enable-libx264 \
--enable-libx265 \
--enable-libsvtav1 \
--enable-version3 && \
make -j16 && \
make install
Expand Down
21 changes: 19 additions & 2 deletions ivsr_ffmpeg_plugin/dockerfiles/ubuntu22/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ RUN apt-get update && \
pkg-config \
xz-utils \
ocl-icd-opencl-dev \
opencl-headers && \
opencl-headers nasm yasm && \
rm -rf /var/lib/apt/lists/*

ARG PYTHON
Expand Down Expand Up @@ -249,10 +249,22 @@ RUN cmake .. \
make install && \
echo "Building vsr sdk finished."

# Build SVT-AV1
ARG SVTAV1_VER="v4.0.1"
ARG SVTAV1_REPO="https://gitlab.com/AOMediaCodec/SVT-AV1.git"
ARG SVTAV1_DIR=${WORKSPACE}/ivsr/svt-av1
WORKDIR ${SVTAV1_DIR}
RUN git clone ${SVTAV1_REPO} . && \
git checkout ${SVTAV1_VER} && \
cd Build && \
cmake .. -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release && \
make -j$(nproc) && \
make install

#build ffmpeg with iVSR SDK backend
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ca-certificates tar g++ wget pkg-config nasm yasm libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev python3-dev \
ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev python3-dev \
libx11-dev \
libxv-dev \
libxt-dev \
Expand Down Expand Up @@ -286,6 +298,10 @@ RUN { set -e; \
git am --whitespace=fix ${patch_file}; \
done; }

# patches for SVT-AV1
RUN git am --whitespace=fix ${SVTAV1_DIR}/.gitlab/workflows/linux/0001-avcodec-libsvtav1-unbreak-build-with-latest-svtav1.patch &&\
git am --whitespace=fix ${SVTAV1_DIR}/.gitlab/workflows/linux/0001-avcodec-libsvtav1-rename-aq_mode-for-v4.0.0.patch

RUN if [ -f "${CUSTOM_OV_INSTALL_DIR}/setvars.sh" ]; then \
. ${CUSTOM_OV_INSTALL_DIR}/setvars.sh ; \
fi && \
Expand All @@ -301,6 +317,7 @@ RUN if [ -f "${CUSTOM_OV_INSTALL_DIR}/setvars.sh" ]; then \
--enable-gpl \
--enable-libx264 \
--enable-libx265 \
--enable-libsvtav1 \
--enable-version3 && \
make -j16 && \
make install
Expand Down
22 changes: 19 additions & 3 deletions ivsr_ffmpeg_plugin/dockerfiles/ubuntu22/ov2024.5.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ ARG PYTHON
RUN apt-get update && \
apt-get install -y --no-install-recommends --fix-missing \
apt-utils cmake cython3 flex bison gcc g++ git make patch pkg-config wget \
libdrm-dev libudev-dev libtool libusb-1.0-0-dev xz-utils ocl-icd-opencl-dev opencl-headers \
libdrm-dev libudev-dev libtool libusb-1.0-0-dev xz-utils ocl-icd-opencl-dev opencl-headers nasm yasm \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

# Install Python and pip
Expand Down Expand Up @@ -142,10 +142,22 @@ RUN mkdir -p build && cd build && \
make install && \
echo "Building iVSR SDK finished."

# Build SVT-AV1
ARG SVTAV1_VER="v4.0.1"
ARG SVTAV1_REPO="https://gitlab.com/AOMediaCodec/SVT-AV1.git"
ARG SVTAV1_DIR=${WORKSPACE}/ivsr/svt-av1
WORKDIR ${SVTAV1_DIR}
RUN git clone ${SVTAV1_REPO} . && \
git checkout ${SVTAV1_VER} && \
cd Build && \
cmake .. -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release && \
make -j$(nproc) && \
make install

# Install FFmpeg dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates tar g++ wget pkg-config nasm yasm libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev \
ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev \
python3-dev libx11-dev libxv-dev libxt-dev libasound2-dev libpango1.0-dev libtheora-dev libvisual-0.4-dev libgl1-mesa-dev \
libcurl4-gnutls-dev librtmp-dev libx264-dev libx265-dev libde265-dev libva-dev && \
rm -rf /var/lib/apt/lists/*
Expand All @@ -163,6 +175,10 @@ RUN for patch_file in $(find -iname "*.patch" | sort -n); do \
git am --whitespace=fix ${patch_file}; \
done

# patches for SVT-AV1
RUN git am --whitespace=fix ${SVTAV1_DIR}/.gitlab/workflows/linux/0001-avcodec-libsvtav1-unbreak-build-with-latest-svtav1.patch &&\
git am --whitespace=fix ${SVTAV1_DIR}/.gitlab/workflows/linux/0001-avcodec-libsvtav1-rename-aq_mode-for-v4.0.0.patch

RUN sed -i 's|-L${prefix}/runtime/3rdparty/tbb|-L${prefix}/runtime/3rdparty/tbb/lib|' \
${CUSTOM_IE_DIR}/lib/intel64/pkgconfig/openvino.pc

Expand All @@ -171,7 +187,7 @@ RUN source ${CUSTOM_IE_DIR}/../setupvars.sh && \
export LD_LIBRARY_PATH=${WORKSPACE}/ivsr/ivsr_sdk/lib:"$LD_LIBRARY_PATH" && \
./configure --extra-cflags=-fopenmp --extra-ldflags=-fopenmp \
--enable-libivsr --disable-static --disable-doc --enable-shared \
--enable-vaapi --enable-gpl --enable-libx264 --enable-libx265 --enable-version3 && \
--enable-vaapi --enable-gpl --enable-libx264 --enable-libx265 --enable-libsvtav1 --enable-version3 && \
make -j16 && \
make install

Expand Down
19 changes: 18 additions & 1 deletion ivsr_ffmpeg_plugin/dockerfiles/ubuntu22/ov2024.5s.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,18 @@ RUN mkdir -p build && cd build && \
make install && \
echo "Building iVSR SDK finished."

# Build SVT-AV1
ARG SVTAV1_VER="v4.0.1"
ARG SVTAV1_REPO="https://gitlab.com/AOMediaCodec/SVT-AV1.git"
ARG SVTAV1_DIR=${WORKSPACE}/ivsr/svt-av1
WORKDIR ${SVTAV1_DIR}
RUN git clone ${SVTAV1_REPO} . && \
git checkout ${SVTAV1_VER} && \
cd Build && \
cmake .. -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release && \
make -j$(nproc) && \
make install

# Build and install FFmpeg with libopenvino support
# FFmpeg setup and build
ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg.git
Expand All @@ -108,6 +120,10 @@ RUN for patch_file in $(find -iname "*.patch" | sort -n); do \
git am --whitespace=fix ${patch_file}; \
done

# patches for SVT-AV1
RUN git am --whitespace=fix ${SVTAV1_DIR}/.gitlab/workflows/linux/0001-avcodec-libsvtav1-unbreak-build-with-latest-svtav1.patch &&\
git am --whitespace=fix ${SVTAV1_DIR}/.gitlab/workflows/linux/0001-avcodec-libsvtav1-rename-aq_mode-for-v4.0.0.patch

RUN ./configure \
--enable-gpl \
--enable-nonfree \
Expand All @@ -117,7 +133,8 @@ RUN ./configure \
--enable-version3 \
--enable-libivsr \
--enable-libx264 \
--enable-libx265 && \
--enable-libx265 \
--enable-libsvtav1 && \
make -j16 && \
make install

Expand Down