File tree Expand file tree Collapse file tree 3 files changed +23
-1
lines changed
Expand file tree Collapse file tree 3 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,10 @@ shift 1
1111cd $SRC_DIR
1212
1313if [ $BUILD_TYPE == " static" ]; then
14+ CFLAGS=" $CFLAGS /MT"
1415 TYPE_ARGS=" --enable-static"
1516else
17+ CFLAGS=" $CFLAGS /MD"
1618 TYPE_ARGS=" --enable-shared"
1719fi
1820if [[ $BUILD_ARCH =~ arm ]]; then
2224if [ $BUILD_LICENSE == " gpl" ]; then
2325 LICENSE_ARGS=" --enable-gpl --enable-version3"
2426fi
25- CFLAGS=" $CFLAGS -I${SRC_DIR} /compat/stdbit"
27+ CFLAGS=" $CFLAGS -I${SRC_DIR} /compat/stdbit "
2628EX_BUILD_ARGS=" $TYPE_ARGS $CROSS_ARGS $LICENSE_ARGS "
2729
2830./configure --toolchain=msvc --arch=$BUILD_ARCH $EX_BUILD_ARGS $@
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments