Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 10ae6e9

Browse filesBrowse files
committed
Adding 8, 10, and 12 bit pixel formats for x265
1 parent 643aaca commit 10ae6e9
Copy full SHA for 10ae6e9

File tree

Expand file treeCollapse file tree

1 file changed

+36
-9
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+36
-9
lines changed

‎build-ffmpeg

Copy file name to clipboardExpand all lines: build-ffmpeg
+36-9Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ elif [[ -f /proc/cpuinfo ]]; then
3434
elif [[ "$OSTYPE" == "darwin"* ]]; then
3535
MJOBS=$(sysctl -n machdep.cpu.thread_count)
3636
CONFIGURE_OPTIONS=("--enable-videotoolbox")
37+
MACOS_LIBTOOL="$(which libtool)" # gnu libtool is installed in this script and need to avoid name conflict
3738
else
3839
MJOBS=4
3940
fi
@@ -460,7 +461,7 @@ if build "cmake" "3.21.0"; then
460461
fi
461462

462463
if ! $MACOS_M1; then
463-
if build "svtav1" $(date -I); then
464+
if build "svtav1" "$(date)"; then
464465
execute rm -f "${PACKAGES}/SVT-AV1-master.tar.gz"
465466
download "https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/master/SVT-AV1-master.tar.gz"
466467
cd Build/linux || exit
@@ -469,7 +470,7 @@ if ! $MACOS_M1; then
469470
execute make install
470471
execute cp SvtAv1Enc.pc "${WORKSPACE}/lib/pkgconfig/"
471472
execute cp SvtAv1Dec.pc "${WORKSPACE}/lib/pkgconfig/"
472-
build_done "svtav1" $(date -I)
473+
build_done "svtav1" "$(date)";
473474
fi
474475
CONFIGURE_OPTIONS+=("--enable-libsvtav1")
475476
fi
@@ -507,11 +508,37 @@ fi
507508

508509
if $NONFREE_AND_GPL; then
509510
if build "x265" "3.5"; then
510-
download "https://github.com/videolan/x265/archive/Release_3.5.tar.gz" "x265-3.5.tar.gz"
511+
download "https://github.com/videolan/x265/archive/Release_3.5.tar.gz" "x265-3.5.tar.gz" # This is actually 3.4 if looking at x265Version.txt
511512
cd build/linux || exit
512-
513-
execute cmake -DCMAKE_INSTALL_PREFIX="${WORKSPACE}" -DHIGH_BIT_DEPTH=ON -DENABLE_HDR10_PLUS=ON -DENABLE_SHARED=off -DBUILD_SHARED_LIBS=OFF ../../source
513+
rm -rf 8bit 10bit 12bit
514+
mkdir 8bit 10bit 12bit
515+
cd 12bit || exit
516+
execute cmake ../../../source -DCMAKE_INSTALL_PREFIX="${WORKSPACE}" -DENABLE_SHARED=OFF -DBUILD_SHARED_LIBS=OFF -DHIGH_BIT_DEPTH=ON -DENABLE_HDR10_PLUS=ON -DEXPORT_C_API=OFF -DENABLE_CLI=OFF -DMAIN12=ON
517+
execute make -j $MJOBS
518+
cd ../10bit || exit
519+
execute cmake ../../../source -DCMAKE_INSTALL_PREFIX="${WORKSPACE}" -DENABLE_SHARED=OFF -DBUILD_SHARED_LIBS=OFF -DHIGH_BIT_DEPTH=ON -DENABLE_HDR10_PLUS=ON -DEXPORT_C_API=OFF -DENABLE_CLI=OFF
514520
execute make -j $MJOBS
521+
cd ../8bit || exit
522+
ln -sf ../10bit/libx265.a libx265_main10.a
523+
ln -sf ../12bit/libx265.a libx265_main12.a
524+
execute cmake ../../../source -DCMAKE_INSTALL_PREFIX="${WORKSPACE}" -DENABLE_SHARED=OFF -DBUILD_SHARED_LIBS=OFF -DEXTRA_LIB="x265_main10.a;x265_main12.a;-ldl" -DEXTRA_LINK_FLAGS=-L. -DLINKED_10BIT=ON -DLINKED_12BIT=ON
525+
execute make -j $MJOBS
526+
527+
mv libx265.a libx265_main.a
528+
529+
if [[ "$OSTYPE" == "darwin"* ]]; then
530+
execute "${MACOS_LIBTOOL}" -static -o libx265.a libx265_main.a libx265_main10.a libx265_main12.a 2>/dev/null
531+
else
532+
execute ar -M <<EOF
533+
CREATE libx265.a
534+
ADDLIB libx265_main.a
535+
ADDLIB libx265_main10.a
536+
ADDLIB libx265_main12.a
537+
SAVE
538+
END
539+
EOF
540+
fi
541+
515542
execute make install
516543

517544
if [ -n "$LDEXEFLAGS" ]; then
@@ -712,7 +739,7 @@ CONFIGURE_OPTIONS+=("--enable-libwebp")
712739
if build "zimg" "3.0.3"; then
713740
download "https://github.com/sekrit-twc/zimg/archive/refs/tags/release-3.0.3.tar.gz" "zimg-3.0.3.tar.gz" "zimg"
714741
cd zimg-release-3.0.3 || exit
715-
execute ${WORKSPACE}/bin/libtoolize -i -f -q
742+
execute "${WORKSPACE}/bin/libtoolize" -i -f -q
716743
execute ./autogen.sh --prefix="${WORKSPACE}"
717744
execute ./configure --prefix="${WORKSPACE}" --enable-static --disable-shared
718745
execute make -j $MJOBS
@@ -790,9 +817,9 @@ if [[ "$OSTYPE" == "linux-gnu" ]]; then
790817

791818
if build "amf" "1.4.21.0"; then
792819
download "https://github.com/GPUOpen-LibrariesAndSDKs/AMF/archive/refs/tags/v.1.4.21.tar.gz" "AMF-1.4.21.tar.gz" "AMF-1.4.21"
793-
execute rm -rf ${WORKSPACE}/include/AMF
794-
execute mkdir -p ${WORKSPACE}/include/AMF
795-
execute cp -r ${PACKAGES}/AMF-1.4.21/AMF-v.1.4.21/amf/public/include/* ${WORKSPACE}/include/AMF/
820+
execute rm -rf "${WORKSPACE}/include/AMF"
821+
execute mkdir -p "${WORKSPACE}/include/AMF"
822+
execute cp -r "${PACKAGES}"/AMF-1.4.21/AMF-v.1.4.21/amf/public/include/* "${WORKSPACE}/include/AMF/"
796823
build_done "amf" "1.4.21.0"
797824
fi
798825
CONFIGURE_OPTIONS+=("--enable-amf")

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.