Skip to content

Commit e24e13f

Browse files
committed
Add ENABLE_SSE2 option
This forces to include/not include the SSE2 source files. Default value is still auto detected.
1 parent 16e215f commit e24e13f

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ message(STATUS "Enable Intel HW decoding: ${ENABLE_MFX}.")
2323
option(ENABLE_XML2S "Enable DNXHD support" ON)
2424
message(STATUS "Enable DNXHD support: ${ENABLE_XML2S}.")
2525

26+
cmake_host_system_information(RESULT sse2 QUERY HAS_SSE2)
27+
option(ENABLE_SSE2 "Enable SSE2 support" ${sse2})
28+
message(STATUS "Enable SSE2 support: ${ENABLE_SSE2}.")
29+
2630
set(sources
2731
${CMAKE_CURRENT_SOURCE_DIR}/common/decode.c
2832
${CMAKE_CURRENT_SOURCE_DIR}/common/libavsmash.c
@@ -40,15 +44,11 @@ set(sources
4044
${CMAKE_CURRENT_SOURCE_DIR}/common/xxhash.c
4145
)
4246

43-
cmake_host_system_information(RESULT sse2 QUERY HAS_SSE2)
44-
if (${sse2})
47+
if (ENABLE_SSE2)
4548
set(sources
4649
${sources}
4750
${CMAKE_CURRENT_SOURCE_DIR}/common/planar_yuv_sse2.c
4851
)
49-
message(STATUS "SSE2 enabled.")
50-
else()
51-
message(STATUS "SSE2 disabled.")
5252
endif()
5353

5454
if (BUILD_AVS_PLUGIN)

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ If you have issues about the file names save the AviSynth script (`.avs`) as UTF
1919
| ENABLE_DAV1D | Enable dav1d AV1 decoding | ON |
2020
| ENABLE_MFX | Enable Intel HW decoding | ON |
2121
| ENABLE_XML2S | Enable DNXHD support | ON |
22+
| ENABLE_SSE2 | Force SSE2 | ON |

0 commit comments

Comments
 (0)