Skip to content

Commit 25f4a31

Browse files
committed
(re)build libheif with X265 encoder instead of kvazaar
1 parent 62d4bfc commit 25f4a31

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

docker/Dockerfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,34 @@ ARG TARGETPLATFORM
88
COPY . .
99
RUN docker/build.sh
1010

11+
#===== proper libheif ======
12+
13+
# Install x265 build dependency
14+
RUN apt-get update && apt-get install -y \
15+
ninja-build cmake git curl libx265-dev nasm libde265-dev
16+
17+
# Rebuild libheif with x265 instead of kvazaar
18+
RUN git clone --depth 1 --branch v1.21.2 https://github.com/strukturag/libheif.git /tmp/libheif \
19+
&& cd /tmp/libheif \
20+
&& curl -Ls https://github.com/DarthSim/libheif/commit/d63ec62d93ab1420c8cf76378af2a806aeb5292d.patch | git apply \
21+
&& mkdir _build && cd _build \
22+
&& CFLAGS="-O3" CXXFLAGS="-O3" cmake \
23+
-G"Ninja" \
24+
-DCMAKE_BUILD_TYPE=Release \
25+
-DCMAKE_INSTALL_PREFIX=/opt/imgproxy \
26+
--preset=release-noplugins \
27+
-DBUILD_SHARED_LIBS=1 \
28+
-DWITH_EXAMPLES=0 \
29+
-DWITH_KVAZAAR=0 \
30+
-DWITH_X265=1 \
31+
-DWITH_DAV1D=1 \
32+
-DWITH_DAV1D_PLUGIN=0 \
33+
-DWITH_AOM_DECODER=0 \
34+
-DWITH_AOM_ENCODER=0 \
35+
.. \
36+
&& ninja install/strip \
37+
&& rm -rf /tmp/libheif
38+
1139
# ==================================================================================================
1240
# Final image
1341

0 commit comments

Comments
 (0)