mirror of
https://github.com/xiph/opus.git
synced 2025-05-14 23:48:28 +00:00
add option for neural fec and add dred test
Signed-off-by: Marcus Asteborg <maastebo@microsoft.com> Signed-off-by: Jean-Marc Valin <jmvalin@amazon.com>
This commit is contained in:
parent
4d8b52b804
commit
75872236da
2 changed files with 24 additions and 0 deletions
|
@ -79,6 +79,10 @@ set(OPUS_INSTALL_CMAKE_CONFIG_MODULE_HELP_STR "install CMake package config modu
|
|||
option(OPUS_INSTALL_CMAKE_CONFIG_MODULE ${OPUS_INSTALL_CMAKE_CONFIG_MODULE_HELP_STR} ON)
|
||||
add_feature_info(OPUS_INSTALL_CMAKE_CONFIG_MODULE OPUS_INSTALL_CMAKE_CONFIG_MODULE ${OPUS_INSTALL_CMAKE_CONFIG_MODULE_HELP_STR})
|
||||
|
||||
set(OPUS_NEURAL_FEC_HELP_STR "enable neural FEC.")
|
||||
option(OPUS_NEURAL_FEC ${OPUS_NEURAL_FEC_HELP_STR} OFF)
|
||||
add_feature_info(OPUS_NEURAL_FEC OPUS_NEURAL_FEC ${OPUS_NEURAL_FEC_HELP_STR})
|
||||
|
||||
if(APPLE)
|
||||
set(OPUS_BUILD_FRAMEWORK_HELP_STR "build Framework bundle for Apple systems.")
|
||||
option(OPUS_BUILD_FRAMEWORK ${OPUS_BUILD_FRAMEWORK_HELP_STR} OFF)
|
||||
|
@ -367,6 +371,13 @@ if(NOT OPUS_ENABLE_FLOAT_API)
|
|||
target_compile_definitions(opus PRIVATE DISABLE_FLOAT_API)
|
||||
endif()
|
||||
|
||||
if (OPUS_NEURAL_FEC)
|
||||
target_compile_definitions(opus PRIVATE ENABLE_NEURAL_FEC)
|
||||
if(NOT OPUS_NEURAL_PLC)
|
||||
target_compile_definitions(opus PRIVATE NEURAL_PLC)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT OPUS_DISABLE_INTRINSICS)
|
||||
if(((OPUS_X86_MAY_HAVE_SSE AND NOT OPUS_X86_PRESUME_SSE) OR
|
||||
(OPUS_X86_MAY_HAVE_SSE2 AND NOT OPUS_X86_PRESUME_SSE2) OR
|
||||
|
@ -655,4 +666,15 @@ if(BUILD_TESTING AND NOT BUILD_SHARED_LIBS)
|
|||
-DTEST_EXECUTABLE=$<TARGET_FILE:test_opus_extensions>
|
||||
-DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}
|
||||
-P "${PROJECT_SOURCE_DIR}/cmake/RunTest.cmake")
|
||||
if(OPUS_NEURAL_FEC)
|
||||
add_executable(test_opus_dred ${test_opus_dred_sources})
|
||||
target_include_directories(test_opus_dred
|
||||
PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
||||
target_link_libraries(test_opus_dred PRIVATE opus)
|
||||
target_compile_definitions(test_opus_dred PRIVATE OPUS_BUILD)
|
||||
add_test(NAME test_opus_dred COMMAND ${CMAKE_COMMAND}
|
||||
-DTEST_EXECUTABLE=$<TARGET_FILE:test_opus_dred>
|
||||
-DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}
|
||||
-P "${PROJECT_SOURCE_DIR}/cmake/RunTest.cmake")
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
@ -52,3 +52,5 @@ get_opus_sources(tests_test_opus_decode_SOURCES Makefile.am
|
|||
test_opus_decode_sources)
|
||||
get_opus_sources(tests_test_opus_padding_SOURCES Makefile.am
|
||||
test_opus_padding_sources)
|
||||
get_opus_sources(tests_test_opus_dred_SOURCES Makefile.am
|
||||
test_opus_dred_sources)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue