Skip to content

Commit

Permalink
Add ENABLE_SSE2 option
Browse files Browse the repository at this point in the history
This forces to include/not include the SSE2 source files.

Default value is still auto detected.
  • Loading branch information
Asd-g committed Jan 12, 2024
1 parent 16e215f commit e24e13f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ message(STATUS "Enable Intel HW decoding: ${ENABLE_MFX}.")
option(ENABLE_XML2S "Enable DNXHD support" ON)
message(STATUS "Enable DNXHD support: ${ENABLE_XML2S}.")

cmake_host_system_information(RESULT sse2 QUERY HAS_SSE2)
option(ENABLE_SSE2 "Enable SSE2 support" ${sse2})
message(STATUS "Enable SSE2 support: ${ENABLE_SSE2}.")

set(sources
${CMAKE_CURRENT_SOURCE_DIR}/common/decode.c
${CMAKE_CURRENT_SOURCE_DIR}/common/libavsmash.c
Expand All @@ -40,15 +44,11 @@ set(sources
${CMAKE_CURRENT_SOURCE_DIR}/common/xxhash.c
)

cmake_host_system_information(RESULT sse2 QUERY HAS_SSE2)
if (${sse2})
if (ENABLE_SSE2)
set(sources
${sources}
${CMAKE_CURRENT_SOURCE_DIR}/common/planar_yuv_sse2.c
)
message(STATUS "SSE2 enabled.")
else()
message(STATUS "SSE2 disabled.")
endif()

if (BUILD_AVS_PLUGIN)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ If you have issues about the file names save the AviSynth script (`.avs`) as UTF
| ENABLE_DAV1D | Enable dav1d AV1 decoding | ON |
| ENABLE_MFX | Enable Intel HW decoding | ON |
| ENABLE_XML2S | Enable DNXHD support | ON |
| ENABLE_SSE2 | Force SSE2 | ON |

0 comments on commit e24e13f

Please sign in to comment.