Use nanors for optimized Reed-Solomon FEC decoding (#125)

This commit is contained in:
Andy Grundman
2026-02-19 00:36:52 -05:00
committed by GitHub
parent 1d0e91d91a
commit de364b6ecd
16 changed files with 5493 additions and 689 deletions
+12 -2
View File
@@ -17,7 +17,6 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ${CMAKE_POSITION_INDEPENDENT_CODE_BACKUP})
unset(CMAKE_POSITION_INDEPENDENT_CODE_BACKUP)
aux_source_directory(src SRC_LIST)
aux_source_directory(reedsolomon SRC_LIST)
# Build shared library by default, but allows user override
if (NOT DEFINED BUILD_SHARED_LIBS)
@@ -107,7 +106,18 @@ endif()
target_include_directories(moonlight-common-c SYSTEM PUBLIC src)
target_include_directories(moonlight-common-c PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/reedsolomon
${CMAKE_CURRENT_SOURCE_DIR}/nanors
${CMAKE_CURRENT_SOURCE_DIR}/nanors/deps/obl
)
target_compile_definitions(moonlight-common-c PRIVATE HAS_SOCKLEN_T)
# nanors
if (MSVC)
set_source_files_properties("${CMAKE_SOURCE_DIR}/src/rswrapper.c"
DIRECTORY "${CMAKE_SOURCE_DIR}")
else()
set_source_files_properties("${CMAKE_SOURCE_DIR}/src/rswrapper.c"
DIRECTORY "${CMAKE_SOURCE_DIR}"
PROPERTIES COMPILE_FLAGS "-ftree-vectorize -funroll-loops")
endif()