Skip to content

Commit cd588bb

Browse files
committed
REBUILD
1 parent c751e7b commit cd588bb

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

build-ffmpeg.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ shift 1
1111
cd $SRC_DIR
1212

1313
if [ $BUILD_TYPE == "static" ]; then
14+
CFLAGS="$CFLAGS /MT"
1415
TYPE_ARGS="--enable-static"
1516
else
17+
CFLAGS="$CFLAGS /MD"
1618
TYPE_ARGS="--enable-shared"
1719
fi
1820
if [[ $BUILD_ARCH =~ arm ]]; then
@@ -22,7 +24,7 @@ fi
2224
if [ $BUILD_LICENSE == "gpl" ]; then
2325
LICENSE_ARGS="--enable-gpl --enable-version3"
2426
fi
25-
CFLAGS="$CFLAGS -I${SRC_DIR}/compat/stdbit"
27+
CFLAGS="$CFLAGS -I${SRC_DIR}/compat/stdbit "
2628
EX_BUILD_ARGS="$TYPE_ARGS $CROSS_ARGS $LICENSE_ARGS"
2729

2830
./configure --toolchain=msvc --arch=$BUILD_ARCH $EX_BUILD_ARGS $@

build.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ if [ "$BUILD_LICENSE" == "gpl" ]; then
4949
fi
5050

5151
if [ "$BUILD_ARCH" == arm ]; then
52+
git -C x265_git apply ../x265_git-arm.patch
5253
X265_ARGS="$X265_ARGS -DCMAKE_SYSTEM_PROCESSOR=armv7l -DENABLE_ASSEMBLY=ON -DCROSS_COMPILE_ARM=ON"
5354
elif [ "$BUILD_ARCH" == arm64 ]; then
5455
X265_ARGS="$X265_ARGS -DCMAKE_SYSTEM_PROCESSOR=arm64 -DENABLE_ASSEMBLY=ON -DCROSS_COMPILE_ARM64=ON"
@@ -58,6 +59,9 @@ if [ "$BUILD_LICENSE" == "gpl" ]; then
5859
./build-cmake-dep.sh x265_git/source -DENABLE_SHARED=$ENABLE_SHARED -DENABLE_CLI=OFF $X265_ARGS
5960
FF_ARGS="$FF_ARGS --enable-libx265"
6061

62+
if [ "$BUILD_TYPE" == "shared" ]; then
63+
git -C x264 apply ../x264-${BUILD_TYPE}.patch
64+
fi
6165
if [[ "$BUILD_ARCH" =~ arm ]]; then
6266
X264_ARGS="--disable-asm"
6367
fi

x265_git-arm.patch

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
diff --git a/source/common/cpu.h b/source/common/cpu.h
2+
index 52a9e9cba..103432442 100644
3+
--- a/source/common/cpu.h
4+
+++ b/source/common/cpu.h
5+
@@ -38,8 +38,9 @@ extern "C" void PFX(safe_intel_cpu_indicator_init)(void);
6+
#if _MSC_VER && _WIN64
7+
#define x265_emms() PFX(cpu_emms)()
8+
#elif _MSC_VER
9+
-#include <mmintrin.h>
10+
-#define x265_emms() _mm_empty()
11+
+#define x265_emms() PFX(cpu_emms)()
12+
+// #include <mmintrin.h>
13+
+// #define x265_emms() _mm_empty()
14+
#elif __GNUC__
15+
// Cannot use _mm_empty() directly without compiling all the source with
16+
// a fixed CPU arch, which we would like to avoid at the moment

0 commit comments

Comments
 (0)