- upgrade to opus 1.5.2 + fix Opus CMakeLists for macOS ARM + fix rtphone macOS build

This commit is contained in:
Dmytro Bogovych 2025-08-21 12:17:04 +03:00
parent b8c107fb5b
commit 375bf64275
155 changed files with 12510 additions and 6714 deletions

View File

@ -15,6 +15,7 @@ option (USE_MUSL "Build with MUSL library" OFF)
# PIC code by default # PIC code by default
set (CMAKE_POSITION_INDEPENDENT_CODE ON) set (CMAKE_POSITION_INDEPENDENT_CODE ON)
set (RUNTIME_CPU_CAPABILITY_DETECTION ON)
set (LIB_PLATFORM ${CMAKE_CURRENT_SOURCE_DIR}/libs/libraries) set (LIB_PLATFORM ${CMAKE_CURRENT_SOURCE_DIR}/libs/libraries)
include (${LIB_PLATFORM}/platform_libs.cmake) include (${LIB_PLATFORM}/platform_libs.cmake)

View File

@ -191,8 +191,8 @@ static AmrPayload parseAmrPayload(AmrPayloadInfo& input)
} }
else else
{ {
ICELogError(<< "Problem parsing AMR header: octet-aligned is set, available " << input.mPayloadLength - byteOffset ICELogError(<< "Problem parsing AMR header: octet-aligned is set, available " << int(input.mPayloadLength - byteOffset)
<< " bytes but requested " << byteLength); << " bytes but requested " << (int)byteLength);
result.mDiscardPacket = true; result.mDiscardPacket = true;
continue; continue;
} }

View File

@ -151,7 +151,7 @@ void NetworkHelper::reload(int networkType)
} }
#else #else
mIPList.clear(); mIPList.clear();
#if defined(TARGET_OS_IPHONE) #if TARGET_OS_IPHONE
ICELogDebug(<< "Obtaining IPv4 interfaces."); ICELogDebug(<< "Obtaining IPv4 interfaces.");
fillIosInterfaceList(AF_INET, networkType, mIPList); fillIosInterfaceList(AF_INET, networkType, mIPList);
ICELogDebug(<< "Obtaining IPv6 interfaces."); ICELogDebug(<< "Obtaining IPv6 interfaces.");

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1) cmake_minimum_required(VERSION 3.16)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(OpusPackageVersion) include(OpusPackageVersion)
@ -71,6 +71,10 @@ set(OPUS_CHECK_ASM_HELP_STR "enable bit-exactness checks between optimized and c
option(OPUS_CHECK_ASM ${OPUS_CHECK_ASM_HELP_STR} OFF) option(OPUS_CHECK_ASM ${OPUS_CHECK_ASM_HELP_STR} OFF)
add_feature_info(OPUS_CHECK_ASM OPUS_CHECK_ASM ${OPUS_CHECK_ASM_HELP_STR}) add_feature_info(OPUS_CHECK_ASM OPUS_CHECK_ASM ${OPUS_CHECK_ASM_HELP_STR})
set(OPUS_DNN_FLOAT_DEBUG_HELP_STR "Run DNN computations as float for debugging purposes.")
option(OPUS_DNN_FLOAT_DEBUG ${OPUS_DNN_FLOAT_DEBUG_HELP_STR} OFF)
add_feature_info(OPUS_DNN_FLOAT_DEBUG OPUS_DNN_FLOAT_DEBUG ${OPUS_DNN_FLOAT_DEBUG_HELP_STR})
set(OPUS_INSTALL_PKG_CONFIG_MODULE_HELP_STR "install pkg-config module.") set(OPUS_INSTALL_PKG_CONFIG_MODULE_HELP_STR "install pkg-config module.")
option(OPUS_INSTALL_PKG_CONFIG_MODULE ${OPUS_INSTALL_PKG_CONFIG_MODULE_HELP_STR} ON) option(OPUS_INSTALL_PKG_CONFIG_MODULE ${OPUS_INSTALL_PKG_CONFIG_MODULE_HELP_STR} ON)
add_feature_info(OPUS_INSTALL_PKG_CONFIG_MODULE OPUS_INSTALL_PKG_CONFIG_MODULE ${OPUS_INSTALL_PKG_CONFIG_MODULE_HELP_STR}) add_feature_info(OPUS_INSTALL_PKG_CONFIG_MODULE OPUS_INSTALL_PKG_CONFIG_MODULE ${OPUS_INSTALL_PKG_CONFIG_MODULE_HELP_STR})
@ -79,12 +83,26 @@ 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) 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}) add_feature_info(OPUS_INSTALL_CMAKE_CONFIG_MODULE OPUS_INSTALL_CMAKE_CONFIG_MODULE ${OPUS_INSTALL_CMAKE_CONFIG_MODULE_HELP_STR})
set(OPUS_DRED_HELP_STR "enable DRED.")
option(OPUS_DRED ${OPUS_DRED_HELP_STR} OFF)
add_feature_info(OPUS_DRED OPUS_DRED ${OPUS_DRED_HELP_STR})
set(OPUS_OSCE_HELP_STR "enable OSCE.")
option(OPUS_OSCE ${OPUS_OSCE_HELP_STR} OFF)
add_feature_info(OPUS_OSCE OPUS_OSCE ${OPUS_OSCE_HELP_STR})
if(APPLE) if(APPLE)
set(OPUS_BUILD_FRAMEWORK_HELP_STR "build Framework bundle for Apple systems.") set(OPUS_BUILD_FRAMEWORK_HELP_STR "build Framework bundle for Apple systems.")
option(OPUS_BUILD_FRAMEWORK ${OPUS_BUILD_FRAMEWORK_HELP_STR} OFF) option(OPUS_BUILD_FRAMEWORK ${OPUS_BUILD_FRAMEWORK_HELP_STR} OFF)
add_feature_info(OPUS_BUILD_FRAMEWORK OPUS_BUILD_FRAMEWORK ${OPUS_BUILD_FRAMEWORK_HELP_STR}) add_feature_info(OPUS_BUILD_FRAMEWORK OPUS_BUILD_FRAMEWORK ${OPUS_BUILD_FRAMEWORK_HELP_STR})
endif() endif()
if(MSVC)
set(OPUS_STATIC_RUNTIME_HELP_STR "build with static runtime library.")
option(OPUS_STATIC_RUNTIME ${OPUS_STATIC_RUNTIME_HELP_STR} OFF)
add_feature_info(OPUS_STATIC_RUNTIME OPUS_STATIC_RUNTIME ${OPUS_STATIC_RUNTIME_HELP_STR})
endif()
set(OPUS_FIXED_POINT_DEBUG_HELP_STR "debug fixed-point implementation.") set(OPUS_FIXED_POINT_DEBUG_HELP_STR "debug fixed-point implementation.")
cmake_dependent_option(OPUS_FIXED_POINT_DEBUG cmake_dependent_option(OPUS_FIXED_POINT_DEBUG
${OPUS_FIXED_POINT_DEBUG_HELP_STR} ${OPUS_FIXED_POINT_DEBUG_HELP_STR}
@ -168,18 +186,18 @@ if(OPUS_CPU_X86 OR OPUS_CPU_X64)
set(OPUS_X86_MAY_HAVE_SSE4_1_HELP_STR "does runtime check for SSE4.1 support.") set(OPUS_X86_MAY_HAVE_SSE4_1_HELP_STR "does runtime check for SSE4.1 support.")
cmake_dependent_option(OPUS_X86_MAY_HAVE_SSE4_1 cmake_dependent_option(OPUS_X86_MAY_HAVE_SSE4_1
${OPUS_X86_MAY_HAVE_SSE4_1_HELP_STR} ${OPUS_X86_MAY_HAVE_SSE4_1_HELP_STR}
OFF ON
"SSE4_1_SUPPORTED; NOT OPUS_DISABLE_INTRINSICS" "SSE4_1_SUPPORTED; NOT OPUS_DISABLE_INTRINSICS"
OFF) OFF)
add_feature_info(OPUS_X86_MAY_HAVE_SSE4_1 OPUS_X86_MAY_HAVE_SSE4_1 ${OPUS_X86_MAY_HAVE_SSE4_1_HELP_STR}) add_feature_info(OPUS_X86_MAY_HAVE_SSE4_1 OPUS_X86_MAY_HAVE_SSE4_1 ${OPUS_X86_MAY_HAVE_SSE4_1_HELP_STR})
set(OPUS_X86_MAY_HAVE_AVX_HELP_STR "does runtime check for AVX support.") set(OPUS_X86_MAY_HAVE_AVX2_HELP_STR "does runtime check for AVX FMA AVX2 support.")
cmake_dependent_option(OPUS_X86_MAY_HAVE_AVX cmake_dependent_option(OPUS_X86_MAY_HAVE_AVX2
${OPUS_X86_MAY_HAVE_AVX_HELP_STR} ${OPUS_X86_MAY_HAVE_AVX2_HELP_STR}
ON ON
"AVX_SUPPORTED; NOT OPUS_DISABLE_INTRINSICS" "AVX2_SUPPORTED; NOT OPUS_DISABLE_INTRINSICS"
OFF) OFF)
add_feature_info(OPUS_X86_MAY_HAVE_AVX OPUS_X86_MAY_HAVE_AVX ${OPUS_X86_MAY_HAVE_AVX_HELP_STR}) add_feature_info(OPUS_X86_MAY_HAVE_AVX2 OPUS_X86_MAY_HAVE_AVX2 ${OPUS_X86_MAY_HAVE_AVX2_HELP_STR})
# PRESUME depends on MAY HAVE, but PRESUME will override runtime detection # PRESUME depends on MAY HAVE, but PRESUME will override runtime detection
set(OPUS_X86_PRESUME_SSE_HELP_STR "assume target CPU has SSE1 support (override runtime check).") set(OPUS_X86_PRESUME_SSE_HELP_STR "assume target CPU has SSE1 support (override runtime check).")
@ -187,13 +205,13 @@ if(OPUS_CPU_X86 OR OPUS_CPU_X64)
if(OPUS_CPU_X64) # Assume x86_64 has up to SSE2 support if(OPUS_CPU_X64) # Assume x86_64 has up to SSE2 support
cmake_dependent_option(OPUS_X86_PRESUME_SSE cmake_dependent_option(OPUS_X86_PRESUME_SSE
${OPUS_X86_PRESUME_SSE_HELP_STR} ${OPUS_X86_PRESUME_SSE_HELP_STR}
OFF ON
"OPUS_X86_MAY_HAVE_SSE; NOT OPUS_DISABLE_INTRINSICS" "OPUS_X86_MAY_HAVE_SSE; NOT OPUS_DISABLE_INTRINSICS"
OFF) OFF)
cmake_dependent_option(OPUS_X86_PRESUME_SSE2 cmake_dependent_option(OPUS_X86_PRESUME_SSE2
${OPUS_X86_PRESUME_SSE2_HELP_STR} ${OPUS_X86_PRESUME_SSE2_HELP_STR}
OFF ON
"OPUS_X86_MAY_HAVE_SSE2; NOT OPUS_DISABLE_INTRINSICS" "OPUS_X86_MAY_HAVE_SSE2; NOT OPUS_DISABLE_INTRINSICS"
OFF) OFF)
else() else()
@ -220,13 +238,13 @@ if(OPUS_CPU_X86 OR OPUS_CPU_X64)
OFF) OFF)
add_feature_info(OPUS_X86_PRESUME_SSE4_1 OPUS_X86_PRESUME_SSE4_1 ${OPUS_X86_PRESUME_SSE4_1_HELP_STR}) add_feature_info(OPUS_X86_PRESUME_SSE4_1 OPUS_X86_PRESUME_SSE4_1 ${OPUS_X86_PRESUME_SSE4_1_HELP_STR})
set(OPUS_X86_PRESUME_AVX_HELP_STR "assume target CPU has AVX support (override runtime check).") set(OPUS_X86_PRESUME_AVX2_HELP_STR "assume target CPU has AVX FMA AVX2 support (override runtime check).")
cmake_dependent_option(OPUS_X86_PRESUME_AVX cmake_dependent_option(OPUS_X86_PRESUME_AVX2
${OPUS_X86_PRESUME_AVX_HELP_STR} ${OPUS_X86_PRESUME_AVX2_HELP_STR}
OFF OFF
"OPUS_X86_MAY_HAVE_AVX; NOT OPUS_DISABLE_INTRINSICS" "OPUS_X86_MAY_HAVE_AVX2; NOT OPUS_DISABLE_INTRINSICS"
OFF) OFF)
add_feature_info(OPUS_X86_PRESUME_AVX OPUS_X86_PRESUME_AVX ${OPUS_X86_PRESUME_AVX_HELP_STR}) add_feature_info(OPUS_X86_PRESUME_AVX2 OPUS_X86_PRESUME_AVX2 ${OPUS_X86_PRESUME_AVX2_HELP_STR})
endif() endif()
feature_summary(WHAT ALL) feature_summary(WHAT ALL)
@ -253,11 +271,17 @@ if(OPUS_CUSTOM_MODES)
list(APPEND Opus_PUBLIC_HEADER ${CMAKE_CURRENT_SOURCE_DIR}/include/opus_custom.h) list(APPEND Opus_PUBLIC_HEADER ${CMAKE_CURRENT_SOURCE_DIR}/include/opus_custom.h)
endif() endif()
if(MSVC)
if(OPUS_STATIC_RUNTIME)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
else()
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
endif()
endif()
add_library(opus ${opus_headers} ${opus_sources} ${opus_sources_float} ${Opus_PUBLIC_HEADER}) add_library(opus ${opus_headers} ${opus_sources} ${opus_sources_float} ${Opus_PUBLIC_HEADER})
add_library(Opus::opus ALIAS opus) add_library(Opus::opus ALIAS opus)
set_property(TARGET opus PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
get_library_version(OPUS_LIBRARY_VERSION OPUS_LIBRARY_VERSION_MAJOR) get_library_version(OPUS_LIBRARY_VERSION OPUS_LIBRARY_VERSION_MAJOR)
message(DEBUG "Opus library version: ${OPUS_LIBRARY_VERSION}") message(DEBUG "Opus library version: ${OPUS_LIBRARY_VERSION}")
@ -276,6 +300,7 @@ target_include_directories(
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/opus> $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/opus>
PRIVATE ${CMAKE_CURRENT_BINARY_DIR} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/dnn
celt celt
silk) silk)
@ -311,6 +336,10 @@ if(OPUS_CHECK_ASM)
target_compile_definitions(opus PRIVATE OPUS_CHECK_ASM) target_compile_definitions(opus PRIVATE OPUS_CHECK_ASM)
endif() endif()
if(NOT OPUS_DNN_FLOAT_DEBUG)
target_compile_definitions(opus PRIVATE DISABLE_DEBUG_FLOAT)
endif()
if(OPUS_VAR_ARRAYS) if(OPUS_VAR_ARRAYS)
target_compile_definitions(opus PRIVATE VAR_ARRAYS) target_compile_definitions(opus PRIVATE VAR_ARRAYS)
elseif(OPUS_USE_ALLOCA) elseif(OPUS_USE_ALLOCA)
@ -367,12 +396,33 @@ if(NOT OPUS_ENABLE_FLOAT_API)
target_compile_definitions(opus PRIVATE DISABLE_FLOAT_API) target_compile_definitions(opus PRIVATE DISABLE_FLOAT_API)
endif() endif()
if (OPUS_DEEP_PLC OR OPUS_DRED OR OPUS_OSCE)
add_sources_group(opus lpcnet ${deep_plc_headers} ${deep_plc_sources})
set(OPUS_DNN TRUE)
else()
set(OPUS_DNN FALSE)
endif()
if (OPUS_DNN)
add_sources_group(opus lpcnet ${deep_plc_headers} ${deep_plc_sources})
target_compile_definitions(opus PRIVATE ENABLE_DEEP_PLC)
endif()
if (OPUS_DRED)
add_sources_group(opus lpcnet ${dred_headers} ${dred_sources})
target_compile_definitions(opus PRIVATE ENABLE_DRED)
endif()
if (OPUS_OSCE)
add_sources_group(opus lpcnet ${osce_headers} ${osce_sources})
target_compile_definitions(opus PRIVATE ENABLE_OSCE)
endif()
if(NOT OPUS_DISABLE_INTRINSICS) if(NOT OPUS_DISABLE_INTRINSICS)
if(((OPUS_X86_MAY_HAVE_SSE AND NOT OPUS_X86_PRESUME_SSE) OR 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 (OPUS_X86_MAY_HAVE_SSE2 AND NOT OPUS_X86_PRESUME_SSE2) OR
(OPUS_X86_MAY_HAVE_SSE4_1 AND NOT OPUS_X86_PRESUME_SSE4_1) OR (OPUS_X86_MAY_HAVE_SSE4_1 AND NOT OPUS_X86_PRESUME_SSE4_1) OR
(OPUS_X86_MAY_HAVE_AVX AND NOT OPUS_X86_PRESUME_AVX)) AND (OPUS_X86_MAY_HAVE_AVX2 AND NOT OPUS_X86_PRESUME_AVX2)))
RUNTIME_CPU_CAPABILITY_DETECTION)
target_compile_definitions(opus PRIVATE OPUS_HAVE_RTCD) target_compile_definitions(opus PRIVATE OPUS_HAVE_RTCD)
if(NOT MSVC) if(NOT MSVC)
if(CPU_INFO_BY_ASM_SUPPORTED) if(CPU_INFO_BY_ASM_SUPPORTED)
@ -385,6 +435,9 @@ if(NOT OPUS_DISABLE_INTRINSICS)
endif() endif()
add_sources_group(opus celt ${celt_sources_x86_rtcd}) add_sources_group(opus celt ${celt_sources_x86_rtcd})
add_sources_group(opus silk ${silk_sources_x86_rtcd}) add_sources_group(opus silk ${silk_sources_x86_rtcd})
if (OPUS_DNN)
add_sources_group(opus lpcnet ${dnn_sources_x86_rtcd})
endif()
endif() endif()
if(SSE1_SUPPORTED) if(SSE1_SUPPORTED)
@ -406,9 +459,12 @@ if(NOT OPUS_DISABLE_INTRINSICS)
if(SSE2_SUPPORTED) if(SSE2_SUPPORTED)
if(OPUS_X86_MAY_HAVE_SSE2) if(OPUS_X86_MAY_HAVE_SSE2)
add_sources_group(opus celt ${celt_sources_sse2}) add_sources_group(opus celt ${celt_sources_sse2})
if (OPUS_DNN)
add_sources_group(opus lpcnet ${dnn_sources_sse2})
endif()
target_compile_definitions(opus PRIVATE OPUS_X86_MAY_HAVE_SSE2) target_compile_definitions(opus PRIVATE OPUS_X86_MAY_HAVE_SSE2)
if(NOT MSVC) if(NOT MSVC)
set_source_files_properties(${celt_sources_sse2} PROPERTIES COMPILE_FLAGS -msse2) set_source_files_properties(${celt_sources_sse2} ${dnn_sources_sse2} PROPERTIES COMPILE_FLAGS -msse2)
endif() endif()
endif() endif()
if(OPUS_X86_PRESUME_SSE2) if(OPUS_X86_PRESUME_SSE2)
@ -423,9 +479,12 @@ if(NOT OPUS_DISABLE_INTRINSICS)
if(OPUS_X86_MAY_HAVE_SSE4_1) if(OPUS_X86_MAY_HAVE_SSE4_1)
add_sources_group(opus celt ${celt_sources_sse4_1}) add_sources_group(opus celt ${celt_sources_sse4_1})
add_sources_group(opus silk ${silk_sources_sse4_1}) add_sources_group(opus silk ${silk_sources_sse4_1})
if (OPUS_DNN)
add_sources_group(opus lpcnet ${dnn_sources_sse4_1})
endif()
target_compile_definitions(opus PRIVATE OPUS_X86_MAY_HAVE_SSE4_1) target_compile_definitions(opus PRIVATE OPUS_X86_MAY_HAVE_SSE4_1)
if(NOT MSVC) if(NOT MSVC)
set_source_files_properties(${celt_sources_sse4_1} ${silk_sources_sse4_1} PROPERTIES COMPILE_FLAGS -msse4.1) set_source_files_properties(${celt_sources_sse4_1} ${silk_sources_sse4_1} ${dnn_sources_sse4_1} PROPERTIES COMPILE_FLAGS -msse4.1)
endif() endif()
if(OPUS_FIXED_POINT) if(OPUS_FIXED_POINT)
@ -443,22 +502,37 @@ if(NOT OPUS_DISABLE_INTRINSICS)
endif() endif()
endif() endif()
if(AVX_SUPPORTED) if(AVX2_SUPPORTED)
# mostly placeholder in case of avx intrinsics is added if(OPUS_X86_MAY_HAVE_AVX2)
if(OPUS_X86_MAY_HAVE_AVX) add_sources_group(opus celt ${celt_sources_avx2})
target_compile_definitions(opus PRIVATE OPUS_X86_MAY_HAVE_AVX) add_sources_group(opus silk ${silk_sources_avx2})
add_sources_group(opus silk ${silk_sources_float_avx2})
if (OPUS_DNN)
add_sources_group(opus lpcnet ${dnn_sources_avx2})
endif()
target_compile_definitions(opus PRIVATE OPUS_X86_MAY_HAVE_AVX2)
if(MSVC)
set(AVX2_FLAGS "${AVX2_FLAGS} /arch:AVX2")
else()
set(AVX2_FLAGS "${AVX2_FLAGS} -mavx2 -mfma -mavx")
endif()
set_source_files_properties(${celt_sources_avx2} PROPERTIES COMPILE_FLAGS ${AVX2_FLAGS})
set_source_files_properties(${silk_sources_avx2} PROPERTIES COMPILE_FLAGS ${AVX2_FLAGS})
set_source_files_properties(${silk_sources_float_avx2} PROPERTIES COMPILE_FLAGS ${AVX2_FLAGS})
set_source_files_properties(${dnn_sources_avx2} PROPERTIES COMPILE_FLAGS ${AVX2_FLAGS})
endif() endif()
if(OPUS_X86_PRESUME_AVX) if(OPUS_X86_PRESUME_AVX2)
target_compile_definitions(opus PRIVATE OPUS_X86_PRESUME_AVX) target_compile_definitions(opus PRIVATE OPUS_X86_PRESUME_AVX2)
target_compile_definitions(opus PRIVATE OPUS_X86_PRESUME_SSE4_1)
if(NOT MSVC) if(NOT MSVC)
target_compile_options(opus PRIVATE -mavx) target_compile_options(opus PRIVATE -mavx2 -mfma -mavx)
endif() endif()
endif() endif()
endif() endif()
if(MSVC) if(MSVC)
if(AVX_SUPPORTED AND OPUS_X86_PRESUME_AVX) # on 64 bit and 32 bits if(AVX2_SUPPORTED AND OPUS_X86_PRESUME_AVX2) # on 64 bit and 32 bits
add_definitions(/arch:AVX) add_definitions(/arch:AVX2)
elseif(OPUS_CPU_X86) # if AVX not supported then set SSE flag elseif(OPUS_CPU_X86) # if AVX not supported then set SSE flag
if((SSE4_1_SUPPORTED AND OPUS_X86_PRESUME_SSE4_1) if((SSE4_1_SUPPORTED AND OPUS_X86_PRESUME_SSE4_1)
OR (SSE2_SUPPORTED AND OPUS_X86_PRESUME_SSE2)) OR (SSE2_SUPPORTED AND OPUS_X86_PRESUME_SSE2))
@ -471,7 +545,7 @@ if(NOT OPUS_DISABLE_INTRINSICS)
if(COMPILER_SUPPORT_NEON) if(COMPILER_SUPPORT_NEON)
if(OPUS_MAY_HAVE_NEON) if(OPUS_MAY_HAVE_NEON)
if(RUNTIME_CPU_CAPABILITY_DETECTION) if(TRUE)
message(STATUS "OPUS_MAY_HAVE_NEON enabling runtime detection") message(STATUS "OPUS_MAY_HAVE_NEON enabling runtime detection")
target_compile_definitions(opus PRIVATE OPUS_HAVE_RTCD) target_compile_definitions(opus PRIVATE OPUS_HAVE_RTCD)
add_sources_group(opus celt ${celt_sources_arm_rtcd}) add_sources_group(opus celt ${celt_sources_arm_rtcd})
@ -488,6 +562,9 @@ if(NOT OPUS_DISABLE_INTRINSICS)
add_sources_group(opus celt ${celt_sources_arm_neon_intr}) add_sources_group(opus celt ${celt_sources_arm_neon_intr})
add_sources_group(opus silk ${silk_sources_arm_neon_intr}) add_sources_group(opus silk ${silk_sources_arm_neon_intr})
if (OPUS_DNN)
add_sources_group(opus lpcnet ${dnn_sources_arm_neon})
endif()
# silk arm neon depends on main_Fix.h # silk arm neon depends on main_Fix.h
target_include_directories(opus PRIVATE silk/fixed) target_include_directories(opus PRIVATE silk/fixed)
@ -529,5 +606,138 @@ install(TARGETS opus
FRAMEWORK DESTINATION ${CMAKE_INSTALL_PREFIX} FRAMEWORK DESTINATION ${CMAKE_INSTALL_PREFIX}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/opus) PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/opus)
if(OPUS_INSTALL_PKG_CONFIG_MODULE)
set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix ${CMAKE_INSTALL_PREFIX})
set(libdir ${CMAKE_INSTALL_FULL_LIBDIR})
set(includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR})
set(VERSION ${PACKAGE_VERSION})
if(HAVE_LIBM)
set(LIBM "-lm")
endif()
configure_file(opus.pc.in opus.pc)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/opus.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
endif()
if(OPUS_INSTALL_CMAKE_CONFIG_MODULE)
set(CPACK_GENERATOR TGZ)
include(CPack)
set(CMAKE_INSTALL_PACKAGEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
install(EXPORT OpusTargets
NAMESPACE Opus::
DESTINATION ${CMAKE_INSTALL_PACKAGEDIR})
include(CMakePackageConfigHelpers)
set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR})
configure_package_config_file(${PROJECT_SOURCE_DIR}/cmake/OpusConfig.cmake.in
OpusConfig.cmake
INSTALL_DESTINATION
${CMAKE_INSTALL_PACKAGEDIR}
PATH_VARS
INCLUDE_INSTALL_DIR
INSTALL_PREFIX
${CMAKE_INSTALL_PREFIX})
write_basic_package_version_file(OpusConfigVersion.cmake
VERSION ${PROJECT_VERSION}
COMPATIBILITY SameMajorVersion)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/OpusConfig.cmake
${CMAKE_CURRENT_BINARY_DIR}/OpusConfigVersion.cmake
DESTINATION ${CMAKE_INSTALL_PACKAGEDIR})
endif()
if(OPUS_BUILD_PROGRAMS)
# demo
if(OPUS_CUSTOM_MODES)
add_executable(opus_custom_demo ${opus_custom_demo_sources})
target_include_directories(opus_custom_demo
PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
target_link_libraries(opus_custom_demo PRIVATE opus)
target_compile_definitions(opus_custom_demo PRIVATE OPUS_BUILD)
endif()
add_executable(opus_demo ${opus_demo_sources})
target_include_directories(opus_demo PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
target_include_directories(opus_demo PRIVATE silk) # debug.h
target_include_directories(opus_demo PRIVATE celt) # arch.h
target_include_directories(opus_demo PRIVATE dnn)
target_link_libraries(opus_demo PRIVATE opus ${OPUS_REQUIRED_LIBRARIES})
target_compile_definitions(opus_demo PRIVATE OPUS_BUILD)
# compare
add_executable(opus_compare ${opus_compare_sources})
target_include_directories(opus_compare PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
target_link_libraries(opus_compare PRIVATE opus ${OPUS_REQUIRED_LIBRARIES})
endif()
if(BUILD_TESTING AND NOT BUILD_SHARED_LIBS)
enable_testing()
# tests
add_executable(test_opus_decode ${test_opus_decode_sources})
target_include_directories(test_opus_decode
PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
target_link_libraries(test_opus_decode PRIVATE opus)
target_compile_definitions(test_opus_decode PRIVATE OPUS_BUILD)
if(OPUS_FIXED_POINT)
target_compile_definitions(test_opus_decode PRIVATE DISABLE_FLOAT_API)
endif()
add_test(NAME test_opus_decode COMMAND ${CMAKE_COMMAND}
-DTEST_EXECUTABLE=$<TARGET_FILE:test_opus_decode>
-DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}
-P "${PROJECT_SOURCE_DIR}/cmake/RunTest.cmake")
add_executable(test_opus_padding ${test_opus_padding_sources})
target_include_directories(test_opus_padding
PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
target_link_libraries(test_opus_padding PRIVATE opus)
add_test(NAME test_opus_padding COMMAND ${CMAKE_COMMAND}
-DTEST_EXECUTABLE=$<TARGET_FILE:test_opus_padding>
-DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}
-P "${PROJECT_SOURCE_DIR}/cmake/RunTest.cmake")
add_executable(test_opus_api ${test_opus_api_sources})
target_include_directories(test_opus_api
PRIVATE ${CMAKE_CURRENT_BINARY_DIR} celt)
target_link_libraries(test_opus_api PRIVATE opus)
target_compile_definitions(test_opus_api PRIVATE OPUS_BUILD)
if(OPUS_FIXED_POINT)
target_compile_definitions(test_opus_api PRIVATE DISABLE_FLOAT_API)
endif()
add_test(NAME test_opus_api COMMAND ${CMAKE_COMMAND}
-DTEST_EXECUTABLE=$<TARGET_FILE:test_opus_api>
-DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}
-P "${PROJECT_SOURCE_DIR}/cmake/RunTest.cmake")
add_executable(test_opus_encode ${test_opus_encode_sources})
target_include_directories(test_opus_encode
PRIVATE ${CMAKE_CURRENT_BINARY_DIR} celt dnn)
target_link_libraries(test_opus_encode PRIVATE opus)
target_compile_definitions(test_opus_encode PRIVATE OPUS_BUILD)
add_test(NAME test_opus_encode COMMAND ${CMAKE_COMMAND}
-DTEST_EXECUTABLE=$<TARGET_FILE:test_opus_encode>
-DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}
-P "${PROJECT_SOURCE_DIR}/cmake/RunTest.cmake")
add_executable(test_opus_extensions ${test_opus_extensions_sources})
target_include_directories(test_opus_extensions
PRIVATE ${CMAKE_CURRENT_BINARY_DIR} celt dnn)
target_link_libraries(test_opus_extensions PRIVATE opus)
target_compile_definitions(test_opus_extensions PRIVATE OPUS_BUILD)
add_test(NAME test_opus_extensions COMMAND ${CMAKE_COMMAND}
-DTEST_EXECUTABLE=$<TARGET_FILE:test_opus_extensions>
-DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}
-P "${PROJECT_SOURCE_DIR}/cmake/RunTest.cmake")
if(OPUS_DRED)
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()

View File

@ -1,7 +1,7 @@
Copyright 2001-2011 Xiph.Org, Skype Limited, Octasic, Copyright 2001-2023 Xiph.Org, Skype Limited, Octasic,
Jean-Marc Valin, Timothy B. Terriberry, Jean-Marc Valin, Timothy B. Terriberry,
CSIRO, Gregory Maxwell, Mark Borgerding, CSIRO, Gregory Maxwell, Mark Borgerding,
Erik de Castro Lopo Erik de Castro Lopo, Mozilla, Amazon
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions modification, are permitted provided that the following conditions

View File

@ -1,8 +1,8 @@
Installation Instructions Installation Instructions
************************* *************************
Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software Copyright (C) 1994-1996, 1999-2002, 2004-2017, 2020-2021 Free
Foundation, Inc. Software Foundation, Inc.
Copying and distribution of this file, with or without modification, Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright are permitted in any medium without royalty provided the copyright
@ -225,7 +225,7 @@ order to use an ANSI C compiler:
and if that doesn't work, install pre-built binaries of GCC for HP-UX. and if that doesn't work, install pre-built binaries of GCC for HP-UX.
HP-UX 'make' updates targets which have the same time stamps as their HP-UX 'make' updates targets which have the same timestamps as their
prerequisites, which makes it generally unusable when shipped generated prerequisites, which makes it generally unusable when shipped generated
files such as 'configure' are involved. Use GNU 'make' instead. files such as 'configure' are involved. Use GNU 'make' instead.

View File

@ -10,12 +10,25 @@ lib_LTLIBRARIES = libopus.la
DIST_SUBDIRS = doc DIST_SUBDIRS = doc
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/celt -I$(top_srcdir)/silk \ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/celt -I$(top_srcdir)/silk \
-I$(top_srcdir)/silk/float -I$(top_srcdir)/silk/fixed $(NE10_CFLAGS) -I$(top_srcdir)/silk/float -I$(top_srcdir)/silk/fixed $(NE10_CFLAGS) \
-I$(top_srcdir)/dnn
include celt_sources.mk include celt_sources.mk
include lpcnet_sources.mk
include silk_sources.mk include silk_sources.mk
include opus_sources.mk include opus_sources.mk
LPCNET_SOURCES =
if ENABLE_DEEP_PLC
LPCNET_SOURCES += $(DEEP_PLC_SOURCES)
endif
if ENABLE_DRED
LPCNET_SOURCES += $(DRED_SOURCES)
endif
if ENABLE_OSCE
LPCNET_SOURCES += $(OSCE_SOURCES)
endif
if FIXED_POINT if FIXED_POINT
SILK_SOURCES += $(SILK_SOURCES_FIXED) SILK_SOURCES += $(SILK_SOURCES_FIXED)
if HAVE_SSE4_1 if HAVE_SSE4_1
@ -29,6 +42,9 @@ SILK_SOURCES += $(SILK_SOURCES_FLOAT)
if HAVE_SSE4_1 if HAVE_SSE4_1
SILK_SOURCES += $(SILK_SOURCES_SSE4_1) SILK_SOURCES += $(SILK_SOURCES_SSE4_1)
endif endif
if HAVE_AVX2
SILK_SOURCES += $(SILK_SOURCES_FLOAT_AVX2)
endif
endif endif
if DISABLE_FLOAT_API if DISABLE_FLOAT_API
@ -40,15 +56,31 @@ if CPU_X86
if HAVE_RTCD if HAVE_RTCD
CELT_SOURCES += $(CELT_SOURCES_X86_RTCD) CELT_SOURCES += $(CELT_SOURCES_X86_RTCD)
SILK_SOURCES += $(SILK_SOURCES_X86_RTCD) SILK_SOURCES += $(SILK_SOURCES_X86_RTCD)
if ENABLE_DEEP_PLC
LPCNET_SOURCES += $(DNN_SOURCES_X86_RTCD)
endif
endif endif
if HAVE_SSE if HAVE_SSE
CELT_SOURCES += $(CELT_SOURCES_SSE) CELT_SOURCES += $(CELT_SOURCES_SSE)
endif endif
if HAVE_SSE2 if HAVE_SSE2
CELT_SOURCES += $(CELT_SOURCES_SSE2) CELT_SOURCES += $(CELT_SOURCES_SSE2)
if ENABLE_DEEP_PLC
LPCNET_SOURCES += $(DNN_SOURCES_SSE2)
endif
endif endif
if HAVE_SSE4_1 if HAVE_SSE4_1
CELT_SOURCES += $(CELT_SOURCES_SSE4_1) CELT_SOURCES += $(CELT_SOURCES_SSE4_1)
if ENABLE_DEEP_PLC
LPCNET_SOURCES += $(DNN_SOURCES_SSE4_1)
endif
endif
if HAVE_AVX2
SILK_SOURCES += $(SILK_SOURCES_AVX2)
CELT_SOURCES += $(CELT_SOURCES_AVX2)
if ENABLE_DEEP_PLC
LPCNET_SOURCES += $(DNN_SOURCES_AVX2)
endif
endif endif
endif endif
@ -56,6 +88,18 @@ if CPU_ARM
if HAVE_RTCD if HAVE_RTCD
CELT_SOURCES += $(CELT_SOURCES_ARM_RTCD) CELT_SOURCES += $(CELT_SOURCES_ARM_RTCD)
SILK_SOURCES += $(SILK_SOURCES_ARM_RTCD) SILK_SOURCES += $(SILK_SOURCES_ARM_RTCD)
if ENABLE_DEEP_PLC
LPCNET_SOURCES += $(DNN_SOURCES_ARM_RTCD)
endif
endif
if ENABLE_DEEP_PLC
if HAVE_ARM_DOTPROD
LPCNET_SOURCES += $(DNN_SOURCES_DOTPROD)
endif
if HAVE_ARM_NEON_INTR
LPCNET_SOURCES += $(DNN_SOURCES_NEON)
endif
endif endif
if HAVE_ARM_NEON_INTR if HAVE_ARM_NEON_INTR
@ -80,10 +124,25 @@ CLEANFILES = $(CELT_SOURCES_ARM_ASM:.s=-gnu.S) \
$(CELT_AM_SOURCES_ARM_ASM:.s.in=-gnu.S) $(CELT_AM_SOURCES_ARM_ASM:.s.in=-gnu.S)
include celt_headers.mk include celt_headers.mk
include lpcnet_headers.mk
include silk_headers.mk include silk_headers.mk
include opus_headers.mk include opus_headers.mk
libopus_la_SOURCES = $(CELT_SOURCES) $(SILK_SOURCES) $(OPUS_SOURCES) LPCNET_HEAD =
if ENABLE_DEEP_PLC
LPCNET_HEAD += $(DEEP_PLC_HEAD)
endif
if ENABLE_DRED
LPCNET_HEAD += $(DRED_HEAD)
endif
if ENABLE_OSCE
LPCNET_HEAD += $(OSCE_HEAD)
endif
if ENABLE_LOSSGEN
LPCNET_HEAD += $(LOSSGEN_HEAD)
endif
libopus_la_SOURCES = $(CELT_SOURCES) $(SILK_SOURCES) $(LPCNET_SOURCES) $(OPUS_SOURCES)
libopus_la_LDFLAGS = -no-undefined -version-info @OPUS_LT_CURRENT@:@OPUS_LT_REVISION@:@OPUS_LT_AGE@ libopus_la_LDFLAGS = -no-undefined -version-info @OPUS_LT_CURRENT@:@OPUS_LT_REVISION@:@OPUS_LT_AGE@
libopus_la_LIBADD = $(NE10_LIBS) $(LIBM) libopus_la_LIBADD = $(NE10_LIBS) $(LIBM)
if OPUS_ARM_EXTERNAL_ASM if OPUS_ARM_EXTERNAL_ASM
@ -92,7 +151,7 @@ endif
pkginclude_HEADERS = include/opus.h include/opus_multistream.h include/opus_types.h include/opus_defines.h include/opus_projection.h pkginclude_HEADERS = include/opus.h include/opus_multistream.h include/opus_types.h include/opus_defines.h include/opus_projection.h
noinst_HEADERS = $(OPUS_HEAD) $(SILK_HEAD) $(CELT_HEAD) noinst_HEADERS = $(OPUS_HEAD) $(SILK_HEAD) $(CELT_HEAD) $(LPCNET_HEAD)
if EXTRA_PROGRAMS if EXTRA_PROGRAMS
noinst_PROGRAMS = celt/tests/test_unit_cwrs32 \ noinst_PROGRAMS = celt/tests/test_unit_cwrs32 \
@ -109,7 +168,9 @@ noinst_PROGRAMS = celt/tests/test_unit_cwrs32 \
silk/tests/test_unit_LPC_inv_pred_gain \ silk/tests/test_unit_LPC_inv_pred_gain \
tests/test_opus_api \ tests/test_opus_api \
tests/test_opus_decode \ tests/test_opus_decode \
tests/test_opus_dred \
tests/test_opus_encode \ tests/test_opus_encode \
tests/test_opus_extensions \
tests/test_opus_padding \ tests/test_opus_padding \
tests/test_opus_projection \ tests/test_opus_projection \
trivial_example trivial_example
@ -126,10 +187,14 @@ TESTS = celt/tests/test_unit_cwrs32 \
tests/test_opus_api \ tests/test_opus_api \
tests/test_opus_decode \ tests/test_opus_decode \
tests/test_opus_encode \ tests/test_opus_encode \
tests/test_opus_extensions \
tests/test_opus_padding \ tests/test_opus_padding \
tests/test_opus_projection tests/test_opus_projection
opus_demo_SOURCES = src/opus_demo.c opus_demo_SOURCES = src/opus_demo.c
if ENABLE_LOSSGEN
opus_demo_SOURCES += $(LOSSGEN_SOURCES)
endif
opus_demo_LDADD = libopus.la $(NE10_LIBS) $(LIBM) opus_demo_LDADD = libopus.la $(NE10_LIBS) $(LIBM)
@ -155,18 +220,28 @@ tests_test_opus_decode_LDADD = libopus.la $(NE10_LIBS) $(LIBM)
tests_test_opus_padding_SOURCES = tests/test_opus_padding.c tests/test_opus_common.h tests_test_opus_padding_SOURCES = tests/test_opus_padding.c tests/test_opus_common.h
tests_test_opus_padding_LDADD = libopus.la $(NE10_LIBS) $(LIBM) tests_test_opus_padding_LDADD = libopus.la $(NE10_LIBS) $(LIBM)
tests_test_opus_dred_SOURCES = tests/test_opus_dred.c tests/test_opus_common.h
tests_test_opus_dred_LDADD = libopus.la $(NE10_LIBS) $(LIBM)
CELT_OBJ = $(CELT_SOURCES:.c=.lo) CELT_OBJ = $(CELT_SOURCES:.c=.lo)
SILK_OBJ = $(SILK_SOURCES:.c=.lo) SILK_OBJ = $(SILK_SOURCES:.c=.lo)
LPCNET_OBJ = $(LPCNET_SOURCES:.c=.lo)
OPUS_OBJ = $(OPUS_SOURCES:.c=.lo) OPUS_OBJ = $(OPUS_SOURCES:.c=.lo)
tests_test_opus_extensions_SOURCES = tests/test_opus_extensions.c tests/test_opus_common.h
tests_test_opus_extensions_LDADD = $(OPUS_OBJ) $(SILK_OBJ) $(LPCNET_OBJ) $(CELT_OBJ) $(NE10_LIBS) $(LIBM)
if OPUS_ARM_EXTERNAL_ASM
tests_test_opus_extensions_LDADD += libarmasm.la
endif
tests_test_opus_projection_SOURCES = tests/test_opus_projection.c tests/test_opus_common.h tests_test_opus_projection_SOURCES = tests/test_opus_projection.c tests/test_opus_common.h
tests_test_opus_projection_LDADD = $(OPUS_OBJ) $(SILK_OBJ) $(CELT_OBJ) $(NE10_LIBS) $(LIBM) tests_test_opus_projection_LDADD = $(OPUS_OBJ) $(SILK_OBJ) $(LPCNET_OBJ) $(CELT_OBJ) $(NE10_LIBS) $(LIBM)
if OPUS_ARM_EXTERNAL_ASM if OPUS_ARM_EXTERNAL_ASM
tests_test_opus_projection_LDADD += libarmasm.la tests_test_opus_projection_LDADD += libarmasm.la
endif endif
silk_tests_test_unit_LPC_inv_pred_gain_SOURCES = silk/tests/test_unit_LPC_inv_pred_gain.c silk_tests_test_unit_LPC_inv_pred_gain_SOURCES = silk/tests/test_unit_LPC_inv_pred_gain.c
silk_tests_test_unit_LPC_inv_pred_gain_LDADD = $(SILK_OBJ) $(CELT_OBJ) $(NE10_LIBS) $(LIBM) silk_tests_test_unit_LPC_inv_pred_gain_LDADD = $(SILK_OBJ) $(LPCNET_OBJ) $(CELT_OBJ) $(NE10_LIBS) $(LIBM)
if OPUS_ARM_EXTERNAL_ASM if OPUS_ARM_EXTERNAL_ASM
silk_tests_test_unit_LPC_inv_pred_gain_LDADD += libarmasm.la silk_tests_test_unit_LPC_inv_pred_gain_LDADD += libarmasm.la
endif endif
@ -175,7 +250,7 @@ celt_tests_test_unit_cwrs32_SOURCES = celt/tests/test_unit_cwrs32.c
celt_tests_test_unit_cwrs32_LDADD = $(LIBM) celt_tests_test_unit_cwrs32_LDADD = $(LIBM)
celt_tests_test_unit_dft_SOURCES = celt/tests/test_unit_dft.c celt_tests_test_unit_dft_SOURCES = celt/tests/test_unit_dft.c
celt_tests_test_unit_dft_LDADD = $(CELT_OBJ) $(NE10_LIBS) $(LIBM) celt_tests_test_unit_dft_LDADD = $(CELT_OBJ) $(LPCNET_OBJ) $(NE10_LIBS) $(LIBM)
if OPUS_ARM_EXTERNAL_ASM if OPUS_ARM_EXTERNAL_ASM
celt_tests_test_unit_dft_LDADD += libarmasm.la celt_tests_test_unit_dft_LDADD += libarmasm.la
endif endif
@ -187,19 +262,19 @@ celt_tests_test_unit_laplace_SOURCES = celt/tests/test_unit_laplace.c
celt_tests_test_unit_laplace_LDADD = $(LIBM) celt_tests_test_unit_laplace_LDADD = $(LIBM)
celt_tests_test_unit_mathops_SOURCES = celt/tests/test_unit_mathops.c celt_tests_test_unit_mathops_SOURCES = celt/tests/test_unit_mathops.c
celt_tests_test_unit_mathops_LDADD = $(CELT_OBJ) $(NE10_LIBS) $(LIBM) celt_tests_test_unit_mathops_LDADD = $(CELT_OBJ) $(LPCNET_OBJ) $(NE10_LIBS) $(LIBM)
if OPUS_ARM_EXTERNAL_ASM if OPUS_ARM_EXTERNAL_ASM
celt_tests_test_unit_mathops_LDADD += libarmasm.la celt_tests_test_unit_mathops_LDADD += libarmasm.la
endif endif
celt_tests_test_unit_mdct_SOURCES = celt/tests/test_unit_mdct.c celt_tests_test_unit_mdct_SOURCES = celt/tests/test_unit_mdct.c
celt_tests_test_unit_mdct_LDADD = $(CELT_OBJ) $(NE10_LIBS) $(LIBM) celt_tests_test_unit_mdct_LDADD = $(CELT_OBJ) $(LPCNET_OBJ) $(NE10_LIBS) $(LIBM)
if OPUS_ARM_EXTERNAL_ASM if OPUS_ARM_EXTERNAL_ASM
celt_tests_test_unit_mdct_LDADD += libarmasm.la celt_tests_test_unit_mdct_LDADD += libarmasm.la
endif endif
celt_tests_test_unit_rotation_SOURCES = celt/tests/test_unit_rotation.c celt_tests_test_unit_rotation_SOURCES = celt/tests/test_unit_rotation.c
celt_tests_test_unit_rotation_LDADD = $(CELT_OBJ) $(NE10_LIBS) $(LIBM) celt_tests_test_unit_rotation_LDADD = $(CELT_OBJ) $(LPCNET_OBJ) $(NE10_LIBS) $(LIBM)
if OPUS_ARM_EXTERNAL_ASM if OPUS_ARM_EXTERNAL_ASM
celt_tests_test_unit_rotation_LDADD += libarmasm.la celt_tests_test_unit_rotation_LDADD += libarmasm.la
endif endif
@ -217,6 +292,32 @@ opus_custom_demo_LDADD = libopus.la $(LIBM)
endif endif
endif endif
if EXTRA_PROGRAMS
if ENABLE_DEEP_PLC
noinst_PROGRAMS += fargan_demo dump_data dump_weights_blob
fargan_demo_SOURCES = dnn/fargan_demo.c
fargan_demo_LDADD = $(LPCNET_OBJ) $(CELT_OBJ) $(LIBM)
dump_data_SOURCES = dnn/dump_data.c
dump_data_LDADD = $(LPCNET_OBJ) $(CELT_OBJ) $(LIBM)
dump_weights_blob_SOURCES = dnn/write_lpcnet_weights.c
dump_weights_blob_LDADD = $(LIBM)
dump_weights_blob_CFLAGS = $(AM_CFLAGS) -DDUMP_BINARY_WEIGHTS
endif
if ENABLE_DRED
TESTS += tests/test_opus_dred
endif
if ENABLE_LOSSGEN
noinst_PROGRAMS += lossgen_demo
lossgen_demo_SOURCES = dnn/lossgen_demo.c $(LOSSGEN_SOURCES)
lossgen_demo_LDADD = $(LIBM)
endif
endif
EXTRA_DIST = opus.pc.in \ EXTRA_DIST = opus.pc.in \
opus-uninstalled.pc.in \ opus-uninstalled.pc.in \
opus.m4 \ opus.m4 \
@ -230,6 +331,7 @@ EXTRA_DIST = opus.pc.in \
cmake/OpusFunctions.cmake \ cmake/OpusFunctions.cmake \
cmake/OpusPackageVersion.cmake \ cmake/OpusPackageVersion.cmake \
cmake/OpusSources.cmake \ cmake/OpusSources.cmake \
cmake/README.md \
cmake/RunTest.cmake \ cmake/RunTest.cmake \
cmake/config.h.cmake.in \ cmake/config.h.cmake.in \
cmake/vla.c \ cmake/vla.c \
@ -237,11 +339,14 @@ EXTRA_DIST = opus.pc.in \
cmake/cpu_info_by_c.c \ cmake/cpu_info_by_c.c \
meson/get-version.py \ meson/get-version.py \
meson/read-sources-list.py \ meson/read-sources-list.py \
meson/README.md \
meson.build \ meson.build \
meson_options.txt \ meson_options.txt \
include/meson.build \ include/meson.build \
celt/meson.build \ celt/meson.build \
celt/tests/meson.build \ celt/tests/meson.build \
dnn/meson.build \
dnn/README.md \
silk/meson.build \ silk/meson.build \
silk/tests/meson.build \ silk/tests/meson.build \
src/meson.build \ src/meson.build \
@ -249,21 +354,7 @@ EXTRA_DIST = opus.pc.in \
doc/meson.build \ doc/meson.build \
tests/run_vectors.sh \ tests/run_vectors.sh \
celt/arm/arm2gnu.pl \ celt/arm/arm2gnu.pl \
celt/arm/celt_pitch_xcorr_arm.s \ celt/arm/celt_pitch_xcorr_arm.s
win32/VS2015/opus.vcxproj \
win32/VS2015/test_opus_encode.vcxproj.filters \
win32/VS2015/test_opus_encode.vcxproj \
win32/VS2015/opus_demo.vcxproj \
win32/VS2015/test_opus_api.vcxproj.filters \
win32/VS2015/test_opus_api.vcxproj \
win32/VS2015/test_opus_decode.vcxproj.filters \
win32/VS2015/opus_demo.vcxproj.filters \
win32/VS2015/opus.vcxproj.filters \
win32/VS2015/test_opus_decode.vcxproj \
win32/VS2015/opus.sln \
win32/VS2015/common.props \
win32/genversion.bat \
win32/config.h
pkgconfigdir = $(libdir)/pkgconfig pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = opus.pc pkgconfig_DATA = opus.pc
@ -362,21 +453,37 @@ $(SSE_OBJ): CFLAGS += $(OPUS_X86_SSE_CFLAGS)
endif endif
if HAVE_SSE2 if HAVE_SSE2
SSE2_OBJ = $(CELT_SOURCES_SSE2:.c=.lo) SSE2_OBJ = $(CELT_SOURCES_SSE2:.c=.lo) \
$(DNN_SOURCES_SSE2:.c=.lo)
$(SSE2_OBJ): CFLAGS += $(OPUS_X86_SSE2_CFLAGS) $(SSE2_OBJ): CFLAGS += $(OPUS_X86_SSE2_CFLAGS)
endif endif
if HAVE_SSE4_1 if HAVE_SSE4_1
SSE4_1_OBJ = $(CELT_SOURCES_SSE4_1:.c=.lo) \ SSE4_1_OBJ = $(CELT_SOURCES_SSE4_1:.c=.lo) \
$(DNN_SOURCES_SSE4_1:.c=.lo) \
$(SILK_SOURCES_SSE4_1:.c=.lo) \ $(SILK_SOURCES_SSE4_1:.c=.lo) \
$(SILK_SOURCES_FIXED_SSE4_1:.c=.lo) $(SILK_SOURCES_FIXED_SSE4_1:.c=.lo)
$(SSE4_1_OBJ): CFLAGS += $(OPUS_X86_SSE4_1_CFLAGS) $(SSE4_1_OBJ): CFLAGS += $(OPUS_X86_SSE4_1_CFLAGS)
endif endif
if HAVE_AVX2
AVX2_OBJ = $(CELT_SOURCES_AVX2:.c=.lo) \
$(SILK_SOURCES_AVX2:.c=.lo) \
$(SILK_SOURCES_FLOAT_AVX2:.c=.lo) \
$(DNN_SOURCES_AVX2:.c=.lo)
$(AVX2_OBJ): CFLAGS += $(OPUS_X86_AVX2_CFLAGS)
endif
if HAVE_ARM_NEON_INTR if HAVE_ARM_NEON_INTR
ARM_NEON_INTR_OBJ = $(CELT_SOURCES_ARM_NEON_INTR:.c=.lo) \ ARM_NEON_INTR_OBJ = $(CELT_SOURCES_ARM_NEON_INTR:.c=.lo) \
$(SILK_SOURCES_ARM_NEON_INTR:.c=.lo) \ $(SILK_SOURCES_ARM_NEON_INTR:.c=.lo) \
$(DNN_SOURCES_NEON:.c=.lo) \
$(SILK_SOURCES_FIXED_ARM_NEON_INTR:.c=.lo) $(SILK_SOURCES_FIXED_ARM_NEON_INTR:.c=.lo)
$(ARM_NEON_INTR_OBJ): CFLAGS += \ $(ARM_NEON_INTR_OBJ): CFLAGS += \
$(OPUS_ARM_NEON_INTR_CFLAGS) $(NE10_CFLAGS) $(OPUS_ARM_NEON_INTR_CFLAGS) $(NE10_CFLAGS)
endif endif
if HAVE_ARM_DOTPROD
ARM_DOTPROD_OBJ = $(DNN_SOURCES_DOTPROD:.c=.lo)
$(ARM_DOTPROD_OBJ): CFLAGS += $(ARM_DOTPROD_INTR_CFLAGS)
endif

File diff suppressed because it is too large Load Diff

View File

@ -102,13 +102,16 @@ TESTOPUSDECODE_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSDECODE_SRCS_C))
TESTOPUSENCODE_SRCS_C = tests/test_opus_encode.c tests/opus_encode_regressions.c TESTOPUSENCODE_SRCS_C = tests/test_opus_encode.c tests/opus_encode_regressions.c
TESTOPUSENCODE_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSENCODE_SRCS_C)) TESTOPUSENCODE_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSENCODE_SRCS_C))
TESTOPUSEXTENSIONS_SRCS_C = tests/test_opus_extensions.c
TESTOPUSEXTENSIONS_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSEXTENSIONS_SRCS_C))
TESTOPUSPADDING_SRCS_C = tests/test_opus_padding.c TESTOPUSPADDING_SRCS_C = tests/test_opus_padding.c
TESTOPUSPADDING_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSPADDING_SRCS_C)) TESTOPUSPADDING_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSPADDING_SRCS_C))
OPUSCOMPARE_SRCS_C = src/opus_compare.c OPUSCOMPARE_SRCS_C = src/opus_compare.c
OPUSCOMPARE_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(OPUSCOMPARE_SRCS_C)) OPUSCOMPARE_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(OPUSCOMPARE_SRCS_C))
TESTS := test_opus_api test_opus_decode test_opus_encode test_opus_padding TESTS := test_opus_api test_opus_decode test_opus_encode test_opus_extensions test_opus_padding
# Rules # Rules
all: lib opus_demo opus_compare $(TESTS) all: lib opus_demo opus_compare $(TESTS)
@ -133,6 +136,9 @@ test_opus_decode$(EXESUFFIX): $(TESTOPUSDECODE_OBJS) $(TARGET)
test_opus_encode$(EXESUFFIX): $(TESTOPUSENCODE_OBJS) $(TARGET) test_opus_encode$(EXESUFFIX): $(TESTOPUSENCODE_OBJS) $(TARGET)
$(LINK.o.cmdline) $(LINK.o.cmdline)
test_opus_extensions$(EXESUFFIX): $(TESTOPUSEXTENSIONS_OBJS) $(TARGET)
$(LINK.o.cmdline)
test_opus_padding$(EXESUFFIX): $(TESTOPUSPADDING_OBJS) $(TARGET) test_opus_padding$(EXESUFFIX): $(TESTOPUSPADDING_OBJS) $(TARGET)
$(LINK.o.cmdline) $(LINK.o.cmdline)
@ -154,8 +160,10 @@ force:
clean: clean:
rm -f opus_demo$(EXESUFFIX) opus_compare$(EXESUFFIX) $(TARGET) \ rm -f opus_demo$(EXESUFFIX) opus_compare$(EXESUFFIX) $(TARGET) \
test_opus_api$(EXESUFFIX) test_opus_decode$(EXESUFFIX) \ test_opus_api$(EXESUFFIX) test_opus_decode$(EXESUFFIX) \
test_opus_encode$(EXESUFFIX) test_opus_padding$(EXESUFFIX) \ test_opus_encode$(EXESUFFIX) test_opus_extensions$(EXESUFFIX) \
test_opus_padding$(EXESUFFIX)
$(OBJS) $(OPUSDEMO_OBJS) $(OPUSCOMPARE_OBJS) $(TESTOPUSAPI_OBJS) \ $(OBJS) $(OPUSDEMO_OBJS) $(OPUSCOMPARE_OBJS) $(TESTOPUSAPI_OBJS) \
$(TESTOPUSDECODE_OBJS) $(TESTOPUSENCODE_OBJS) $(TESTOPUSPADDING_OBJS) $(TESTOPUSDECODE_OBJS) $(TESTOPUSENCODE_OBJS) \
$(TESTOPUSEXTENSIONS_OBJS) $(TESTOPUSPADDING_OBJS)
.PHONY: all lib clean force check .PHONY: all lib clean force check

View File

@ -100,13 +100,16 @@ TESTOPUSDECODE_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSDECODE_SRCS_C))
TESTOPUSENCODE_SRCS_C = tests/test_opus_encode.c tests/opus_encode_regressions.c TESTOPUSENCODE_SRCS_C = tests/test_opus_encode.c tests/opus_encode_regressions.c
TESTOPUSENCODE_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSENCODE_SRCS_C)) TESTOPUSENCODE_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSENCODE_SRCS_C))
TESTOPUSEXTENSIONS_SRCS_C = tests/test_opus_extensions.c
TESTOPUSEXTENSIONS_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSEXTENSIONS_SRCS_C))
TESTOPUSPADDING_SRCS_C = tests/test_opus_padding.c TESTOPUSPADDING_SRCS_C = tests/test_opus_padding.c
TESTOPUSPADDING_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSPADDING_SRCS_C)) TESTOPUSPADDING_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSPADDING_SRCS_C))
OPUSCOMPARE_SRCS_C = src/opus_compare.c OPUSCOMPARE_SRCS_C = src/opus_compare.c
OPUSCOMPARE_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(OPUSCOMPARE_SRCS_C)) OPUSCOMPARE_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(OPUSCOMPARE_SRCS_C))
TESTS := test_opus_api test_opus_decode test_opus_encode test_opus_padding TESTS := test_opus_api test_opus_decode test_opus_encode test_opus_extensions test_opus_padding
# Rules # Rules
all: lib opus_demo opus_compare $(TESTS) all: lib opus_demo opus_compare $(TESTS)
@ -131,6 +134,9 @@ test_opus_decode$(EXESUFFIX): $(TESTOPUSDECODE_OBJS) $(TARGET)
test_opus_encode$(EXESUFFIX): $(TESTOPUSENCODE_OBJS) $(TARGET) test_opus_encode$(EXESUFFIX): $(TESTOPUSENCODE_OBJS) $(TARGET)
$(LINK.o.cmdline) $(LINK.o.cmdline)
test_opus_extensions$(EXESUFFIX): $(TESTOPUSEXTENSIONS_OBJS) $(TARGET)
$(LINK.o.cmdline)
test_opus_padding$(EXESUFFIX): $(TESTOPUSPADDING_OBJS) $(TARGET) test_opus_padding$(EXESUFFIX): $(TESTOPUSPADDING_OBJS) $(TARGET)
$(LINK.o.cmdline) $(LINK.o.cmdline)
@ -152,8 +158,10 @@ force:
clean: clean:
rm -f opus_demo$(EXESUFFIX) opus_compare$(EXESUFFIX) $(TARGET) \ rm -f opus_demo$(EXESUFFIX) opus_compare$(EXESUFFIX) $(TARGET) \
test_opus_api$(EXESUFFIX) test_opus_decode$(EXESUFFIX) \ test_opus_api$(EXESUFFIX) test_opus_decode$(EXESUFFIX) \
test_opus_encode$(EXESUFFIX) test_opus_padding$(EXESUFFIX) \ test_opus_encode$(EXESUFFIX) test_opus_extensions$(EXESUFFIX) \
test_opus_padding$(EXESUFFIX)
$(OBJS) $(OPUSDEMO_OBJS) $(OPUSCOMPARE_OBJS) $(TESTOPUSAPI_OBJS) \ $(OBJS) $(OPUSDEMO_OBJS) $(OPUSCOMPARE_OBJS) $(TESTOPUSAPI_OBJS) \
$(TESTOPUSDECODE_OBJS) $(TESTOPUSENCODE_OBJS) $(TESTOPUSPADDING_OBJS) $(TESTOPUSDECODE_OBJS) $(TESTOPUSENCODE_OBJS) \
$(TESTOPUSEXTENSIONS_OBJS) $(TESTOPUSPADDING_OBJS)
.PHONY: all lib clean force check .PHONY: all lib clean force check

View File

@ -22,7 +22,7 @@ This package implements a shared library for encoding and decoding raw Opus
bitstreams. Raw Opus bitstreams should be used over RTP according to bitstreams. Raw Opus bitstreams should be used over RTP according to
https://tools.ietf.org/html/rfc7587 https://tools.ietf.org/html/rfc7587
The package also includes a number of test tools used for testing the The package also includes a number of test tools used for testing the
correct operation of the library. The bitstreams read/written by these correct operation of the library. The bitstreams read/written by these
tools should not be used for Opus file distribution: They include tools should not be used for Opus file distribution: They include
additional debugging data and cannot support seeking. additional debugging data and cannot support seeking.
@ -39,6 +39,28 @@ Opus-tools can be found at:
or on the main Opus website: or on the main Opus website:
https://opus-codec.org/ https://opus-codec.org/
== Deep Learning and Opus ==
Lossy networks continue to be a challenge for real-time communications.
While the original implementation of Opus provides an excellent packet loss
concealment mechanism, the team has continued to advance the methodology used
to improve audio quality in challenge network environments.
In Opus 1.5, we added a deep learning based redundancy encoder that enhances
audio in lossy networks by embedding one second of recovery data in the padding
data of each packet. The underlying algorithm behind encoding and decoding the
recovery data is called the deep redundancy (DRED) algorithm. By leveraging
the padding data within the packet, Opus 1.5 is fully backward compatible with
prior revisions of Opus. Please see the README under the "dnn" subdirectory to
understand DRED.
DRED was developed by a team that Amazon Web Services initially sponsored,
who open-sourced the implementation as well as began the
standardization process at the IETF:
https://datatracker.ietf.org/doc/draft-ietf-mlcodec-opus-extension/
The license behind Opus or the intellectual property position of Opus does
not change with Opus 1.5.
== Compiling libopus == == Compiling libopus ==
To build from a distribution tarball, you only need to do the following: To build from a distribution tarball, you only need to do the following:
@ -77,6 +99,8 @@ On Apple macOS, install Xcode and brew.sh, then in the Terminal enter:
% ./configure % ./configure
% make % make
On x86, it's a good idea to use a -march= option that allows the use of AVX2.
3) Install the codec libraries (optional) 3) Install the codec libraries (optional)
% sudo make install % sudo make install
@ -133,6 +157,10 @@ To run compare the code to these test vectors:
% tar -zxf opus_testvectors-rfc8251.tar.gz % tar -zxf opus_testvectors-rfc8251.tar.gz
% ./tests/run_vectors.sh ./ opus_newvectors 48000 % ./tests/run_vectors.sh ./ opus_newvectors 48000
== Compiling libopus for Windows and alternative build systems ==
See cmake/README.md or meson/README.md.
== Portability notes == == Portability notes ==
This implementation uses floating-point by default but can be compiled to This implementation uses floating-point by default but can be compiled to

View File

@ -1,6 +1,6 @@
# generated automatically by aclocal 1.16.1 -*- Autoconf -*- # generated automatically by aclocal 1.16.5 -*- Autoconf -*-
# Copyright (C) 1996-2018 Free Software Foundation, Inc. # Copyright (C) 1996-2021 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -14,13 +14,13 @@
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
m4_ifndef([AC_AUTOCONF_VERSION], m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
[m4_warning([this file was generated for autoconf 2.69. [m4_warning([this file was generated for autoconf 2.71.
You have another version of autoconf. It may work, but is not guaranteed to. You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely. If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])]) To do so, use the procedure documented by the package, typically 'autoreconf'.])])
# Copyright (C) 2002-2018 Free Software Foundation, Inc. # Copyright (C) 2002-2021 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -35,7 +35,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.16' [am__api_version='1.16'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro. dnl require some minimum version. Point them to the right macro.
m4_if([$1], [1.16.1], [], m4_if([$1], [1.16.5], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
]) ])
@ -51,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.16.1])dnl [AM_AUTOMAKE_VERSION([1.16.5])dnl
m4_ifndef([AC_AUTOCONF_VERSION], m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# Figure out how to run the assembler. -*- Autoconf -*- # Figure out how to run the assembler. -*- Autoconf -*-
# Copyright (C) 2001-2018 Free Software Foundation, Inc. # Copyright (C) 2001-2021 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -78,7 +78,7 @@ _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
# AM_AUX_DIR_EXPAND -*- Autoconf -*- # AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001-2018 Free Software Foundation, Inc. # Copyright (C) 2001-2021 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -130,7 +130,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
# AM_CONDITIONAL -*- Autoconf -*- # AM_CONDITIONAL -*- Autoconf -*-
# Copyright (C) 1997-2018 Free Software Foundation, Inc. # Copyright (C) 1997-2021 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -161,7 +161,7 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]]) Usually this means the macro was only invoked conditionally.]])
fi])]) fi])])
# Copyright (C) 1999-2018 Free Software Foundation, Inc. # Copyright (C) 1999-2021 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -352,7 +352,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*- # Generate code to set up dependency tracking. -*- Autoconf -*-
# Copyright (C) 1999-2018 Free Software Foundation, Inc. # Copyright (C) 1999-2021 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -391,7 +391,9 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
done done
if test $am_rc -ne 0; then if test $am_rc -ne 0; then
AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
for automatic dependency tracking. Try re-running configure with the for automatic dependency tracking. If GNU make was not used, consider
re-running the configure script with MAKE="gmake" (or whatever is
necessary). You can also try re-running configure with the
'--disable-dependency-tracking' option to at least be able to build '--disable-dependency-tracking' option to at least be able to build
the package (albeit without support for automatic dependency tracking).]) the package (albeit without support for automatic dependency tracking).])
fi fi
@ -418,7 +420,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# Do all the work for Automake. -*- Autoconf -*- # Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996-2018 Free Software Foundation, Inc. # Copyright (C) 1996-2021 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -446,6 +448,10 @@ m4_defn([AC_PROG_CC])
# release and drop the old call support. # release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE], AC_DEFUN([AM_INIT_AUTOMAKE],
[AC_PREREQ([2.65])dnl [AC_PREREQ([2.65])dnl
m4_ifdef([_$0_ALREADY_INIT],
[m4_fatal([$0 expanded multiple times
]m4_defn([_$0_ALREADY_INIT]))],
[m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl
dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl Autoconf wants to disallow AM_ names. We explicitly allow
dnl the ones we care about. dnl the ones we care about.
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
@ -482,7 +488,7 @@ m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
[_AM_SET_OPTIONS([$1])dnl [_AM_SET_OPTIONS([$1])dnl
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
m4_if( m4_if(
m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
[ok:ok],, [ok:ok],,
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
@ -534,6 +540,20 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
[m4_define([AC_PROG_OBJCXX], [m4_define([AC_PROG_OBJCXX],
m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
]) ])
# Variables for tags utilities; see am/tags.am
if test -z "$CTAGS"; then
CTAGS=ctags
fi
AC_SUBST([CTAGS])
if test -z "$ETAGS"; then
ETAGS=etags
fi
AC_SUBST([ETAGS])
if test -z "$CSCOPE"; then
CSCOPE=cscope
fi
AC_SUBST([CSCOPE])
AC_REQUIRE([AM_SILENT_RULES])dnl AC_REQUIRE([AM_SILENT_RULES])dnl
dnl The testsuite driver may need to know about EXEEXT, so add the dnl The testsuite driver may need to know about EXEEXT, so add the
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
@ -615,7 +635,7 @@ for _am_header in $config_headers :; do
done done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001-2018 Free Software Foundation, Inc. # Copyright (C) 2001-2021 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -636,7 +656,7 @@ if test x"${install_sh+set}" != xset; then
fi fi
AC_SUBST([install_sh])]) AC_SUBST([install_sh])])
# Copyright (C) 2003-2018 Free Software Foundation, Inc. # Copyright (C) 2003-2021 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -658,7 +678,7 @@ AC_SUBST([am__leading_dot])])
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering # From Jim Meyering
# Copyright (C) 1996-2018 Free Software Foundation, Inc. # Copyright (C) 1996-2021 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -693,7 +713,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
# Check to see how 'make' treats includes. -*- Autoconf -*- # Check to see how 'make' treats includes. -*- Autoconf -*-
# Copyright (C) 2001-2018 Free Software Foundation, Inc. # Copyright (C) 2001-2021 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -736,7 +756,7 @@ AC_SUBST([am__quote])])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
# Copyright (C) 1997-2018 Free Software Foundation, Inc. # Copyright (C) 1997-2021 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -757,12 +777,7 @@ AC_DEFUN([AM_MISSING_HAS_RUN],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
AC_REQUIRE_AUX_FILE([missing])dnl AC_REQUIRE_AUX_FILE([missing])dnl
if test x"${MISSING+set}" != xset; then if test x"${MISSING+set}" != xset; then
case $am_aux_dir in MISSING="\${SHELL} '$am_aux_dir/missing'"
*\ * | *\ *)
MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
*)
MISSING="\${SHELL} $am_aux_dir/missing" ;;
esac
fi fi
# Use eval to expand $SHELL # Use eval to expand $SHELL
if eval "$MISSING --is-lightweight"; then if eval "$MISSING --is-lightweight"; then
@ -775,7 +790,7 @@ fi
# Helper functions for option handling. -*- Autoconf -*- # Helper functions for option handling. -*- Autoconf -*-
# Copyright (C) 2001-2018 Free Software Foundation, Inc. # Copyright (C) 2001-2021 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -804,7 +819,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION], AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
# Copyright (C) 1999-2018 Free Software Foundation, Inc. # Copyright (C) 1999-2021 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -851,7 +866,7 @@ AC_LANG_POP([C])])
# For backward compatibility. # For backward compatibility.
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
# Copyright (C) 2001-2018 Free Software Foundation, Inc. # Copyright (C) 2001-2021 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -870,7 +885,7 @@ AC_DEFUN([AM_RUN_LOG],
# Check to make sure that the build environment is sane. -*- Autoconf -*- # Check to make sure that the build environment is sane. -*- Autoconf -*-
# Copyright (C) 1996-2018 Free Software Foundation, Inc. # Copyright (C) 1996-2021 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -951,7 +966,7 @@ AC_CONFIG_COMMANDS_PRE(
rm -f conftest.file rm -f conftest.file
]) ])
# Copyright (C) 2009-2018 Free Software Foundation, Inc. # Copyright (C) 2009-2021 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -1011,7 +1026,7 @@ AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
]) ])
# Copyright (C) 2001-2018 Free Software Foundation, Inc. # Copyright (C) 2001-2021 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -1039,7 +1054,7 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])]) AC_SUBST([INSTALL_STRIP_PROGRAM])])
# Copyright (C) 2006-2018 Free Software Foundation, Inc. # Copyright (C) 2006-2021 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -1058,7 +1073,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*- # Check how to create a tarball. -*- Autoconf -*-
# Copyright (C) 2004-2018 Free Software Foundation, Inc. # Copyright (C) 2004-2021 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,

View File

@ -40,7 +40,8 @@ opus_val32 (*const CELT_INNER_PROD_IMPL[OPUS_ARCHMASK+1])(const opus_val16 *x, c
celt_inner_prod_c, /* ARMv4 */ celt_inner_prod_c, /* ARMv4 */
celt_inner_prod_c, /* EDSP */ celt_inner_prod_c, /* EDSP */
celt_inner_prod_c, /* Media */ celt_inner_prod_c, /* Media */
celt_inner_prod_neon /* NEON */ celt_inner_prod_neon,/* NEON */
celt_inner_prod_neon /* DOTPROD */
}; };
void (*const DUAL_INNER_PROD_IMPL[OPUS_ARCHMASK+1])(const opus_val16 *x, const opus_val16 *y01, const opus_val16 *y02, void (*const DUAL_INNER_PROD_IMPL[OPUS_ARCHMASK+1])(const opus_val16 *x, const opus_val16 *y01, const opus_val16 *y02,
@ -48,7 +49,8 @@ void (*const DUAL_INNER_PROD_IMPL[OPUS_ARCHMASK+1])(const opus_val16 *x, const o
dual_inner_prod_c, /* ARMv4 */ dual_inner_prod_c, /* ARMv4 */
dual_inner_prod_c, /* EDSP */ dual_inner_prod_c, /* EDSP */
dual_inner_prod_c, /* Media */ dual_inner_prod_c, /* Media */
dual_inner_prod_neon /* NEON */ dual_inner_prod_neon,/* NEON */
dual_inner_prod_neon /* DOTPROD */
}; };
# endif # endif
@ -61,7 +63,8 @@ opus_val32 (*const CELT_PITCH_XCORR_IMPL[OPUS_ARCHMASK+1])(const opus_val16 *,
celt_pitch_xcorr_c, /* ARMv4 */ celt_pitch_xcorr_c, /* ARMv4 */
MAY_HAVE_EDSP(celt_pitch_xcorr), /* EDSP */ MAY_HAVE_EDSP(celt_pitch_xcorr), /* EDSP */
MAY_HAVE_MEDIA(celt_pitch_xcorr), /* Media */ MAY_HAVE_MEDIA(celt_pitch_xcorr), /* Media */
MAY_HAVE_NEON(celt_pitch_xcorr) /* NEON */ MAY_HAVE_NEON(celt_pitch_xcorr), /* NEON */
MAY_HAVE_NEON(celt_pitch_xcorr) /* DOTPROD */
}; };
# endif # endif
@ -72,7 +75,8 @@ void (*const CELT_PITCH_XCORR_IMPL[OPUS_ARCHMASK+1])(const opus_val16 *,
celt_pitch_xcorr_c, /* ARMv4 */ celt_pitch_xcorr_c, /* ARMv4 */
celt_pitch_xcorr_c, /* EDSP */ celt_pitch_xcorr_c, /* EDSP */
celt_pitch_xcorr_c, /* Media */ celt_pitch_xcorr_c, /* Media */
celt_pitch_xcorr_float_neon /* Neon */ celt_pitch_xcorr_float_neon, /* Neon */
celt_pitch_xcorr_float_neon /* DOTPROD */
}; };
# endif # endif
# endif /* FIXED_POINT */ # endif /* FIXED_POINT */
@ -90,6 +94,7 @@ void (*const XCORR_KERNEL_IMPL[OPUS_ARCHMASK + 1])(
xcorr_kernel_c, /* EDSP */ xcorr_kernel_c, /* EDSP */
xcorr_kernel_c, /* Media */ xcorr_kernel_c, /* Media */
xcorr_kernel_neon_fixed, /* Neon */ xcorr_kernel_neon_fixed, /* Neon */
xcorr_kernel_neon_fixed /* DOTPROD */
}; };
#endif #endif
@ -101,14 +106,16 @@ int (*const OPUS_FFT_ALLOC_ARCH_IMPL[OPUS_ARCHMASK+1])(kiss_fft_state *st) = {
opus_fft_alloc_arch_c, /* ARMv4 */ opus_fft_alloc_arch_c, /* ARMv4 */
opus_fft_alloc_arch_c, /* EDSP */ opus_fft_alloc_arch_c, /* EDSP */
opus_fft_alloc_arch_c, /* Media */ opus_fft_alloc_arch_c, /* Media */
opus_fft_alloc_arm_neon /* Neon with NE10 library support */ opus_fft_alloc_arm_neon, /* Neon with NE10 library support */
opus_fft_alloc_arm_neon /* DOTPROD with NE10 library support */
}; };
void (*const OPUS_FFT_FREE_ARCH_IMPL[OPUS_ARCHMASK+1])(kiss_fft_state *st) = { void (*const OPUS_FFT_FREE_ARCH_IMPL[OPUS_ARCHMASK+1])(kiss_fft_state *st) = {
opus_fft_free_arch_c, /* ARMv4 */ opus_fft_free_arch_c, /* ARMv4 */
opus_fft_free_arch_c, /* EDSP */ opus_fft_free_arch_c, /* EDSP */
opus_fft_free_arch_c, /* Media */ opus_fft_free_arch_c, /* Media */
opus_fft_free_arm_neon /* Neon with NE10 */ opus_fft_free_arm_neon, /* Neon with NE10 */
opus_fft_free_arm_neon /* DOTPROD with NE10 */
}; };
# endif /* CUSTOM_MODES */ # endif /* CUSTOM_MODES */
@ -118,7 +125,8 @@ void (*const OPUS_FFT[OPUS_ARCHMASK+1])(const kiss_fft_state *cfg,
opus_fft_c, /* ARMv4 */ opus_fft_c, /* ARMv4 */
opus_fft_c, /* EDSP */ opus_fft_c, /* EDSP */
opus_fft_c, /* Media */ opus_fft_c, /* Media */
opus_fft_neon /* Neon with NE10 */ opus_fft_neon, /* Neon with NE10 */
opus_fft_neon /* DOTPROD with NE10 */
}; };
void (*const OPUS_IFFT[OPUS_ARCHMASK+1])(const kiss_fft_state *cfg, void (*const OPUS_IFFT[OPUS_ARCHMASK+1])(const kiss_fft_state *cfg,
@ -127,7 +135,8 @@ void (*const OPUS_IFFT[OPUS_ARCHMASK+1])(const kiss_fft_state *cfg,
opus_ifft_c, /* ARMv4 */ opus_ifft_c, /* ARMv4 */
opus_ifft_c, /* EDSP */ opus_ifft_c, /* EDSP */
opus_ifft_c, /* Media */ opus_ifft_c, /* Media */
opus_ifft_neon /* Neon with NE10 */ opus_ifft_neon, /* Neon with NE10 */
opus_ifft_neon /* DOTPROD with NE10 */
}; };
void (*const CLT_MDCT_FORWARD_IMPL[OPUS_ARCHMASK+1])(const mdct_lookup *l, void (*const CLT_MDCT_FORWARD_IMPL[OPUS_ARCHMASK+1])(const mdct_lookup *l,
@ -139,7 +148,8 @@ void (*const CLT_MDCT_FORWARD_IMPL[OPUS_ARCHMASK+1])(const mdct_lookup *l,
clt_mdct_forward_c, /* ARMv4 */ clt_mdct_forward_c, /* ARMv4 */
clt_mdct_forward_c, /* EDSP */ clt_mdct_forward_c, /* EDSP */
clt_mdct_forward_c, /* Media */ clt_mdct_forward_c, /* Media */
clt_mdct_forward_neon /* Neon with NE10 */ clt_mdct_forward_neon, /* Neon with NE10 */
clt_mdct_forward_neon /* DOTPROD with NE10 */
}; };
void (*const CLT_MDCT_BACKWARD_IMPL[OPUS_ARCHMASK+1])(const mdct_lookup *l, void (*const CLT_MDCT_BACKWARD_IMPL[OPUS_ARCHMASK+1])(const mdct_lookup *l,
@ -151,7 +161,8 @@ void (*const CLT_MDCT_BACKWARD_IMPL[OPUS_ARCHMASK+1])(const mdct_lookup *l,
clt_mdct_backward_c, /* ARMv4 */ clt_mdct_backward_c, /* ARMv4 */
clt_mdct_backward_c, /* EDSP */ clt_mdct_backward_c, /* EDSP */
clt_mdct_backward_c, /* Media */ clt_mdct_backward_c, /* Media */
clt_mdct_backward_neon /* Neon with NE10 */ clt_mdct_backward_neon, /* Neon with NE10 */
clt_mdct_backward_neon /* DOTPROD with NE10 */
}; };
# endif /* HAVE_ARM_NE10 */ # endif /* HAVE_ARM_NE10 */

View File

@ -43,6 +43,7 @@
#define OPUS_CPU_ARM_EDSP_FLAG (1<<OPUS_ARCH_ARM_EDSP) #define OPUS_CPU_ARM_EDSP_FLAG (1<<OPUS_ARCH_ARM_EDSP)
#define OPUS_CPU_ARM_MEDIA_FLAG (1<<OPUS_ARCH_ARM_MEDIA) #define OPUS_CPU_ARM_MEDIA_FLAG (1<<OPUS_ARCH_ARM_MEDIA)
#define OPUS_CPU_ARM_NEON_FLAG (1<<OPUS_ARCH_ARM_NEON) #define OPUS_CPU_ARM_NEON_FLAG (1<<OPUS_ARCH_ARM_NEON)
#define OPUS_CPU_ARM_DOTPROD_FLAG (1<<OPUS_ARCH_ARM_DOTPROD)
#if defined(_MSC_VER) #if defined(_MSC_VER)
/*For GetExceptionCode() and EXCEPTION_ILLEGAL_INSTRUCTION.*/ /*For GetExceptionCode() and EXCEPTION_ILLEGAL_INSTRUCTION.*/
@ -95,7 +96,7 @@ static OPUS_INLINE opus_uint32 opus_cpu_capabilities(void){
/* Linux based */ /* Linux based */
#include <stdio.h> #include <stdio.h>
opus_uint32 opus_cpu_capabilities(void) static opus_uint32 opus_cpu_capabilities(void)
{ {
opus_uint32 flags = 0; opus_uint32 flags = 0;
FILE *cpuinfo; FILE *cpuinfo;
@ -126,6 +127,14 @@ opus_uint32 opus_cpu_capabilities(void)
p = strstr(buf, " neon"); p = strstr(buf, " neon");
if(p != NULL && (p[5] == ' ' || p[5] == '\n')) if(p != NULL && (p[5] == ' ' || p[5] == '\n'))
flags |= OPUS_CPU_ARM_NEON_FLAG; flags |= OPUS_CPU_ARM_NEON_FLAG;
p = strstr(buf, " asimd");
if(p != NULL && (p[6] == ' ' || p[6] == '\n'))
flags |= OPUS_CPU_ARM_NEON_FLAG | OPUS_CPU_ARM_MEDIA_FLAG | OPUS_CPU_ARM_EDSP_FLAG;
# endif
# if defined(OPUS_ARM_MAY_HAVE_DOTPROD)
p = strstr(buf, " asimddp");
if(p != NULL && (p[8] == ' ' || p[8] == '\n'))
flags |= OPUS_CPU_ARM_DOTPROD_FLAG;
# endif # endif
} }
# endif # endif
@ -144,10 +153,92 @@ opus_uint32 opus_cpu_capabilities(void)
# endif # endif
} }
#if defined(OPUS_ARM_PRESUME_AARCH64_NEON_INTR)
flags |= OPUS_CPU_ARM_EDSP_FLAG | OPUS_CPU_ARM_MEDIA_FLAG | OPUS_CPU_ARM_NEON_FLAG;
# if defined(OPUS_ARM_PRESUME_DOTPROD)
flags |= OPUS_CPU_ARM_DOTPROD_FLAG;
# endif
#endif
fclose(cpuinfo); fclose(cpuinfo);
} }
return flags; return flags;
} }
#elif defined(__APPLE__)
#include <sys/types.h>
#include <sys/sysctl.h>
static opus_uint32 opus_cpu_capabilities(void)
{
opus_uint32 flags = 0;
#if defined(OPUS_ARM_MAY_HAVE_DOTPROD)
size_t size = sizeof(uint32_t);
uint32_t value = 0;
if (!sysctlbyname("hw.optional.arm.FEAT_DotProd", &value, &size, NULL, 0) && value)
{
flags |= OPUS_CPU_ARM_DOTPROD_FLAG;
}
#endif
#if defined(OPUS_ARM_PRESUME_AARCH64_NEON_INTR)
flags |= OPUS_CPU_ARM_EDSP_FLAG | OPUS_CPU_ARM_MEDIA_FLAG | OPUS_CPU_ARM_NEON_FLAG;
# if defined(OPUS_ARM_PRESUME_DOTPROD)
flags |= OPUS_CPU_ARM_DOTPROD_FLAG;
# endif
#endif
return flags;
}
#elif defined(__FreeBSD__)
#include <sys/auxv.h>
static opus_uint32 opus_cpu_capabilities(void)
{
long hwcap = 0;
opus_uint32 flags = 0;
# if defined(OPUS_ARM_MAY_HAVE_MEDIA) \
|| defined(OPUS_ARM_MAY_HAVE_NEON) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR)
/* FreeBSD requires armv6+, which always supports media instructions */
flags |= OPUS_CPU_ARM_MEDIA_FLAG;
# endif
elf_aux_info(AT_HWCAP, &hwcap, sizeof hwcap);
# if defined(OPUS_ARM_MAY_HAVE_EDSP) || defined(OPUS_ARM_MAY_HAVE_MEDIA) \
|| defined(OPUS_ARM_MAY_HAVE_NEON) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR)
# ifdef HWCAP_EDSP
if (hwcap & HWCAP_EDSP)
flags |= OPUS_CPU_ARM_EDSP_FLAG;
# endif
# if defined(OPUS_ARM_MAY_HAVE_NEON) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR)
# ifdef HWCAP_NEON
if (hwcap & HWCAP_NEON)
flags |= OPUS_CPU_ARM_NEON_FLAG;
# elif defined(HWCAP_ASIMD)
if (hwcap & HWCAP_ASIMD)
flags |= OPUS_CPU_ARM_NEON_FLAG | OPUS_CPU_ARM_MEDIA_FLAG | OPUS_CPU_ARM_EDSP_FLAG;
# endif
# endif
# if defined(OPUS_ARM_MAY_HAVE_DOTPROD) && defined(HWCAP_ASIMDDP)
if (hwcap & HWCAP_ASIMDDP)
flags |= OPUS_CPU_ARM_DOTPROD_FLAG;
# endif
# endif
#if defined(OPUS_ARM_PRESUME_AARCH64_NEON_INTR)
flags |= OPUS_CPU_ARM_EDSP_FLAG | OPUS_CPU_ARM_MEDIA_FLAG | OPUS_CPU_ARM_NEON_FLAG;
# if defined(OPUS_ARM_PRESUME_DOTPROD)
flags |= OPUS_CPU_ARM_DOTPROD_FLAG;
# endif
#endif
return (flags);
}
#else #else
/* The feature registers which can tell us what the processor supports are /* The feature registers which can tell us what the processor supports are
* accessible in priveleged modes only, so we can't have a general user-space * accessible in priveleged modes only, so we can't have a general user-space
@ -180,7 +271,13 @@ static int opus_select_arch_impl(void)
} }
arch++; arch++;
celt_assert(arch == OPUS_ARCH_ARM_NEON); if(!(flags & OPUS_CPU_ARM_DOTPROD_FLAG)) {
celt_assert(arch == OPUS_ARCH_ARM_NEON);
return arch;
}
arch++;
celt_assert(arch == OPUS_ARCH_ARM_DOTPROD);
return arch; return arch;
} }

View File

@ -46,6 +46,12 @@
# define MAY_HAVE_NEON(name) MAY_HAVE_MEDIA(name) # define MAY_HAVE_NEON(name) MAY_HAVE_MEDIA(name)
# endif # endif
# if defined(OPUS_ARM_MAY_HAVE_DOTPROD)
# define MAY_HAVE_DOTPROD(name) name ## _dotprod
# else
# define MAY_HAVE_DOTPROD(name) MAY_HAVE_NEON(name)
# endif
# if defined(OPUS_ARM_PRESUME_EDSP) # if defined(OPUS_ARM_PRESUME_EDSP)
# define PRESUME_EDSP(name) name ## _edsp # define PRESUME_EDSP(name) name ## _edsp
# else # else
@ -64,6 +70,12 @@
# define PRESUME_NEON(name) PRESUME_MEDIA(name) # define PRESUME_NEON(name) PRESUME_MEDIA(name)
# endif # endif
# if defined(OPUS_ARM_PRESUME_DOTPROD)
# define PRESUME_DOTPROD(name) name ## _dotprod
# else
# define PRESUME_DOTPROD(name) PRESUME_NEON(name)
# endif
# if defined(OPUS_HAVE_RTCD) # if defined(OPUS_HAVE_RTCD)
int opus_select_arch(void); int opus_select_arch(void);
@ -71,6 +83,7 @@ int opus_select_arch(void);
#define OPUS_ARCH_ARM_EDSP (1) #define OPUS_ARCH_ARM_EDSP (1)
#define OPUS_ARCH_ARM_MEDIA (2) #define OPUS_ARCH_ARM_MEDIA (2)
#define OPUS_ARCH_ARM_NEON (3) #define OPUS_ARCH_ARM_NEON (3)
#define OPUS_ARCH_ARM_DOTPROD (4)
# endif # endif

View File

@ -38,6 +38,8 @@
#include "../pitch.h" #include "../pitch.h"
#if defined(FIXED_POINT) #if defined(FIXED_POINT)
#include <string.h>
void xcorr_kernel_neon_fixed(const opus_val16 * x, const opus_val16 * y, opus_val32 sum[4], int len) void xcorr_kernel_neon_fixed(const opus_val16 * x, const opus_val16 * y, opus_val32 sum[4], int len)
{ {
int j; int j;
@ -47,7 +49,10 @@ void xcorr_kernel_neon_fixed(const opus_val16 * x, const opus_val16 * y, opus_va
int16x4_t y0 = vld1_s16(y); int16x4_t y0 = vld1_s16(y);
y += 4; y += 4;
for (j = 0; j + 8 <= len; j += 8) /* This loop loads one y value more than we actually need.
Therefore we have to stop as soon as there are 8 or fewer samples left
(instead of 7), to avoid reading past the end of the array. */
for (j = 0; j + 8 < len; j += 8)
{ {
/* Load x[0...7] */ /* Load x[0...7] */
int16x8_t xx = vld1q_s16(x); int16x8_t xx = vld1q_s16(x);
@ -80,23 +85,79 @@ void xcorr_kernel_neon_fixed(const opus_val16 * x, const opus_val16 * y, opus_va
x += 8; x += 8;
y += 8; y += 8;
} }
if (j + 4 < len) {
for (; j < len; j++) /* Load x[0...3] */
{ int16x4_t x0 = vld1_s16(x);
int16x4_t x0 = vld1_dup_s16(x); /* load next x */ /* Load y[4...7] */
int16x4_t y4 = vld1_s16(y);
int32x4_t a0 = vmlal_lane_s16(a, y0, x0, 0);
int16x4_t y1 = vext_s16(y0, y4, 1);
int32x4_t a1 = vmlal_lane_s16(a0, y1, x0, 1);
int16x4_t y2 = vext_s16(y0, y4, 2);
int32x4_t a2 = vmlal_lane_s16(a1, y2, x0, 2);
int16x4_t y3 = vext_s16(y0, y4, 3);
int32x4_t a3 = vmlal_lane_s16(a2, y3, x0, 3);
y0 = y4;
a = a3;
x += 4;
y += 4;
j += 4;
}
if (j + 2 < len) {
/* Load x[0...1] */
int16x4x2_t xx = vld2_dup_s16(x);
int16x4_t x0 = xx.val[0];
int16x4_t x1 = xx.val[1];
/* Load y[4...5].
We would like to use vld1_dup_s32(), but casting the pointer would
break strict aliasing rules and potentially have alignment issues.
Fortunately the compiler seems capable of translating this memcpy()
and vdup_n_s32() into the equivalent vld1_dup_s32().*/
int32_t yy;
memcpy(&yy, y, sizeof(yy));
int16x4_t y4 = vreinterpret_s16_s32(vdup_n_s32(yy));
int32x4_t a0 = vmlal_s16(a, y0, x0); int32x4_t a0 = vmlal_s16(a, y0, x0);
int16x4_t y1 = vext_s16(y0, y4, 1);
int16x4_t y4 = vld1_dup_s16(y); /* load next y */ /* Replace bottom copy of {y[5], y[4]} in y4 with {y[3], y[2]} from y0,
y0 = vext_s16(y0, y4, 1); using VSRI instead of VEXT, since it's a data-processing
instruction. */
y0 = vreinterpret_s16_s64(vsri_n_s64(vreinterpret_s64_s16(y4),
vreinterpret_s64_s16(y0), 32));
int32x4_t a1 = vmlal_s16(a0, y1, x1);
a = a1;
x += 2;
y += 2;
j += 2;
}
if (j + 1 < len) {
/* Load next x. */
int16x4_t x0 = vld1_dup_s16(x);
int32x4_t a0 = vmlal_s16(a, y0, x0);
/* Load last y. */
int16x4_t y4 = vld1_dup_s16(y);
y0 = vreinterpret_s16_s64(vsri_n_s64(vreinterpret_s64_s16(y4),
vreinterpret_s64_s16(y0), 16));
a = a0; a = a0;
x++; x++;
y++;
} }
/* Load last x. */
vst1q_s32(sum, a); int16x4_t x0 = vld1_dup_s16(x);
int32x4_t a0 = vmlal_s16(a, y0, x0);
vst1q_s32(sum, a0);
} }
#else #else
#if defined(__ARM_FEATURE_FMA) && defined(__ARM_ARCH_ISA_A64)
/* If we can, force the compiler to use an FMA instruction rather than break
* vmlaq_f32() into fmul/fadd. */
#ifdef vmlaq_lane_f32
#undef vmlaq_lane_f32
#endif
#define vmlaq_lane_f32(a,b,c,lane) vfmaq_lane_f32(a,b,c,lane)
#endif
/* /*
* Function: xcorr_kernel_neon_float * Function: xcorr_kernel_neon_float
* --------------------------------- * ---------------------------------

View File

@ -130,6 +130,13 @@ void dual_inner_prod_neon(const opus_val16 *x, const opus_val16 *y01, const opus
/* ========================================================================== */ /* ========================================================================== */
#ifdef __ARM_FEATURE_FMA
/* If we can, force the compiler to use an FMA instruction rather than break
vmlaq_f32() into fmul/fadd. */
#define vmlaq_f32(a,b,c) vfmaq_f32(a,b,c)
#endif
#ifdef OPUS_CHECK_ASM #ifdef OPUS_CHECK_ASM
/* This part of code simulates floating-point NEON operations. */ /* This part of code simulates floating-point NEON operations. */

View File

@ -1450,7 +1450,7 @@ void quant_all_bands(int encode, const CELTMode *m, int start, int end,
if (encode && resynth) if (encode && resynth)
lowband_scratch = _lowband_scratch; lowband_scratch = _lowband_scratch;
else else
lowband_scratch = X_+M*eBands[m->nbEBands-1]; lowband_scratch = X_+M*eBands[m->effEBands-1];
ALLOC(X_save, resynth_alloc, celt_norm); ALLOC(X_save, resynth_alloc, celt_norm);
ALLOC(Y_save, resynth_alloc, celt_norm); ALLOC(Y_save, resynth_alloc, celt_norm);
ALLOC(X_save2, resynth_alloc, celt_norm); ALLOC(X_save2, resynth_alloc, celt_norm);

View File

@ -42,6 +42,10 @@
#include "entdec.h" #include "entdec.h"
#include "arch.h" #include "arch.h"
#ifdef ENABLE_DEEP_PLC
#include "lpcnet.h"
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@ -149,6 +153,13 @@ int celt_decoder_get_size(int channels);
int celt_decoder_init(CELTDecoder *st, opus_int32 sampling_rate, int channels); int celt_decoder_init(CELTDecoder *st, opus_int32 sampling_rate, int channels);
int celt_decode_with_ec_dred(CELTDecoder * OPUS_RESTRICT st, const unsigned char *data,
int len, opus_val16 * OPUS_RESTRICT pcm, int frame_size, ec_dec *dec, int accum
#ifdef ENABLE_DEEP_PLC
,LPCNetPLCState *lpcnet
#endif
);
int celt_decode_with_ec(OpusCustomDecoder * OPUS_RESTRICT st, const unsigned char *data, int celt_decode_with_ec(OpusCustomDecoder * OPUS_RESTRICT st, const unsigned char *data,
int len, opus_val16 * OPUS_RESTRICT pcm, int frame_size, ec_dec *dec, int accum); int len, opus_val16 * OPUS_RESTRICT pcm, int frame_size, ec_dec *dec, int accum);
@ -225,23 +236,13 @@ void comb_filter(opus_val32 *y, opus_val32 *x, int T0, int T1, int N,
opus_val16 g0, opus_val16 g1, int tapset0, int tapset1, opus_val16 g0, opus_val16 g1, int tapset0, int tapset1,
const opus_val16 *window, int overlap, int arch); const opus_val16 *window, int overlap, int arch);
#ifdef NON_STATIC_COMB_FILTER_CONST_C
void comb_filter_const_c(opus_val32 *y, opus_val32 *x, int T, int N,
opus_val16 g10, opus_val16 g11, opus_val16 g12);
#endif
#ifndef OVERRIDE_COMB_FILTER_CONST
# define comb_filter_const(y, x, T, N, g10, g11, g12, arch) \
((void)(arch),comb_filter_const_c(y, x, T, N, g10, g11, g12))
#endif
void init_caps(const CELTMode *m,int *cap,int LM,int C); void init_caps(const CELTMode *m,int *cap,int LM,int C);
#ifdef RESYNTH #ifdef RESYNTH
void deemphasis(celt_sig *in[], opus_val16 *pcm, int N, int C, int downsample, const opus_val16 *coef, celt_sig *mem); void deemphasis(celt_sig *in[], opus_val16 *pcm, int N, int C, int downsample, const opus_val16 *coef, celt_sig *mem, int accum);
void celt_synthesis(const CELTMode *mode, celt_norm *X, celt_sig * out_syn[], void celt_synthesis(const CELTMode *mode, celt_norm *X, celt_sig * out_syn[],
opus_val16 *oldBandE, int start, int effEnd, int C, int CC, int isTransient, opus_val16 *oldBandE, int start, int effEnd, int C, int CC, int isTransient,
int LM, int downsample, int silence); int LM, int downsample, int silence, int arch);
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -51,6 +51,11 @@
#include "celt_lpc.h" #include "celt_lpc.h"
#include "vq.h" #include "vq.h"
#ifdef ENABLE_DEEP_PLC
#include "lpcnet.h"
#include "lpcnet_private.h"
#endif
/* The maximum pitch lag to allow in the pitch-based PLC. It's possible to save /* The maximum pitch lag to allow in the pitch-based PLC. It's possible to save
CPU time in the PLC pitch search by making this smaller than MAX_PERIOD. The CPU time in the PLC pitch search by making this smaller than MAX_PERIOD. The
current value corresponds to a pitch of 66.67 Hz. */ current value corresponds to a pitch of 66.67 Hz. */
@ -59,9 +64,6 @@
pitch of 480 Hz. */ pitch of 480 Hz. */
#define PLC_PITCH_LAG_MIN (100) #define PLC_PITCH_LAG_MIN (100)
#if defined(SMALL_FOOTPRINT) && defined(FIXED_POINT)
#define NORM_ALIASING_HACK
#endif
/**********************************************************************/ /**********************************************************************/
/* */ /* */
/* DECODER */ /* DECODER */
@ -69,6 +71,9 @@
/**********************************************************************/ /**********************************************************************/
#define DECODE_BUFFER_SIZE 2048 #define DECODE_BUFFER_SIZE 2048
#define PLC_UPDATE_FRAMES 4
#define PLC_UPDATE_SAMPLES (PLC_UPDATE_FRAMES*FRAME_SIZE)
/** Decoder state /** Decoder state
@brief Decoder state @brief Decoder state
*/ */
@ -82,6 +87,7 @@ struct OpusCustomDecoder {
int start, end; int start, end;
int signalling; int signalling;
int disable_inv; int disable_inv;
int complexity;
int arch; int arch;
/* Everything beyond this point gets cleared on a reset */ /* Everything beyond this point gets cleared on a reset */
@ -98,11 +104,18 @@ struct OpusCustomDecoder {
opus_val16 postfilter_gain_old; opus_val16 postfilter_gain_old;
int postfilter_tapset; int postfilter_tapset;
int postfilter_tapset_old; int postfilter_tapset_old;
int prefilter_and_fold;
celt_sig preemph_memD[2]; celt_sig preemph_memD[2];
#ifdef ENABLE_DEEP_PLC
opus_int16 plc_pcm[PLC_UPDATE_SAMPLES];
int plc_fill;
float plc_preemphasis_mem;
#endif
celt_sig _decode_mem[1]; /* Size = channels*(DECODE_BUFFER_SIZE+mode->overlap) */ celt_sig _decode_mem[1]; /* Size = channels*(DECODE_BUFFER_SIZE+mode->overlap) */
/* opus_val16 lpc[], Size = channels*LPC_ORDER */ /* opus_val16 lpc[], Size = channels*CELT_LPC_ORDER */
/* opus_val16 oldEBands[], Size = 2*mode->nbEBands */ /* opus_val16 oldEBands[], Size = 2*mode->nbEBands */
/* opus_val16 oldLogE[], Size = 2*mode->nbEBands */ /* opus_val16 oldLogE[], Size = 2*mode->nbEBands */
/* opus_val16 oldLogE2[], Size = 2*mode->nbEBands */ /* opus_val16 oldLogE2[], Size = 2*mode->nbEBands */
@ -157,7 +170,7 @@ OPUS_CUSTOM_NOSTATIC int opus_custom_decoder_get_size(const CELTMode *mode, int
{ {
int size = sizeof(struct CELTDecoder) int size = sizeof(struct CELTDecoder)
+ (channels*(DECODE_BUFFER_SIZE+mode->overlap)-1)*sizeof(celt_sig) + (channels*(DECODE_BUFFER_SIZE+mode->overlap)-1)*sizeof(celt_sig)
+ channels*LPC_ORDER*sizeof(opus_val16) + channels*CELT_LPC_ORDER*sizeof(opus_val16)
+ 4*2*mode->nbEBands*sizeof(opus_val16); + 4*2*mode->nbEBands*sizeof(opus_val16);
return size; return size;
} }
@ -499,7 +512,100 @@ static int celt_plc_pitch_search(celt_sig *decode_mem[2], int C, int arch)
return pitch_index; return pitch_index;
} }
static void celt_decode_lost(CELTDecoder * OPUS_RESTRICT st, int N, int LM) static void prefilter_and_fold(CELTDecoder * OPUS_RESTRICT st, int N)
{
int c;
int CC;
int i;
int overlap;
celt_sig *decode_mem[2];
const OpusCustomMode *mode;
VARDECL(opus_val32, etmp);
mode = st->mode;
overlap = st->overlap;
CC = st->channels;
ALLOC(etmp, overlap, opus_val32);
c=0; do {
decode_mem[c] = st->_decode_mem + c*(DECODE_BUFFER_SIZE+overlap);
} while (++c<CC);
c=0; do {
/* Apply the pre-filter to the MDCT overlap for the next frame because
the post-filter will be re-applied in the decoder after the MDCT
overlap. */
comb_filter(etmp, decode_mem[c]+DECODE_BUFFER_SIZE-N,
st->postfilter_period_old, st->postfilter_period, overlap,
-st->postfilter_gain_old, -st->postfilter_gain,
st->postfilter_tapset_old, st->postfilter_tapset, NULL, 0, st->arch);
/* Simulate TDAC on the concealed audio so that it blends with the
MDCT of the next frame. */
for (i=0;i<overlap/2;i++)
{
decode_mem[c][DECODE_BUFFER_SIZE-N+i] =
MULT16_32_Q15(mode->window[i], etmp[overlap-1-i])
+ MULT16_32_Q15(mode->window[overlap-i-1], etmp[i]);
}
} while (++c<CC);
}
#ifdef ENABLE_DEEP_PLC
#define SINC_ORDER 48
/* h=cos(pi/2*abs(sin([-24:24]/48*pi*23./24)).^2);
b=sinc([-24:24]/3*1.02).*h;
b=b/sum(b); */
static const float sinc_filter[SINC_ORDER+1] = {
4.2931e-05f, -0.000190293f, -0.000816132f, -0.000637162f, 0.00141662f, 0.00354764f, 0.00184368f, -0.00428274f,
-0.00856105f, -0.0034003f, 0.00930201f, 0.0159616f, 0.00489785f, -0.0169649f, -0.0259484f, -0.00596856f,
0.0286551f, 0.0405872f, 0.00649994f, -0.0509284f, -0.0716655f, -0.00665212f, 0.134336f, 0.278927f,
0.339995f, 0.278927f, 0.134336f, -0.00665212f, -0.0716655f, -0.0509284f, 0.00649994f, 0.0405872f,
0.0286551f, -0.00596856f, -0.0259484f, -0.0169649f, 0.00489785f, 0.0159616f, 0.00930201f, -0.0034003f,
-0.00856105f, -0.00428274f, 0.00184368f, 0.00354764f, 0.00141662f, -0.000637162f, -0.000816132f, -0.000190293f,
4.2931e-05f
};
void update_plc_state(LPCNetPLCState *lpcnet, celt_sig *decode_mem[2], float *plc_preemphasis_mem, int CC)
{
int i;
int tmp_read_post, tmp_fec_skip;
int offset;
celt_sig buf48k[DECODE_BUFFER_SIZE];
opus_int16 buf16k[PLC_UPDATE_SAMPLES];
if (CC == 1) OPUS_COPY(buf48k, decode_mem[0], DECODE_BUFFER_SIZE);
else {
for (i=0;i<DECODE_BUFFER_SIZE;i++) {
buf48k[i] = .5*(decode_mem[0][i] + decode_mem[1][i]);
}
}
/* Down-sample the last 40 ms. */
for (i=1;i<DECODE_BUFFER_SIZE;i++) buf48k[i] += PREEMPHASIS*buf48k[i-1];
*plc_preemphasis_mem = buf48k[DECODE_BUFFER_SIZE-1];
offset = DECODE_BUFFER_SIZE-SINC_ORDER-1 - 3*(PLC_UPDATE_SAMPLES-1);
celt_assert(3*(PLC_UPDATE_SAMPLES-1) + SINC_ORDER + offset == DECODE_BUFFER_SIZE-1);
for (i=0;i<PLC_UPDATE_SAMPLES;i++) {
int j;
float sum = 0;
for (j=0;j<SINC_ORDER+1;j++) {
sum += buf48k[3*i + j + offset]*sinc_filter[j];
}
buf16k[i] = float2int(MIN32(32767.f, MAX32(-32767.f, sum)));
}
tmp_read_post = lpcnet->fec_read_pos;
tmp_fec_skip = lpcnet->fec_skip;
for (i=0;i<PLC_UPDATE_FRAMES;i++) {
lpcnet_plc_update(lpcnet, &buf16k[FRAME_SIZE*i]);
}
lpcnet->fec_read_pos = tmp_read_post;
lpcnet->fec_skip = tmp_fec_skip;
}
#endif
static void celt_decode_lost(CELTDecoder * OPUS_RESTRICT st, int N, int LM
#ifdef ENABLE_DEEP_PLC
,LPCNetPLCState *lpcnet
#endif
)
{ {
int c; int c;
int i; int i;
@ -527,22 +633,22 @@ static void celt_decode_lost(CELTDecoder * OPUS_RESTRICT st, int N, int LM)
out_syn[c] = decode_mem[c]+DECODE_BUFFER_SIZE-N; out_syn[c] = decode_mem[c]+DECODE_BUFFER_SIZE-N;
} while (++c<C); } while (++c<C);
lpc = (opus_val16*)(st->_decode_mem+(DECODE_BUFFER_SIZE+overlap)*C); lpc = (opus_val16*)(st->_decode_mem+(DECODE_BUFFER_SIZE+overlap)*C);
oldBandE = lpc+C*LPC_ORDER; oldBandE = lpc+C*CELT_LPC_ORDER;
oldLogE = oldBandE + 2*nbEBands; oldLogE = oldBandE + 2*nbEBands;
oldLogE2 = oldLogE + 2*nbEBands; oldLogE2 = oldLogE + 2*nbEBands;
backgroundLogE = oldLogE2 + 2*nbEBands; backgroundLogE = oldLogE2 + 2*nbEBands;
loss_duration = st->loss_duration; loss_duration = st->loss_duration;
start = st->start; start = st->start;
#ifdef ENABLE_DEEP_PLC
noise_based = start != 0 || (lpcnet->fec_fill_pos == 0 && (st->skip_plc || loss_duration >= 80));
#else
noise_based = loss_duration >= 40 || start != 0 || st->skip_plc; noise_based = loss_duration >= 40 || start != 0 || st->skip_plc;
#endif
if (noise_based) if (noise_based)
{ {
/* Noise-based PLC/CNG */ /* Noise-based PLC/CNG */
#ifdef NORM_ALIASING_HACK
celt_norm *X;
#else
VARDECL(celt_norm, X); VARDECL(celt_norm, X);
#endif
opus_uint32 seed; opus_uint32 seed;
int end; int end;
int effEnd; int effEnd;
@ -550,18 +656,16 @@ static void celt_decode_lost(CELTDecoder * OPUS_RESTRICT st, int N, int LM)
end = st->end; end = st->end;
effEnd = IMAX(start, IMIN(end, mode->effEBands)); effEnd = IMAX(start, IMIN(end, mode->effEBands));
#ifdef NORM_ALIASING_HACK
/* This is an ugly hack that breaks aliasing rules and would be easily broken,
but it saves almost 4kB of stack. */
X = (celt_norm*)(out_syn[C-1]+overlap/2);
#else
ALLOC(X, C*N, celt_norm); /**< Interleaved normalised MDCTs */ ALLOC(X, C*N, celt_norm); /**< Interleaved normalised MDCTs */
#endif
c=0; do { c=0; do {
OPUS_MOVE(decode_mem[c], decode_mem[c]+N, OPUS_MOVE(decode_mem[c], decode_mem[c]+N,
DECODE_BUFFER_SIZE-N+(overlap>>1)); DECODE_BUFFER_SIZE-N+overlap);
} while (++c<C); } while (++c<C);
if (st->prefilter_and_fold) {
prefilter_and_fold(st, N);
}
/* Energy decay */ /* Energy decay */
decay = loss_duration==0 ? QCONST16(1.5f, DB_SHIFT) : QCONST16(.5f, DB_SHIFT); decay = loss_duration==0 ? QCONST16(1.5f, DB_SHIFT) : QCONST16(.5f, DB_SHIFT);
c=0; do c=0; do
@ -590,6 +694,9 @@ static void celt_decode_lost(CELTDecoder * OPUS_RESTRICT st, int N, int LM)
st->rng = seed; st->rng = seed;
celt_synthesis(mode, X, out_syn, oldBandE, start, effEnd, C, C, 0, LM, st->downsample, 0, st->arch); celt_synthesis(mode, X, out_syn, oldBandE, start, effEnd, C, C, 0, LM, st->downsample, 0, st->arch);
st->prefilter_and_fold = 0;
/* Skip regular PLC until we get two consecutive packets. */
st->skip_plc = 1;
} else { } else {
int exc_length; int exc_length;
/* Pitch-based PLC */ /* Pitch-based PLC */
@ -597,12 +704,14 @@ static void celt_decode_lost(CELTDecoder * OPUS_RESTRICT st, int N, int LM)
opus_val16 *exc; opus_val16 *exc;
opus_val16 fade = Q15ONE; opus_val16 fade = Q15ONE;
int pitch_index; int pitch_index;
VARDECL(opus_val32, etmp);
VARDECL(opus_val16, _exc); VARDECL(opus_val16, _exc);
VARDECL(opus_val16, fir_tmp); VARDECL(opus_val16, fir_tmp);
if (loss_duration == 0) if (loss_duration == 0)
{ {
#ifdef ENABLE_DEEP_PLC
if (lpcnet->loaded) update_plc_state(lpcnet, decode_mem, &st->plc_preemphasis_mem, C);
#endif
st->last_pitch_index = pitch_index = celt_plc_pitch_search(decode_mem, C, st->arch); st->last_pitch_index = pitch_index = celt_plc_pitch_search(decode_mem, C, st->arch);
} else { } else {
pitch_index = st->last_pitch_index; pitch_index = st->last_pitch_index;
@ -613,10 +722,9 @@ static void celt_decode_lost(CELTDecoder * OPUS_RESTRICT st, int N, int LM)
decaying signal, but we can't get more than MAX_PERIOD. */ decaying signal, but we can't get more than MAX_PERIOD. */
exc_length = IMIN(2*pitch_index, MAX_PERIOD); exc_length = IMIN(2*pitch_index, MAX_PERIOD);
ALLOC(etmp, overlap, opus_val32); ALLOC(_exc, MAX_PERIOD+CELT_LPC_ORDER, opus_val16);
ALLOC(_exc, MAX_PERIOD+LPC_ORDER, opus_val16);
ALLOC(fir_tmp, exc_length, opus_val16); ALLOC(fir_tmp, exc_length, opus_val16);
exc = _exc+LPC_ORDER; exc = _exc+CELT_LPC_ORDER;
window = mode->window; window = mode->window;
c=0; do { c=0; do {
opus_val16 decay; opus_val16 decay;
@ -628,16 +736,16 @@ static void celt_decode_lost(CELTDecoder * OPUS_RESTRICT st, int N, int LM)
int j; int j;
buf = decode_mem[c]; buf = decode_mem[c];
for (i=0;i<MAX_PERIOD+LPC_ORDER;i++) for (i=0;i<MAX_PERIOD+CELT_LPC_ORDER;i++)
exc[i-LPC_ORDER] = SROUND16(buf[DECODE_BUFFER_SIZE-MAX_PERIOD-LPC_ORDER+i], SIG_SHIFT); exc[i-CELT_LPC_ORDER] = SROUND16(buf[DECODE_BUFFER_SIZE-MAX_PERIOD-CELT_LPC_ORDER+i], SIG_SHIFT);
if (loss_duration == 0) if (loss_duration == 0)
{ {
opus_val32 ac[LPC_ORDER+1]; opus_val32 ac[CELT_LPC_ORDER+1];
/* Compute LPC coefficients for the last MAX_PERIOD samples before /* Compute LPC coefficients for the last MAX_PERIOD samples before
the first loss so we can work in the excitation-filter domain. */ the first loss so we can work in the excitation-filter domain. */
_celt_autocorr(exc, ac, window, overlap, _celt_autocorr(exc, ac, window, overlap,
LPC_ORDER, MAX_PERIOD, st->arch); CELT_LPC_ORDER, MAX_PERIOD, st->arch);
/* Add a noise floor of -40 dB. */ /* Add a noise floor of -40 dB. */
#ifdef FIXED_POINT #ifdef FIXED_POINT
ac[0] += SHR32(ac[0],13); ac[0] += SHR32(ac[0],13);
@ -645,7 +753,7 @@ static void celt_decode_lost(CELTDecoder * OPUS_RESTRICT st, int N, int LM)
ac[0] *= 1.0001f; ac[0] *= 1.0001f;
#endif #endif
/* Use lag windowing to stabilize the Levinson-Durbin recursion. */ /* Use lag windowing to stabilize the Levinson-Durbin recursion. */
for (i=1;i<=LPC_ORDER;i++) for (i=1;i<=CELT_LPC_ORDER;i++)
{ {
/*ac[i] *= exp(-.5*(2*M_PI*.002*i)*(2*M_PI*.002*i));*/ /*ac[i] *= exp(-.5*(2*M_PI*.002*i)*(2*M_PI*.002*i));*/
#ifdef FIXED_POINT #ifdef FIXED_POINT
@ -654,7 +762,7 @@ static void celt_decode_lost(CELTDecoder * OPUS_RESTRICT st, int N, int LM)
ac[i] -= ac[i]*(0.008f*0.008f)*i*i; ac[i] -= ac[i]*(0.008f*0.008f)*i*i;
#endif #endif
} }
_celt_lpc(lpc+c*LPC_ORDER, ac, LPC_ORDER); _celt_lpc(lpc+c*CELT_LPC_ORDER, ac, CELT_LPC_ORDER);
#ifdef FIXED_POINT #ifdef FIXED_POINT
/* For fixed-point, apply bandwidth expansion until we can guarantee that /* For fixed-point, apply bandwidth expansion until we can guarantee that
no overflow can happen in the IIR filter. This means: no overflow can happen in the IIR filter. This means:
@ -662,13 +770,13 @@ static void celt_decode_lost(CELTDecoder * OPUS_RESTRICT st, int N, int LM)
while (1) { while (1) {
opus_val16 tmp=Q15ONE; opus_val16 tmp=Q15ONE;
opus_val32 sum=QCONST16(1., SIG_SHIFT); opus_val32 sum=QCONST16(1., SIG_SHIFT);
for (i=0;i<LPC_ORDER;i++) for (i=0;i<CELT_LPC_ORDER;i++)
sum += ABS16(lpc[c*LPC_ORDER+i]); sum += ABS16(lpc[c*CELT_LPC_ORDER+i]);
if (sum < 65535) break; if (sum < 65535) break;
for (i=0;i<LPC_ORDER;i++) for (i=0;i<CELT_LPC_ORDER;i++)
{ {
tmp = MULT16_16_Q15(QCONST16(.99f,15), tmp); tmp = MULT16_16_Q15(QCONST16(.99f,15), tmp);
lpc[c*LPC_ORDER+i] = MULT16_16_Q15(lpc[c*LPC_ORDER+i], tmp); lpc[c*CELT_LPC_ORDER+i] = MULT16_16_Q15(lpc[c*CELT_LPC_ORDER+i], tmp);
} }
} }
#endif #endif
@ -678,8 +786,8 @@ static void celt_decode_lost(CELTDecoder * OPUS_RESTRICT st, int N, int LM)
{ {
/* Compute the excitation for exc_length samples before the loss. We need the copy /* Compute the excitation for exc_length samples before the loss. We need the copy
because celt_fir() cannot filter in-place. */ because celt_fir() cannot filter in-place. */
celt_fir(exc+MAX_PERIOD-exc_length, lpc+c*LPC_ORDER, celt_fir(exc+MAX_PERIOD-exc_length, lpc+c*CELT_LPC_ORDER,
fir_tmp, exc_length, LPC_ORDER, st->arch); fir_tmp, exc_length, CELT_LPC_ORDER, st->arch);
OPUS_COPY(exc+MAX_PERIOD-exc_length, fir_tmp, exc_length); OPUS_COPY(exc+MAX_PERIOD-exc_length, fir_tmp, exc_length);
} }
@ -737,15 +845,15 @@ static void celt_decode_lost(CELTDecoder * OPUS_RESTRICT st, int N, int LM)
S1 += SHR32(MULT16_16(tmp, tmp), 10); S1 += SHR32(MULT16_16(tmp, tmp), 10);
} }
{ {
opus_val16 lpc_mem[LPC_ORDER]; opus_val16 lpc_mem[CELT_LPC_ORDER];
/* Copy the last decoded samples (prior to the overlap region) to /* Copy the last decoded samples (prior to the overlap region) to
synthesis filter memory so we can have a continuous signal. */ synthesis filter memory so we can have a continuous signal. */
for (i=0;i<LPC_ORDER;i++) for (i=0;i<CELT_LPC_ORDER;i++)
lpc_mem[i] = SROUND16(buf[DECODE_BUFFER_SIZE-N-1-i], SIG_SHIFT); lpc_mem[i] = SROUND16(buf[DECODE_BUFFER_SIZE-N-1-i], SIG_SHIFT);
/* Apply the synthesis filter to convert the excitation back into /* Apply the synthesis filter to convert the excitation back into
the signal domain. */ the signal domain. */
celt_iir(buf+DECODE_BUFFER_SIZE-N, lpc+c*LPC_ORDER, celt_iir(buf+DECODE_BUFFER_SIZE-N, lpc+c*CELT_LPC_ORDER,
buf+DECODE_BUFFER_SIZE-N, extrapolation_len, LPC_ORDER, buf+DECODE_BUFFER_SIZE-N, extrapolation_len, CELT_LPC_ORDER,
lpc_mem, st->arch); lpc_mem, st->arch);
#ifdef FIXED_POINT #ifdef FIXED_POINT
for (i=0; i < extrapolation_len; i++) for (i=0; i < extrapolation_len; i++)
@ -792,23 +900,65 @@ static void celt_decode_lost(CELTDecoder * OPUS_RESTRICT st, int N, int LM)
} }
} }
/* Apply the pre-filter to the MDCT overlap for the next frame because
the post-filter will be re-applied in the decoder after the MDCT
overlap. */
comb_filter(etmp, buf+DECODE_BUFFER_SIZE,
st->postfilter_period, st->postfilter_period, overlap,
-st->postfilter_gain, -st->postfilter_gain,
st->postfilter_tapset, st->postfilter_tapset, NULL, 0, st->arch);
/* Simulate TDAC on the concealed audio so that it blends with the
MDCT of the next frame. */
for (i=0;i<overlap/2;i++)
{
buf[DECODE_BUFFER_SIZE+i] =
MULT16_32_Q15(window[i], etmp[overlap-1-i])
+ MULT16_32_Q15(window[overlap-i-1], etmp[i]);
}
} while (++c<C); } while (++c<C);
#ifdef ENABLE_DEEP_PLC
if (lpcnet->loaded && (st->complexity >= 5 || lpcnet->fec_fill_pos > 0)) {
float overlap_mem;
int samples_needed16k;
celt_sig *buf;
VARDECL(float, buf_copy);
buf = decode_mem[0];
ALLOC(buf_copy, C*overlap, float);
c=0; do {
OPUS_COPY(buf_copy+c*overlap, &decode_mem[c][DECODE_BUFFER_SIZE-N], overlap);
} while (++c<C);
/* Need enough samples from the PLC to cover the frame size, resampling delay,
and the overlap at the end. */
samples_needed16k = (N+SINC_ORDER+overlap)/3;
if (loss_duration == 0) {
st->plc_fill = 0;
}
while (st->plc_fill < samples_needed16k) {
lpcnet_plc_conceal(lpcnet, &st->plc_pcm[st->plc_fill]);
st->plc_fill += FRAME_SIZE;
}
/* Resample to 48 kHz. */
for (i=0;i<(N+overlap)/3;i++) {
int j;
float sum;
for (sum=0, j=0;j<17;j++) sum += 3*st->plc_pcm[i+j]*sinc_filter[3*j];
buf[DECODE_BUFFER_SIZE-N+3*i] = sum;
for (sum=0, j=0;j<16;j++) sum += 3*st->plc_pcm[i+j+1]*sinc_filter[3*j+2];
buf[DECODE_BUFFER_SIZE-N+3*i+1] = sum;
for (sum=0, j=0;j<16;j++) sum += 3*st->plc_pcm[i+j+1]*sinc_filter[3*j+1];
buf[DECODE_BUFFER_SIZE-N+3*i+2] = sum;
}
OPUS_MOVE(st->plc_pcm, &st->plc_pcm[N/3], st->plc_fill-N/3);
st->plc_fill -= N/3;
for (i=0;i<N;i++) {
float tmp = buf[DECODE_BUFFER_SIZE-N+i];
buf[DECODE_BUFFER_SIZE-N+i] -= PREEMPHASIS*st->plc_preemphasis_mem;
st->plc_preemphasis_mem = tmp;
}
overlap_mem = st->plc_preemphasis_mem;
for (i=0;i<overlap;i++) {
float tmp = buf[DECODE_BUFFER_SIZE+i];
buf[DECODE_BUFFER_SIZE+i] -= PREEMPHASIS*overlap_mem;
overlap_mem = tmp;
}
/* For now, we just do mono PLC. */
if (C==2) OPUS_COPY(decode_mem[1], decode_mem[0], DECODE_BUFFER_SIZE+overlap);
c=0; do {
/* Cross-fade with 48-kHz non-neural PLC for the first 2.5 ms to avoid a discontinuity. */
if (loss_duration == 0) {
for (i=0;i<overlap;i++) decode_mem[c][DECODE_BUFFER_SIZE-N+i] = (1-window[i])*buf_copy[c*overlap+i] + (window[i])*decode_mem[c][DECODE_BUFFER_SIZE-N+i];
}
} while (++c<C);
}
#endif
st->prefilter_and_fold = 1;
} }
/* Saturate to soemthing large to avoid wrap-around. */ /* Saturate to soemthing large to avoid wrap-around. */
@ -817,18 +967,18 @@ static void celt_decode_lost(CELTDecoder * OPUS_RESTRICT st, int N, int LM)
RESTORE_STACK; RESTORE_STACK;
} }
int celt_decode_with_ec(CELTDecoder * OPUS_RESTRICT st, const unsigned char *data, int celt_decode_with_ec_dred(CELTDecoder * OPUS_RESTRICT st, const unsigned char *data,
int len, opus_val16 * OPUS_RESTRICT pcm, int frame_size, ec_dec *dec, int accum) int len, opus_val16 * OPUS_RESTRICT pcm, int frame_size, ec_dec *dec, int accum
#ifdef ENABLE_DEEP_PLC
,LPCNetPLCState *lpcnet
#endif
)
{ {
int c, i, N; int c, i, N;
int spread_decision; int spread_decision;
opus_int32 bits; opus_int32 bits;
ec_dec _dec; ec_dec _dec;
#ifdef NORM_ALIASING_HACK
celt_norm *X;
#else
VARDECL(celt_norm, X); VARDECL(celt_norm, X);
#endif
VARDECL(int, fine_quant); VARDECL(int, fine_quant);
VARDECL(int, pulses); VARDECL(int, pulses);
VARDECL(int, cap); VARDECL(int, cap);
@ -881,7 +1031,7 @@ int celt_decode_with_ec(CELTDecoder * OPUS_RESTRICT st, const unsigned char *dat
frame_size *= st->downsample; frame_size *= st->downsample;
lpc = (opus_val16*)(st->_decode_mem+(DECODE_BUFFER_SIZE+overlap)*CC); lpc = (opus_val16*)(st->_decode_mem+(DECODE_BUFFER_SIZE+overlap)*CC);
oldBandE = lpc+CC*LPC_ORDER; oldBandE = lpc+CC*CELT_LPC_ORDER;
oldLogE = oldBandE + 2*nbEBands; oldLogE = oldBandE + 2*nbEBands;
oldLogE2 = oldLogE + 2*nbEBands; oldLogE2 = oldLogE + 2*nbEBands;
backgroundLogE = oldLogE2 + 2*nbEBands; backgroundLogE = oldLogE2 + 2*nbEBands;
@ -935,15 +1085,25 @@ int celt_decode_with_ec(CELTDecoder * OPUS_RESTRICT st, const unsigned char *dat
if (data == NULL || len<=1) if (data == NULL || len<=1)
{ {
celt_decode_lost(st, N, LM); celt_decode_lost(st, N, LM
#ifdef ENABLE_DEEP_PLC
, lpcnet
#endif
);
deemphasis(out_syn, pcm, N, CC, st->downsample, mode->preemph, st->preemph_memD, accum); deemphasis(out_syn, pcm, N, CC, st->downsample, mode->preemph, st->preemph_memD, accum);
RESTORE_STACK; RESTORE_STACK;
return frame_size/st->downsample; return frame_size/st->downsample;
} }
#ifdef ENABLE_DEEP_PLC
else {
/* FIXME: This is a bit of a hack just to make sure opus_decode_native() knows we're no longer in PLC. */
if (lpcnet) lpcnet->blend = 0;
}
#endif
/* Check if there are at least two packets received consecutively before /* Check if there are at least two packets received consecutively before
* turning on the pitch-based PLC */ * turning on the pitch-based PLC */
st->skip_plc = st->loss_duration != 0; if (st->loss_duration == 0) st->skip_plc = 0;
if (dec == NULL) if (dec == NULL)
{ {
@ -1006,6 +1166,36 @@ int celt_decode_with_ec(CELTDecoder * OPUS_RESTRICT st, const unsigned char *dat
/* Decode the global flags (first symbols in the stream) */ /* Decode the global flags (first symbols in the stream) */
intra_ener = tell+3<=total_bits ? ec_dec_bit_logp(dec, 3) : 0; intra_ener = tell+3<=total_bits ? ec_dec_bit_logp(dec, 3) : 0;
/* If recovering from packet loss, make sure we make the energy prediction safe to reduce the
risk of getting loud artifacts. */
if (!intra_ener && st->loss_duration != 0) {
c=0; do
{
opus_val16 safety = 0;
int missing = IMIN(10, st->loss_duration>>LM);
if (LM==0) safety = QCONST16(1.5f,DB_SHIFT);
else if (LM==1) safety = QCONST16(.5f,DB_SHIFT);
for (i=start;i<end;i++)
{
if (oldBandE[c*nbEBands+i] < MAX16(oldLogE[c*nbEBands+i], oldLogE2[c*nbEBands+i])) {
/* If energy is going down already, continue the trend. */
opus_val32 slope;
opus_val32 E0, E1, E2;
E0 = oldBandE[c*nbEBands+i];
E1 = oldLogE[c*nbEBands+i];
E2 = oldLogE2[c*nbEBands+i];
slope = MAX32(E1 - E0, HALF32(E2 - E0));
E0 -= MAX32(0, (1+missing)*slope);
oldBandE[c*nbEBands+i] = MAX32(-QCONST16(20.f,DB_SHIFT), E0);
} else {
/* Otherwise take the min of the last frames. */
oldBandE[c*nbEBands+i] = MIN16(MIN16(oldBandE[c*nbEBands+i], oldLogE[c*nbEBands+i]), oldLogE2[c*nbEBands+i]);
}
/* Shorter frames have more natural fluctuations -- play it safe. */
oldBandE[c*nbEBands+i] -= safety;
}
} while (++c<2);
}
/* Get band energies */ /* Get band energies */
unquant_coarse_energy(mode, start, end, oldBandE, unquant_coarse_energy(mode, start, end, oldBandE,
intra_ener, dec, C, LM); intra_ener, dec, C, LM);
@ -1073,19 +1263,13 @@ int celt_decode_with_ec(CELTDecoder * OPUS_RESTRICT st, const unsigned char *dat
unquant_fine_energy(mode, start, end, oldBandE, fine_quant, dec, C); unquant_fine_energy(mode, start, end, oldBandE, fine_quant, dec, C);
c=0; do { c=0; do {
OPUS_MOVE(decode_mem[c], decode_mem[c]+N, DECODE_BUFFER_SIZE-N+overlap/2); OPUS_MOVE(decode_mem[c], decode_mem[c]+N, DECODE_BUFFER_SIZE-N+overlap);
} while (++c<CC); } while (++c<CC);
/* Decode fixed codebook */ /* Decode fixed codebook */
ALLOC(collapse_masks, C*nbEBands, unsigned char); ALLOC(collapse_masks, C*nbEBands, unsigned char);
#ifdef NORM_ALIASING_HACK
/* This is an ugly hack that breaks aliasing rules and would be easily broken,
but it saves almost 4kB of stack. */
X = (celt_norm*)(out_syn[CC-1]+overlap/2);
#else
ALLOC(X, C*N, celt_norm); /**< Interleaved normalised MDCTs */ ALLOC(X, C*N, celt_norm); /**< Interleaved normalised MDCTs */
#endif
quant_all_bands(0, mode, start, end, X, C==2 ? X+N : NULL, collapse_masks, quant_all_bands(0, mode, start, end, X, C==2 ? X+N : NULL, collapse_masks,
NULL, pulses, shortBlocks, spread_decision, dual_stereo, intensity, tf_res, NULL, pulses, shortBlocks, spread_decision, dual_stereo, intensity, tf_res,
@ -1109,7 +1293,9 @@ int celt_decode_with_ec(CELTDecoder * OPUS_RESTRICT st, const unsigned char *dat
for (i=0;i<C*nbEBands;i++) for (i=0;i<C*nbEBands;i++)
oldBandE[i] = -QCONST16(28.f,DB_SHIFT); oldBandE[i] = -QCONST16(28.f,DB_SHIFT);
} }
if (st->prefilter_and_fold) {
prefilter_and_fold(st, N);
}
celt_synthesis(mode, X, out_syn, oldBandE, start, effEnd, celt_synthesis(mode, X, out_syn, oldBandE, start, effEnd,
C, CC, isTransient, LM, st->downsample, silence, st->arch); C, CC, isTransient, LM, st->downsample, silence, st->arch);
@ -1173,6 +1359,7 @@ int celt_decode_with_ec(CELTDecoder * OPUS_RESTRICT st, const unsigned char *dat
deemphasis(out_syn, pcm, N, CC, st->downsample, mode->preemph, st->preemph_memD, accum); deemphasis(out_syn, pcm, N, CC, st->downsample, mode->preemph, st->preemph_memD, accum);
st->loss_duration = 0; st->loss_duration = 0;
st->prefilter_and_fold = 0;
RESTORE_STACK; RESTORE_STACK;
if (ec_tell(dec) > 8*len) if (ec_tell(dec) > 8*len)
return OPUS_INTERNAL_ERROR; return OPUS_INTERNAL_ERROR;
@ -1181,6 +1368,15 @@ int celt_decode_with_ec(CELTDecoder * OPUS_RESTRICT st, const unsigned char *dat
return frame_size/st->downsample; return frame_size/st->downsample;
} }
int celt_decode_with_ec(CELTDecoder * OPUS_RESTRICT st, const unsigned char *data,
int len, opus_val16 * OPUS_RESTRICT pcm, int frame_size, ec_dec *dec, int accum)
{
return celt_decode_with_ec_dred(st, data, len, pcm, frame_size, dec, accum
#ifdef ENABLE_DEEP_PLC
, NULL
#endif
);
}
#ifdef CUSTOM_MODES #ifdef CUSTOM_MODES
@ -1254,6 +1450,26 @@ int opus_custom_decoder_ctl(CELTDecoder * OPUS_RESTRICT st, int request, ...)
va_start(ap, request); va_start(ap, request);
switch (request) switch (request)
{ {
case OPUS_SET_COMPLEXITY_REQUEST:
{
opus_int32 value = va_arg(ap, opus_int32);
if(value<0 || value>10)
{
goto bad_arg;
}
st->complexity = value;
}
break;
case OPUS_GET_COMPLEXITY_REQUEST:
{
opus_int32 *value = va_arg(ap, opus_int32*);
if (!value)
{
goto bad_arg;
}
*value = st->complexity;
}
break;
case CELT_SET_START_BAND_REQUEST: case CELT_SET_START_BAND_REQUEST:
{ {
opus_int32 value = va_arg(ap, opus_int32); opus_int32 value = va_arg(ap, opus_int32);
@ -1300,7 +1516,7 @@ int opus_custom_decoder_ctl(CELTDecoder * OPUS_RESTRICT st, int request, ...)
int i; int i;
opus_val16 *lpc, *oldBandE, *oldLogE, *oldLogE2; opus_val16 *lpc, *oldBandE, *oldLogE, *oldLogE2;
lpc = (opus_val16*)(st->_decode_mem+(DECODE_BUFFER_SIZE+st->overlap)*st->channels); lpc = (opus_val16*)(st->_decode_mem+(DECODE_BUFFER_SIZE+st->overlap)*st->channels);
oldBandE = lpc+st->channels*LPC_ORDER; oldBandE = lpc+st->channels*CELT_LPC_ORDER;
oldLogE = oldBandE + 2*st->mode->nbEBands; oldLogE = oldBandE + 2*st->mode->nbEBands;
oldLogE2 = oldLogE + 2*st->mode->nbEBands; oldLogE2 = oldLogE + 2*st->mode->nbEBands;
OPUS_CLEAR((char*)&st->DECODER_RESET_START, OPUS_CLEAR((char*)&st->DECODER_RESET_START,

View File

@ -281,6 +281,9 @@ static int transient_analysis(const opus_val32 * OPUS_RESTRICT in, int len, int
/* High-pass filter: (1 - 2*z^-1 + z^-2) / (1 - z^-1 + .5*z^-2) */ /* High-pass filter: (1 - 2*z^-1 + z^-2) / (1 - z^-1 + .5*z^-2) */
for (i=0;i<len;i++) for (i=0;i<len;i++)
{ {
#ifndef FIXED_POINT
float mem00;
#endif
opus_val32 x,y; opus_val32 x,y;
x = SHR32(in[i+c*len],SIG_SHIFT); x = SHR32(in[i+c*len],SIG_SHIFT);
y = ADD32(mem0, x); y = ADD32(mem0, x);
@ -288,8 +291,13 @@ static int transient_analysis(const opus_val32 * OPUS_RESTRICT in, int len, int
mem0 = mem1 + y - SHL32(x,1); mem0 = mem1 + y - SHL32(x,1);
mem1 = x - SHR32(y,1); mem1 = x - SHR32(y,1);
#else #else
/* Original code:
mem0 = mem1 + y - 2*x; mem0 = mem1 + y - 2*x;
mem1 = x - .5f*y; mem1 = x - .5f*y;
Modified code to shorten dependency chains: */
mem00=mem0;
mem0 = mem0 - x + .5f*mem1;
mem1 = x - mem00;
#endif #endif
tmp[i] = SROUND16(y, 2); tmp[i] = SROUND16(y, 2);
/*printf("%f ", tmp[i]);*/ /*printf("%f ", tmp[i]);*/
@ -322,10 +330,11 @@ static int transient_analysis(const opus_val32 * OPUS_RESTRICT in, int len, int
#ifdef FIXED_POINT #ifdef FIXED_POINT
/* FIXME: Use PSHR16() instead */ /* FIXME: Use PSHR16() instead */
tmp[i] = mem0 + PSHR32(x2-mem0,forward_shift); tmp[i] = mem0 + PSHR32(x2-mem0,forward_shift);
#else
tmp[i] = mem0 + MULT16_16_P15(forward_decay,x2-mem0);
#endif
mem0 = tmp[i]; mem0 = tmp[i];
#else
mem0 = x2 + (1.f-forward_decay)*mem0;
tmp[i] = forward_decay*mem0;
#endif
} }
mem0=0; mem0=0;
@ -337,11 +346,13 @@ static int transient_analysis(const opus_val32 * OPUS_RESTRICT in, int len, int
#ifdef FIXED_POINT #ifdef FIXED_POINT
/* FIXME: Use PSHR16() instead */ /* FIXME: Use PSHR16() instead */
tmp[i] = mem0 + PSHR32(tmp[i]-mem0,3); tmp[i] = mem0 + PSHR32(tmp[i]-mem0,3);
#else
tmp[i] = mem0 + MULT16_16_P15(QCONST16(0.125f,15),tmp[i]-mem0);
#endif
mem0 = tmp[i]; mem0 = tmp[i];
maxE = MAX16(maxE, mem0); maxE = MAX16(maxE, mem0);
#else
mem0 = tmp[i] + 0.875f*mem0;
tmp[i] = 0.125f*mem0;
maxE = MAX16(maxE, 0.125f*mem0);
#endif
} }
/*for (i=0;i<len2;i++)printf("%f ", tmp[i]/mean);printf("\n");*/ /*for (i=0;i<len2;i++)printf("%f ", tmp[i]/mean);printf("\n");*/
@ -967,7 +978,7 @@ static opus_val16 median_of_3(const opus_val16 *x)
return t0; return t0;
} }
static opus_val16 dynalloc_analysis(const opus_val16 *bandLogE, const opus_val16 *bandLogE2, static opus_val16 dynalloc_analysis(const opus_val16 *bandLogE, const opus_val16 *bandLogE2, const opus_val16 *oldBandE,
int nbEBands, int start, int end, int C, int *offsets, int lsb_depth, const opus_int16 *logN, int nbEBands, int start, int end, int C, int *offsets, int lsb_depth, const opus_int16 *logN,
int isTransient, int vbr, int constrained_vbr, const opus_int16 *eBands, int LM, int isTransient, int vbr, int constrained_vbr, const opus_int16 *eBands, int LM,
int effectiveBytes, opus_int32 *tot_boost_, int lfe, opus_val16 *surround_dynalloc, int effectiveBytes, opus_int32 *tot_boost_, int lfe, opus_val16 *surround_dynalloc,
@ -978,9 +989,11 @@ static opus_val16 dynalloc_analysis(const opus_val16 *bandLogE, const opus_val16
opus_val16 maxDepth; opus_val16 maxDepth;
VARDECL(opus_val16, follower); VARDECL(opus_val16, follower);
VARDECL(opus_val16, noise_floor); VARDECL(opus_val16, noise_floor);
VARDECL(opus_val16, bandLogE3);
SAVE_STACK; SAVE_STACK;
ALLOC(follower, C*nbEBands, opus_val16); ALLOC(follower, C*nbEBands, opus_val16);
ALLOC(noise_floor, C*nbEBands, opus_val16); ALLOC(noise_floor, C*nbEBands, opus_val16);
ALLOC(bandLogE3, nbEBands, opus_val16);
OPUS_CLEAR(offsets, nbEBands); OPUS_CLEAR(offsets, nbEBands);
/* Dynamic allocation code */ /* Dynamic allocation code */
maxDepth=-QCONST16(31.9f, DB_SHIFT); maxDepth=-QCONST16(31.9f, DB_SHIFT);
@ -1033,8 +1046,10 @@ static opus_val16 dynalloc_analysis(const opus_val16 *bandLogE, const opus_val16
printf("%d ", spread_weight[i]); printf("%d ", spread_weight[i]);
printf("\n");*/ printf("\n");*/
} }
/* Make sure that dynamic allocation can't make us bust the budget */ /* Make sure that dynamic allocation can't make us bust the budget.
if (effectiveBytes > 50 && LM>=1 && !lfe) We enable the feature starting at 24 kb/s for 20-ms frames
and 96 kb/s for 2.5 ms frames. */
if (effectiveBytes >= (30 + 5*LM) && !lfe)
{ {
int last=0; int last=0;
c=0;do c=0;do
@ -1042,30 +1057,38 @@ static opus_val16 dynalloc_analysis(const opus_val16 *bandLogE, const opus_val16
opus_val16 offset; opus_val16 offset;
opus_val16 tmp; opus_val16 tmp;
opus_val16 *f; opus_val16 *f;
OPUS_COPY(bandLogE3, &bandLogE2[c*nbEBands], end);
if (LM==0) {
/* For 2.5 ms frames, the first 8 bands have just one bin, so the
energy is highly unreliable (high variance). For that reason,
we take the max with the previous energy so that at least 2 bins
are getting used. */
for (i=0;i<IMIN(8,end);i++) bandLogE3[i] = MAX16(bandLogE2[c*nbEBands+i], oldBandE[c*nbEBands+i]);
}
f = &follower[c*nbEBands]; f = &follower[c*nbEBands];
f[0] = bandLogE2[c*nbEBands]; f[0] = bandLogE3[0];
for (i=1;i<end;i++) for (i=1;i<end;i++)
{ {
/* The last band to be at least 3 dB higher than the previous one /* The last band to be at least 3 dB higher than the previous one
is the last we'll consider. Otherwise, we run into problems on is the last we'll consider. Otherwise, we run into problems on
bandlimited signals. */ bandlimited signals. */
if (bandLogE2[c*nbEBands+i] > bandLogE2[c*nbEBands+i-1]+QCONST16(.5f,DB_SHIFT)) if (bandLogE3[i] > bandLogE3[i-1]+QCONST16(.5f,DB_SHIFT))
last=i; last=i;
f[i] = MIN16(f[i-1]+QCONST16(1.5f,DB_SHIFT), bandLogE2[c*nbEBands+i]); f[i] = MIN16(f[i-1]+QCONST16(1.5f,DB_SHIFT), bandLogE3[i]);
} }
for (i=last-1;i>=0;i--) for (i=last-1;i>=0;i--)
f[i] = MIN16(f[i], MIN16(f[i+1]+QCONST16(2.f,DB_SHIFT), bandLogE2[c*nbEBands+i])); f[i] = MIN16(f[i], MIN16(f[i+1]+QCONST16(2.f,DB_SHIFT), bandLogE3[i]));
/* Combine with a median filter to avoid dynalloc triggering unnecessarily. /* Combine with a median filter to avoid dynalloc triggering unnecessarily.
The "offset" value controls how conservative we are -- a higher offset The "offset" value controls how conservative we are -- a higher offset
reduces the impact of the median filter and makes dynalloc use more bits. */ reduces the impact of the median filter and makes dynalloc use more bits. */
offset = QCONST16(1.f, DB_SHIFT); offset = QCONST16(1.f, DB_SHIFT);
for (i=2;i<end-2;i++) for (i=2;i<end-2;i++)
f[i] = MAX16(f[i], median_of_5(&bandLogE2[c*nbEBands+i-2])-offset); f[i] = MAX16(f[i], median_of_5(&bandLogE3[i-2])-offset);
tmp = median_of_3(&bandLogE2[c*nbEBands])-offset; tmp = median_of_3(&bandLogE3[0])-offset;
f[0] = MAX16(f[0], tmp); f[0] = MAX16(f[0], tmp);
f[1] = MAX16(f[1], tmp); f[1] = MAX16(f[1], tmp);
tmp = median_of_3(&bandLogE2[c*nbEBands+end-3])-offset; tmp = median_of_3(&bandLogE3[end-3])-offset;
f[end-2] = MAX16(f[end-2], tmp); f[end-2] = MAX16(f[end-2], tmp);
f[end-1] = MAX16(f[end-1], tmp); f[end-1] = MAX16(f[end-1], tmp);
@ -1565,10 +1588,13 @@ int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm,
vbr_rate = 0; vbr_rate = 0;
tmp = st->bitrate*frame_size; tmp = st->bitrate*frame_size;
if (tell>1) if (tell>1)
tmp += tell; tmp += tell*mode->Fs;
if (st->bitrate!=OPUS_BITRATE_MAX) if (st->bitrate!=OPUS_BITRATE_MAX)
{
nbCompressedBytes = IMAX(2, IMIN(nbCompressedBytes, nbCompressedBytes = IMAX(2, IMIN(nbCompressedBytes,
(tmp+4*mode->Fs)/(8*mode->Fs)-!!st->signalling)); (tmp+4*mode->Fs)/(8*mode->Fs)-!!st->signalling));
ec_enc_shrink(enc, nbCompressedBytes);
}
effectiveBytes = nbCompressedBytes - nbFilledBytes; effectiveBytes = nbCompressedBytes - nbFilledBytes;
} }
equiv_rate = ((opus_int32)nbCompressedBytes*8*50 << (3-LM)) - (40*C+20)*((400>>LM) - 50); equiv_rate = ((opus_int32)nbCompressedBytes*8*50 << (3-LM)) - (40*C+20)*((400>>LM) - 50);
@ -1882,7 +1908,7 @@ int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm,
ALLOC(importance, nbEBands, int); ALLOC(importance, nbEBands, int);
ALLOC(spread_weight, nbEBands, int); ALLOC(spread_weight, nbEBands, int);
maxDepth = dynalloc_analysis(bandLogE, bandLogE2, nbEBands, start, end, C, offsets, maxDepth = dynalloc_analysis(bandLogE, bandLogE2, oldBandE, nbEBands, start, end, C, offsets,
st->lsb_depth, mode->logN, isTransient, st->vbr, st->constrained_vbr, st->lsb_depth, mode->logN, isTransient, st->vbr, st->constrained_vbr,
eBands, LM, effectiveBytes, &tot_boost, st->lfe, surround_dynalloc, &st->analysis, importance, spread_weight); eBands, LM, effectiveBytes, &tot_boost, st->lfe, surround_dynalloc, &st->analysis, importance, spread_weight);
@ -2246,7 +2272,7 @@ int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm,
if (anti_collapse_on) if (anti_collapse_on)
{ {
anti_collapse(mode, X, collapse_masks, LM, C, N, anti_collapse(mode, X, collapse_masks, LM, C, N,
start, end, oldBandE, oldLogE, oldLogE2, pulses, st->rng); start, end, oldBandE, oldLogE, oldLogE2, pulses, st->rng, st->arch);
} }
c=0; do { c=0; do {
@ -2265,15 +2291,15 @@ int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm,
st->prefilter_period_old=IMAX(st->prefilter_period_old, COMBFILTER_MINPERIOD); st->prefilter_period_old=IMAX(st->prefilter_period_old, COMBFILTER_MINPERIOD);
comb_filter(out_mem[c], out_mem[c], st->prefilter_period_old, st->prefilter_period, mode->shortMdctSize, comb_filter(out_mem[c], out_mem[c], st->prefilter_period_old, st->prefilter_period, mode->shortMdctSize,
st->prefilter_gain_old, st->prefilter_gain, st->prefilter_tapset_old, st->prefilter_tapset, st->prefilter_gain_old, st->prefilter_gain, st->prefilter_tapset_old, st->prefilter_tapset,
mode->window, overlap); mode->window, overlap, st->arch);
if (LM!=0) if (LM!=0)
comb_filter(out_mem[c]+mode->shortMdctSize, out_mem[c]+mode->shortMdctSize, st->prefilter_period, pitch_index, N-mode->shortMdctSize, comb_filter(out_mem[c]+mode->shortMdctSize, out_mem[c]+mode->shortMdctSize, st->prefilter_period, pitch_index, N-mode->shortMdctSize,
st->prefilter_gain, gain1, st->prefilter_tapset, prefilter_tapset, st->prefilter_gain, gain1, st->prefilter_tapset, prefilter_tapset,
mode->window, overlap); mode->window, overlap, st->arch);
} while (++c<CC); } while (++c<CC);
/* We reuse freq[] as scratch space for the de-emphasis */ /* We reuse freq[] as scratch space for the de-emphasis */
deemphasis(out_mem, (opus_val16*)pcm, N, CC, st->upsample, mode->preemph, st->preemph_memD); deemphasis(out_mem, (opus_val16*)pcm, N, CC, st->upsample, mode->preemph, st->preemph_memD, 0);
st->prefilter_period_old = st->prefilter_period; st->prefilter_period_old = st->prefilter_period;
st->prefilter_gain_old = st->prefilter_gain; st->prefilter_gain_old = st->prefilter_gain;
st->prefilter_tapset_old = st->prefilter_tapset; st->prefilter_tapset_old = st->prefilter_tapset;

View File

@ -44,7 +44,7 @@ int p
opus_val32 r; opus_val32 r;
opus_val32 error = ac[0]; opus_val32 error = ac[0];
#ifdef FIXED_POINT #ifdef FIXED_POINT
opus_val32 lpc[LPC_ORDER]; opus_val32 lpc[CELT_LPC_ORDER];
#else #else
float *lpc = _lpc; float *lpc = _lpc;
#endif #endif
@ -158,7 +158,17 @@ void celt_fir_c(
sum[1] = SHL32(EXTEND32(x[i+1]), SIG_SHIFT); sum[1] = SHL32(EXTEND32(x[i+1]), SIG_SHIFT);
sum[2] = SHL32(EXTEND32(x[i+2]), SIG_SHIFT); sum[2] = SHL32(EXTEND32(x[i+2]), SIG_SHIFT);
sum[3] = SHL32(EXTEND32(x[i+3]), SIG_SHIFT); sum[3] = SHL32(EXTEND32(x[i+3]), SIG_SHIFT);
xcorr_kernel(rnum, x+i-ord, sum, ord, arch); #if defined(OPUS_CHECK_ASM) && defined(FIXED_POINT)
{
opus_val32 sum_c[4];
memcpy(sum_c, sum, sizeof(sum_c));
xcorr_kernel_c(rnum, x+i-ord, sum_c, ord);
#endif
xcorr_kernel(rnum, x+i-ord, sum, ord, arch);
#if defined(OPUS_CHECK_ASM) && defined(FIXED_POINT)
celt_assert(memcmp(sum, sum_c, sizeof(sum)) == 0);
}
#endif
y[i ] = SROUND16(sum[0], SIG_SHIFT); y[i ] = SROUND16(sum[0], SIG_SHIFT);
y[i+1] = SROUND16(sum[1], SIG_SHIFT); y[i+1] = SROUND16(sum[1], SIG_SHIFT);
y[i+2] = SROUND16(sum[2], SIG_SHIFT); y[i+2] = SROUND16(sum[2], SIG_SHIFT);
@ -222,8 +232,17 @@ void celt_iir(const opus_val32 *_x,
sum[1]=_x[i+1]; sum[1]=_x[i+1];
sum[2]=_x[i+2]; sum[2]=_x[i+2];
sum[3]=_x[i+3]; sum[3]=_x[i+3];
xcorr_kernel(rden, y+i, sum, ord, arch); #if defined(OPUS_CHECK_ASM) && defined(FIXED_POINT)
{
opus_val32 sum_c[4];
memcpy(sum_c, sum, sizeof(sum_c));
xcorr_kernel_c(rden, y+i, sum_c, ord);
#endif
xcorr_kernel(rden, y+i, sum, ord, arch);
#if defined(OPUS_CHECK_ASM) && defined(FIXED_POINT)
celt_assert(memcmp(sum, sum_c, sizeof(sum)) == 0);
}
#endif
/* Patch up the result to compensate for the fact that this is an IIR */ /* Patch up the result to compensate for the fact that this is an IIR */
y[i+ord ] = -SROUND16(sum[0],SIG_SHIFT); y[i+ord ] = -SROUND16(sum[0],SIG_SHIFT);
_y[i ] = sum[0]; _y[i ] = sum[0];

View File

@ -35,7 +35,7 @@
#include "x86/celt_lpc_sse.h" #include "x86/celt_lpc_sse.h"
#endif #endif
#define LPC_ORDER 24 #define CELT_LPC_ORDER 24
void _celt_lpc(opus_val16 *_lpc, const opus_val32 *ac, int p); void _celt_lpc(opus_val16 *_lpc, const opus_val32 *ac, int p);

View File

@ -35,19 +35,20 @@
(defined(OPUS_ARM_ASM) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR)) (defined(OPUS_ARM_ASM) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR))
#include "arm/armcpu.h" #include "arm/armcpu.h"
/* We currently support 4 ARM variants: /* We currently support 5 ARM variants:
* arch[0] -> ARMv4 * arch[0] -> ARMv4
* arch[1] -> ARMv5E * arch[1] -> ARMv5E
* arch[2] -> ARMv6 * arch[2] -> ARMv6
* arch[3] -> NEON * arch[3] -> NEON
* arch[4] -> NEON+DOTPROD
*/ */
#define OPUS_ARCHMASK 3 #define OPUS_ARCHMASK 7
#elif defined(OPUS_HAVE_RTCD) && \ #elif defined(OPUS_HAVE_RTCD) && \
((defined(OPUS_X86_MAY_HAVE_SSE) && !defined(OPUS_X86_PRESUME_SSE)) || \ ((defined(OPUS_X86_MAY_HAVE_SSE) && !defined(OPUS_X86_PRESUME_SSE)) || \
(defined(OPUS_X86_MAY_HAVE_SSE2) && !defined(OPUS_X86_PRESUME_SSE2)) || \ (defined(OPUS_X86_MAY_HAVE_SSE2) && !defined(OPUS_X86_PRESUME_SSE2)) || \
(defined(OPUS_X86_MAY_HAVE_SSE4_1) && !defined(OPUS_X86_PRESUME_SSE4_1)) || \ (defined(OPUS_X86_MAY_HAVE_SSE4_1) && !defined(OPUS_X86_PRESUME_SSE4_1)) || \
(defined(OPUS_X86_MAY_HAVE_AVX) && !defined(OPUS_X86_PRESUME_AVX))) (defined(OPUS_X86_MAY_HAVE_AVX2) && !defined(OPUS_X86_PRESUME_AVX2)))
#include "x86/x86cpu.h" #include "x86/x86cpu.h"
/* We currently support 5 x86 variants: /* We currently support 5 x86 variants:

View File

@ -195,6 +195,27 @@ int ec_dec_icdf(ec_dec *_this,const unsigned char *_icdf,unsigned _ftb){
return ret; return ret;
} }
int ec_dec_icdf16(ec_dec *_this,const opus_uint16 *_icdf,unsigned _ftb){
opus_uint32 r;
opus_uint32 d;
opus_uint32 s;
opus_uint32 t;
int ret;
s=_this->rng;
d=_this->val;
r=s>>_ftb;
ret=-1;
do{
t=s;
s=IMUL32(r,_icdf[++ret]);
}
while(d<s);
_this->val=d-s;
_this->rng=t-s;
ec_dec_normalize(_this);
return ret;
}
opus_uint32 ec_dec_uint(ec_dec *_this,opus_uint32 _ft){ opus_uint32 ec_dec_uint(ec_dec *_this,opus_uint32 _ft){
unsigned ft; unsigned ft;
unsigned s; unsigned s;

View File

@ -81,6 +81,16 @@ int ec_dec_bit_logp(ec_dec *_this,unsigned _logp);
Return: The decoded symbol s.*/ Return: The decoded symbol s.*/
int ec_dec_icdf(ec_dec *_this,const unsigned char *_icdf,unsigned _ftb); int ec_dec_icdf(ec_dec *_this,const unsigned char *_icdf,unsigned _ftb);
/*Decodes a symbol given an "inverse" CDF table.
No call to ec_dec_update() is necessary after this call.
_icdf: The "inverse" CDF, such that symbol s falls in the range
[s>0?ft-_icdf[s-1]:0,ft-_icdf[s]), where ft=1<<_ftb.
The values must be monotonically non-increasing, and the last value
must be 0.
_ftb: The number of bits of precision in the cumulative distribution.
Return: The decoded symbol s.*/
int ec_dec_icdf16(ec_dec *_this,const opus_uint16 *_icdf,unsigned _ftb);
/*Extracts a raw unsigned integer with a non-power-of-2 range from the stream. /*Extracts a raw unsigned integer with a non-power-of-2 range from the stream.
The bits must have been encoded with ec_enc_uint(). The bits must have been encoded with ec_enc_uint().
No call to ec_dec_update() is necessary after this call. No call to ec_dec_update() is necessary after this call.

View File

@ -172,6 +172,17 @@ void ec_enc_icdf(ec_enc *_this,int _s,const unsigned char *_icdf,unsigned _ftb){
ec_enc_normalize(_this); ec_enc_normalize(_this);
} }
void ec_enc_icdf16(ec_enc *_this,int _s,const opus_uint16 *_icdf,unsigned _ftb){
opus_uint32 r;
r=_this->rng>>_ftb;
if(_s>0){
_this->val+=_this->rng-IMUL32(r,_icdf[_s-1]);
_this->rng=IMUL32(r,_icdf[_s-1]-_icdf[_s]);
}
else _this->rng-=IMUL32(r,_icdf[_s]);
ec_enc_normalize(_this);
}
void ec_enc_uint(ec_enc *_this,opus_uint32 _fl,opus_uint32 _ft){ void ec_enc_uint(ec_enc *_this,opus_uint32 _fl,opus_uint32 _ft){
unsigned ft; unsigned ft;
unsigned fl; unsigned fl;

View File

@ -64,6 +64,15 @@ void ec_enc_bit_logp(ec_enc *_this,int _val,unsigned _logp);
_ftb: The number of bits of precision in the cumulative distribution.*/ _ftb: The number of bits of precision in the cumulative distribution.*/
void ec_enc_icdf(ec_enc *_this,int _s,const unsigned char *_icdf,unsigned _ftb); void ec_enc_icdf(ec_enc *_this,int _s,const unsigned char *_icdf,unsigned _ftb);
/*Encodes a symbol given an "inverse" CDF table.
_s: The index of the symbol to encode.
_icdf: The "inverse" CDF, such that symbol _s falls in the range
[_s>0?ft-_icdf[_s-1]:0,ft-_icdf[_s]), where ft=1<<_ftb.
The values must be monotonically non-increasing, and the last value
must be 0.
_ftb: The number of bits of precision in the cumulative distribution.*/
void ec_enc_icdf16(ec_enc *_this,int _s,const opus_uint16 *_icdf,unsigned _ftb);
/*Encodes a raw unsigned integer in the stream. /*Encodes a raw unsigned integer in the stream.
_fl: The integer to encode. _fl: The integer to encode.
_ft: The number of integers that can be encoded (one more than the max). _ft: The number of integers that can be encoded (one more than the max).

View File

@ -132,3 +132,104 @@ int ec_laplace_decode(ec_dec *dec, unsigned fs, int decay)
ec_dec_update(dec, fl, IMIN(fl+fs,32768), 32768); ec_dec_update(dec, fl, IMIN(fl+fs,32768), 32768);
return val; return val;
} }
void ec_laplace_encode_p0(ec_enc *enc, int value, opus_uint16 p0, opus_uint16 decay)
{
int s;
opus_uint16 sign_icdf[3];
sign_icdf[0] = 32768-p0;
sign_icdf[1] = sign_icdf[0]/2;
sign_icdf[2] = 0;
s = value == 0 ? 0 : (value > 0 ? 1 : 2);
ec_enc_icdf16(enc, s, sign_icdf, 15);
value = abs(value);
if (value)
{
int i;
opus_uint16 icdf[8];
icdf[0] = IMAX(7, decay);
for (i=1;i<7;i++)
{
icdf[i] = IMAX(7-i, (icdf[i-1] * (opus_int32)decay) >> 15);
}
icdf[7] = 0;
value--;
do {
ec_enc_icdf16(enc, IMIN(value, 7), icdf, 15);
value -= 7;
} while (value >= 0);
}
}
int ec_laplace_decode_p0(ec_dec *dec, opus_uint16 p0, opus_uint16 decay)
{
int s;
int value;
opus_uint16 sign_icdf[3];
sign_icdf[0] = 32768-p0;
sign_icdf[1] = sign_icdf[0]/2;
sign_icdf[2] = 0;
s = ec_dec_icdf16(dec, sign_icdf, 15);
if (s==2) s = -1;
if (s != 0)
{
int i;
int v;
opus_uint16 icdf[8];
icdf[0] = IMAX(7, decay);
for (i=1;i<7;i++)
{
icdf[i] = IMAX(7-i, (icdf[i-1] * (opus_int32)decay) >> 15);
}
icdf[7] = 0;
value = 1;
do {
v = ec_dec_icdf16(dec, icdf, 15);
value += v;
} while (v == 7);
return s*value;
} else return 0;
}
#if 0
#include <stdio.h>
#define NB_VALS 10
#define DATA_SIZE 10000
int main() {
ec_enc enc;
ec_dec dec;
unsigned char *ptr;
int i;
int decay, p0;
int val[NB_VALS] = {6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
/*for (i=0;i<NB_VALS;i++) {
val[i] = -log(rand()/(float)RAND_MAX);
if (rand()%2) val[i] = -val[i];
}*/
p0 = 16000;
decay = 16000;
ptr = (unsigned char *)malloc(DATA_SIZE);
ec_enc_init(&enc,ptr,DATA_SIZE);
for (i=0;i<NB_VALS;i++) {
printf("%d ", val[i]);
}
printf("\n");
for (i=0;i<NB_VALS;i++) {
ec_laplace_encode_p0(&enc, val[i], p0, decay);
}
ec_enc_done(&enc);
ec_dec_init(&dec,ec_get_buffer(&enc),ec_range_bytes(&enc));
for (i=0;i<NB_VALS;i++) {
val[i] = ec_laplace_decode_p0(&dec, p0, decay);
}
for (i=0;i<NB_VALS;i++) {
printf("%d ", val[i]);
}
printf("\n");
}
#endif

View File

@ -26,6 +26,9 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef LAPLACE_H
#define LAPLACE_H
#include "entenc.h" #include "entenc.h"
#include "entdec.h" #include "entdec.h"
@ -46,3 +49,9 @@ void ec_laplace_encode(ec_enc *enc, int *value, unsigned fs, int decay);
@return Value decoded @return Value decoded
*/ */
int ec_laplace_decode(ec_dec *dec, unsigned fs, int decay); int ec_laplace_decode(ec_dec *dec, unsigned fs, int decay);
int ec_laplace_decode_p0(ec_dec *dec, opus_uint16 p0, opus_uint16 decay);
void ec_laplace_encode_p0(ec_enc *enc, int value, opus_uint16 p0, opus_uint16 decay);
#endif

View File

@ -230,6 +230,12 @@ static OPUS_INLINE opus_val32 celt_exp2_frac(opus_val16 x)
frac = SHL16(x, 4); frac = SHL16(x, 4);
return ADD16(D0, MULT16_16_Q15(frac, ADD16(D1, MULT16_16_Q15(frac, ADD16(D2 , MULT16_16_Q15(D3,frac)))))); return ADD16(D0, MULT16_16_Q15(frac, ADD16(D1, MULT16_16_Q15(frac, ADD16(D2 , MULT16_16_Q15(D3,frac))))));
} }
#undef D0
#undef D1
#undef D2
#undef D3
/** Base-2 exponential approximation (2^x). (Q10 input, Q16 output) */ /** Base-2 exponential approximation (2^x). (Q10 input, Q16 output) */
static OPUS_INLINE opus_val32 celt_exp2(opus_val16 x) static OPUS_INLINE opus_val32 celt_exp2(opus_val16 x)
{ {

View File

@ -6,6 +6,8 @@ celt_sse2_sources = sources['CELT_SOURCES_SSE2']
celt_sse4_1_sources = sources['CELT_SOURCES_SSE4_1'] celt_sse4_1_sources = sources['CELT_SOURCES_SSE4_1']
celt_avx2_sources = sources['CELT_SOURCES_AVX2']
celt_neon_intr_sources = sources['CELT_SOURCES_ARM_NEON_INTR'] celt_neon_intr_sources = sources['CELT_SOURCES_ARM_NEON_INTR']
celt_static_libs = [] celt_static_libs = []
@ -14,7 +16,7 @@ if host_cpu_family in ['x86', 'x86_64'] and opus_conf.has('OPUS_HAVE_RTCD')
celt_sources += sources['CELT_SOURCES_X86_RTCD'] celt_sources += sources['CELT_SOURCES_X86_RTCD']
endif endif
foreach intr_name : ['sse', 'sse2', 'sse4_1', 'neon_intr'] foreach intr_name : ['sse', 'sse2', 'sse4_1', 'avx2', 'neon_intr']
have_intr = get_variable('have_' + intr_name) have_intr = get_variable('have_' + intr_name)
if not have_intr if not have_intr
continue continue
@ -41,14 +43,7 @@ if host_cpu_family in ['arm', 'aarch64'] and have_arm_intrinsics_or_asm
celt_sources += sources['CELT_SOURCES_ARM_NE10'] celt_sources += sources['CELT_SOURCES_ARM_NE10']
endif endif
if opus_arm_external_asm if opus_arm_external_asm
arm2gnu = [find_program('arm/arm2gnu.pl')] + arm2gnu_args subdir('arm')
celt_sources_arm_asm = configure_file(input: 'arm/celt_pitch_xcorr_arm.s',
output: '@BASENAME@-gnu.S',
command: arm2gnu + ['@INPUT@'],
capture: true)
celt_arm_armopts_s = configure_file(input: 'arm/armopts.s.in',
output: 'arm/armopts.s',
configuration: opus_conf)
celt_static_libs += static_library('celt-armasm', celt_static_libs += static_library('celt-armasm',
celt_arm_armopts_s, celt_sources_arm_asm, celt_arm_armopts_s, celt_sources_arm_asm,
install: false) install: false)

View File

@ -27,8 +27,8 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef __CELT_MIPSR1_H__ #ifndef CELT_MIPSR1_H__
#define __CELT_MIPSR1_H__ #define CELT_MIPSR1_H__
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
@ -149,4 +149,4 @@ void comb_filter(opus_val32 *y, opus_val32 *x, int T0, int T1, int N,
} }
} }
#endif /* __CELT_MIPSR1_H__ */ #endif /* CELT_MIPSR1_H__ */

View File

@ -38,8 +38,8 @@
MDCT implementation in FFMPEG, but has differences in signs, ordering MDCT implementation in FFMPEG, but has differences in signs, ordering
and scaling in many places. and scaling in many places.
*/ */
#ifndef __MDCT_MIPSR1_H__ #ifndef MDCT_MIPSR1_H__
#define __MDCT_MIPSR1_H__ #define MDCT_MIPSR1_H__
#ifndef SKIP_CONFIG_H #ifndef SKIP_CONFIG_H
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
@ -285,4 +285,4 @@ void clt_mdct_backward(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scala
} }
} }
} }
#endif /* __MDCT_MIPSR1_H__ */ #endif /* MDCT_MIPSR1_H__ */

View File

@ -26,8 +26,8 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef __VQ_MIPSR1_H__ #ifndef VQ_MIPSR1_H__
#define __VQ_MIPSR1_H__ #define VQ_MIPSR1_H__
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
@ -113,4 +113,4 @@ void renormalise_vector(celt_norm *X, int N, opus_val16 gain, int arch)
/*return celt_sqrt(E);*/ /*return celt_sqrt(E);*/
} }
#endif /* __VQ_MIPSR1_H__ */ #endif /* VQ_MIPSR1_H__ */

View File

@ -41,7 +41,7 @@
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
/** Opus wrapper for malloc(). To do your own dynamic allocation, all you need to do is replace this function and opus_free */ /** Opus wrapper for malloc(). To do your own dynamic allocation replace this function, opus_realloc, and opus_free */
#ifndef OVERRIDE_OPUS_ALLOC #ifndef OVERRIDE_OPUS_ALLOC
static OPUS_INLINE void *opus_alloc (size_t size) static OPUS_INLINE void *opus_alloc (size_t size)
{ {
@ -49,7 +49,15 @@ static OPUS_INLINE void *opus_alloc (size_t size)
} }
#endif #endif
/** Same as celt_alloc(), except that the area is only needed inside a CELT call (might cause problem with wideband though) */ #ifndef OVERRIDE_OPUS_REALLOC
static OPUS_INLINE void *opus_realloc (void *ptr, size_t size)
{
return realloc(ptr, size);
}
#endif
/** Used only for non-threadsafe pseudostack.
If desired, this can always return the same area of memory rather than allocating a new one every time. */
#ifndef OVERRIDE_OPUS_ALLOC_SCRATCH #ifndef OVERRIDE_OPUS_ALLOC_SCRATCH
static OPUS_INLINE void *opus_alloc_scratch (size_t size) static OPUS_INLINE void *opus_alloc_scratch (size_t size)
{ {
@ -58,7 +66,7 @@ static OPUS_INLINE void *opus_alloc_scratch (size_t size)
} }
#endif #endif
/** Opus wrapper for free(). To do your own dynamic allocation, all you need to do is replace this function and opus_alloc */ /** Opus wrapper for free(). To do your own dynamic allocation replace this function, opus_realloc, and opus_free */
#ifndef OVERRIDE_OPUS_FREE #ifndef OVERRIDE_OPUS_FREE
static OPUS_INLINE void opus_free (void *ptr) static OPUS_INLINE void opus_free (void *ptr)
{ {

View File

@ -262,7 +262,16 @@ celt_pitch_xcorr_c(const opus_val16 *_x, const opus_val16 *_y,
for (i=0;i<max_pitch-3;i+=4) for (i=0;i<max_pitch-3;i+=4)
{ {
opus_val32 sum[4]={0,0,0,0}; opus_val32 sum[4]={0,0,0,0};
xcorr_kernel(_x, _y+i, sum, len, arch); #if defined(OPUS_CHECK_ASM) && defined(FIXED_POINT)
{
opus_val32 sum_c[4]={0,0,0,0};
xcorr_kernel_c(_x, _y+i, sum_c, len);
#endif
xcorr_kernel(_x, _y+i, sum, len, arch);
#if defined(OPUS_CHECK_ASM) && defined(FIXED_POINT)
celt_assert(memcmp(sum, sum_c, sizeof(sum)) == 0);
}
#endif
xcorr[i]=sum[0]; xcorr[i]=sum[0];
xcorr[i+1]=sum[1]; xcorr[i+1]=sum[1];
xcorr[i+2]=sum[2]; xcorr[i+2]=sum[2];

View File

@ -189,4 +189,15 @@ celt_pitch_xcorr_c(const opus_val16 *_x, const opus_val16 *_y,
# define celt_pitch_xcorr celt_pitch_xcorr_c # define celt_pitch_xcorr celt_pitch_xcorr_c
#endif #endif
#ifdef NON_STATIC_COMB_FILTER_CONST_C
void comb_filter_const_c(opus_val32 *y, opus_val32 *x, int T, int N,
opus_val16 g10, opus_val16 g11, opus_val16 g12);
#endif
#ifndef OVERRIDE_COMB_FILTER_CONST
# define comb_filter_const(y, x, T, N, g10, g11, g12, arch) \
((void)(arch),comb_filter_const_c(y, x, T, N, g10, g11, g12))
#endif
#endif #endif

View File

@ -141,7 +141,7 @@ extern char *global_stack_top;
#else #else
#define ALIGN(stack, size) ((stack) += ((size) - (long)(stack)) & ((size) - 1)) #define ALIGN(stack, size) ((stack) += ((size) - (long)(stack)) & ((size) - 1))
#define PUSH(stack, size, type) (ALIGN((stack),sizeof(type)/sizeof(char)),(stack)+=(size)*(sizeof(type)/sizeof(char)),(type*)((stack)-(size)*(sizeof(type)/sizeof(char)))) #define PUSH(stack, size, type) (ALIGN((stack),sizeof(type)/(sizeof(char))),(stack)+=(size)*(sizeof(type)/(sizeof(char))),(type*)((stack)-(size)*(sizeof(type)/(sizeof(char)))))
#if 0 /* Set this to 1 to instrument pseudostack usage */ #if 0 /* Set this to 1 to instrument pseudostack usage */
#define RESTORE_STACK (printf("%ld %s:%d\n", global_stack-scratch_ptr, __FILE__, __LINE__),global_stack = _saved_stack) #define RESTORE_STACK (printf("%ld %s:%d\n", global_stack-scratch_ptr, __FILE__, __LINE__),global_stack = _saved_stack)
#else #else

View File

@ -157,5 +157,6 @@ int main(void){
/*printf("\n");*/ /*printf("\n");*/
} }
} }
RESTORE_STACK;
return 0; return 0;
} }

View File

@ -176,5 +176,6 @@ int main(int argc,char ** argv)
test1d(480,1,arch); test1d(480,1,arch);
#endif #endif
} }
RESTORE_STACK;
return ret; return ret;
} }

View File

@ -89,5 +89,6 @@ int main(void)
} }
free(ptr); free(ptr);
RESTORE_STACK;
return ret; return ret;
} }

View File

@ -224,5 +224,6 @@ int main(int argc,char ** argv)
test1d(1920,1,arch); test1d(1920,1,arch);
#endif #endif
} }
RESTORE_STACK;
return ret; return ret;
} }

View File

@ -82,5 +82,6 @@ int main(void)
test_rotation(23, 5); test_rotation(23, 5);
test_rotation(50, 3); test_rotation(50, 3);
test_rotation(80, 1); test_rotation(80, 1);
RESTORE_STACK;
return ret; return ret;
} }

View File

@ -64,9 +64,16 @@ void celt_fir_sse4_1(const opus_val16 *x,
{ {
opus_val32 sums[4] = {0}; opus_val32 sums[4] = {0};
__m128i vecSum, vecX; __m128i vecSum, vecX;
#if defined(OPUS_CHECK_ASM)
xcorr_kernel(rnum, x+i-ord, sums, ord, arch); {
opus_val32 sums_c[4] = {0};
xcorr_kernel_c(rnum, x+i-ord, sums_c, ord);
#endif
xcorr_kernel(rnum, x+i-ord, sums, ord, arch);
#if defined(OPUS_CHECK_ASM)
celt_assert(memcmp(sums, sums_c, sizeof(sums)) == 0);
}
#endif
vecSum = _mm_loadu_si128((__m128i *)sums); vecSum = _mm_loadu_si128((__m128i *)sums);
vecSum = _mm_add_epi32(vecSum, vecNoA); vecSum = _mm_add_epi32(vecSum, vecNoA);
vecSum = _mm_srai_epi32(vecSum, SIG_SHIFT); vecSum = _mm_srai_epi32(vecSum, SIG_SHIFT);

View File

@ -131,12 +131,6 @@ extern opus_val32 (*const CELT_INNER_PROD_IMPL[OPUS_ARCHMASK + 1])(
#if defined(OPUS_X86_MAY_HAVE_SSE) && !defined(FIXED_POINT) #if defined(OPUS_X86_MAY_HAVE_SSE) && !defined(FIXED_POINT)
#define OVERRIDE_DUAL_INNER_PROD
#define OVERRIDE_COMB_FILTER_CONST
#undef dual_inner_prod
#undef comb_filter_const
void dual_inner_prod_sse(const opus_val16 *x, void dual_inner_prod_sse(const opus_val16 *x,
const opus_val16 *y01, const opus_val16 *y01,
const opus_val16 *y02, const opus_val16 *y02,
@ -154,13 +148,17 @@ void comb_filter_const_sse(opus_val32 *y,
#if defined(OPUS_X86_PRESUME_SSE) #if defined(OPUS_X86_PRESUME_SSE)
#define OVERRIDE_DUAL_INNER_PROD
#define OVERRIDE_COMB_FILTER_CONST
# define dual_inner_prod(x, y01, y02, N, xy1, xy2, arch) \ # define dual_inner_prod(x, y01, y02, N, xy1, xy2, arch) \
((void)(arch),dual_inner_prod_sse(x, y01, y02, N, xy1, xy2)) ((void)(arch),dual_inner_prod_sse(x, y01, y02, N, xy1, xy2))
# define comb_filter_const(y, x, T, N, g10, g11, g12, arch) \ # define comb_filter_const(y, x, T, N, g10, g11, g12, arch) \
((void)(arch),comb_filter_const_sse(y, x, T, N, g10, g11, g12)) ((void)(arch),comb_filter_const_sse(y, x, T, N, g10, g11, g12))
#else #elif defined(OPUS_HAVE_RTCD)
#define OVERRIDE_DUAL_INNER_PROD
#define OVERRIDE_COMB_FILTER_CONST
extern void (*const DUAL_INNER_PROD_IMPL[OPUS_ARCHMASK + 1])( extern void (*const DUAL_INNER_PROD_IMPL[OPUS_ARCHMASK + 1])(
const opus_val16 *x, const opus_val16 *x,
const opus_val16 *y01, const opus_val16 *y01,
@ -187,6 +185,32 @@ extern void (*const COMB_FILTER_CONST_IMPL[OPUS_ARCHMASK + 1])(
#define NON_STATIC_COMB_FILTER_CONST_C #define NON_STATIC_COMB_FILTER_CONST_C
#endif #endif
#endif
void celt_pitch_xcorr_avx2(const float *_x, const float *_y, float *xcorr, int len, int max_pitch, int arch);
#if defined(OPUS_X86_PRESUME_AVX2)
#define OVERRIDE_PITCH_XCORR
# define celt_pitch_xcorr celt_pitch_xcorr_avx2
#elif defined(OPUS_HAVE_RTCD) && defined(OPUS_X86_MAY_HAVE_AVX2)
#define OVERRIDE_PITCH_XCORR
extern void (*const PITCH_XCORR_IMPL[OPUS_ARCHMASK + 1])(
const float *_x,
const float *_y,
float *xcorr,
int len,
int max_pitch,
int arch
);
#define celt_pitch_xcorr(_x, _y, xcorr, len, max_pitch, arch) \
((*PITCH_XCORR_IMPL[(arch) & OPUS_ARCHMASK])(_x, _y, xcorr, len, max_pitch, arch))
#endif /* OPUS_X86_PRESUME_AVX2 && !OPUS_HAVE_RTCD */
#endif /* OPUS_X86_MAY_HAVE_SSE && !FIXED_POINT */
#endif #endif

View File

@ -28,16 +28,18 @@
#define VQ_SSE_H #define VQ_SSE_H
#if defined(OPUS_X86_MAY_HAVE_SSE2) && !defined(FIXED_POINT) #if defined(OPUS_X86_MAY_HAVE_SSE2) && !defined(FIXED_POINT)
#define OVERRIDE_OP_PVQ_SEARCH
opus_val16 op_pvq_search_sse2(celt_norm *_X, int *iy, int K, int N, int arch); opus_val16 op_pvq_search_sse2(celt_norm *_X, int *iy, int K, int N, int arch);
#if defined(OPUS_X86_PRESUME_SSE2) #if defined(OPUS_X86_PRESUME_SSE2)
#define OVERRIDE_OP_PVQ_SEARCH
#define op_pvq_search(x, iy, K, N, arch) \ #define op_pvq_search(x, iy, K, N, arch) \
(op_pvq_search_sse2(x, iy, K, N, arch)) (op_pvq_search_sse2(x, iy, K, N, arch))
#else #elif defined(OPUS_HAVE_RTCD)
#define OVERRIDE_OP_PVQ_SEARCH
extern opus_val16 (*const OP_PVQ_SEARCH_IMPL[OPUS_ARCHMASK + 1])( extern opus_val16 (*const OP_PVQ_SEARCH_IMPL[OPUS_ARCHMASK + 1])(
celt_norm *_X, int *iy, int K, int N, int arch); celt_norm *_X, int *iy, int K, int N, int arch);

View File

@ -75,7 +75,7 @@ opus_val16 op_pvq_search_sse2(celt_norm *_X, int *iy, int K, int N, int arch)
sums = _mm_add_ps(sums, x4); sums = _mm_add_ps(sums, x4);
/* Clear y and iy in case we don't do the projection. */ /* Clear y and iy in case we don't do the projection. */
_mm_storeu_ps(&y[j], _mm_setzero_ps()); _mm_storeu_ps(&y[j], _mm_setzero_ps());
_mm_storeu_si128((__m128i*)&iy[j], _mm_setzero_si128()); _mm_storeu_si128((__m128i*)(void*)&iy[j], _mm_setzero_si128());
_mm_storeu_ps(&X[j], x4); _mm_storeu_ps(&X[j], x4);
_mm_storeu_ps(&signy[j], s4); _mm_storeu_ps(&signy[j], s4);
} }
@ -116,7 +116,7 @@ opus_val16 op_pvq_search_sse2(celt_norm *_X, int *iy, int K, int N, int arch)
rx4 = _mm_mul_ps(x4, rcp4); rx4 = _mm_mul_ps(x4, rcp4);
iy4 = _mm_cvttps_epi32(rx4); iy4 = _mm_cvttps_epi32(rx4);
pulses_sum = _mm_add_epi32(pulses_sum, iy4); pulses_sum = _mm_add_epi32(pulses_sum, iy4);
_mm_storeu_si128((__m128i*)&iy[j], iy4); _mm_storeu_si128((__m128i*)(void*)&iy[j], iy4);
y4 = _mm_cvtepi32_ps(iy4); y4 = _mm_cvtepi32_ps(iy4);
xy4 = _mm_add_ps(xy4, _mm_mul_ps(x4, y4)); xy4 = _mm_add_ps(xy4, _mm_mul_ps(x4, y4));
yy4 = _mm_add_ps(yy4, _mm_mul_ps(y4, y4)); yy4 = _mm_add_ps(yy4, _mm_mul_ps(y4, y4));
@ -205,10 +205,10 @@ opus_val16 op_pvq_search_sse2(celt_norm *_X, int *iy, int K, int N, int arch)
{ {
__m128i y4; __m128i y4;
__m128i s4; __m128i s4;
y4 = _mm_loadu_si128((__m128i*)&iy[j]); y4 = _mm_loadu_si128((__m128i*)(void*)&iy[j]);
s4 = _mm_castps_si128(_mm_loadu_ps(&signy[j])); s4 = _mm_castps_si128(_mm_loadu_ps(&signy[j]));
y4 = _mm_xor_si128(_mm_add_epi32(y4, s4), s4); y4 = _mm_xor_si128(_mm_add_epi32(y4, s4), s4);
_mm_storeu_si128((__m128i*)&iy[j], y4); _mm_storeu_si128((__m128i*)(void*)&iy[j], y4);
} }
RESTORE_STACK; RESTORE_STACK;
return yy; return yy;

View File

@ -90,6 +90,26 @@ opus_val32 (*const CELT_INNER_PROD_IMPL[OPUS_ARCHMASK + 1])(
# else # else
#if defined(OPUS_X86_MAY_HAVE_AVX2) && !defined(OPUS_X86_PRESUME_AVX2)
void (*const PITCH_XCORR_IMPL[OPUS_ARCHMASK + 1])(
const float *_x,
const float *_y,
float *xcorr,
int len,
int max_pitch,
int arch
) = {
celt_pitch_xcorr_c, /* non-sse */
celt_pitch_xcorr_c,
celt_pitch_xcorr_c,
celt_pitch_xcorr_c,
MAY_HAVE_AVX2(celt_pitch_xcorr)
};
#endif
#if defined(OPUS_X86_MAY_HAVE_SSE) && !defined(OPUS_X86_PRESUME_SSE) #if defined(OPUS_X86_MAY_HAVE_SSE) && !defined(OPUS_X86_PRESUME_SSE)
void (*const XCORR_KERNEL_IMPL[OPUS_ARCHMASK + 1])( void (*const XCORR_KERNEL_IMPL[OPUS_ARCHMASK + 1])(

View File

@ -39,7 +39,7 @@
((defined(OPUS_X86_MAY_HAVE_SSE) && !defined(OPUS_X86_PRESUME_SSE)) || \ ((defined(OPUS_X86_MAY_HAVE_SSE) && !defined(OPUS_X86_PRESUME_SSE)) || \
(defined(OPUS_X86_MAY_HAVE_SSE2) && !defined(OPUS_X86_PRESUME_SSE2)) || \ (defined(OPUS_X86_MAY_HAVE_SSE2) && !defined(OPUS_X86_PRESUME_SSE2)) || \
(defined(OPUS_X86_MAY_HAVE_SSE4_1) && !defined(OPUS_X86_PRESUME_SSE4_1)) || \ (defined(OPUS_X86_MAY_HAVE_SSE4_1) && !defined(OPUS_X86_PRESUME_SSE4_1)) || \
(defined(OPUS_X86_MAY_HAVE_AVX) && !defined(OPUS_X86_PRESUME_AVX))) (defined(OPUS_X86_MAY_HAVE_AVX2) && !defined(OPUS_X86_PRESUME_AVX2)))
#if defined(_MSC_VER) #if defined(_MSC_VER)
@ -105,7 +105,7 @@ typedef struct CPU_Feature{
int HW_SSE2; int HW_SSE2;
int HW_SSE41; int HW_SSE41;
/* SIMD: 256-bit */ /* SIMD: 256-bit */
int HW_AVX; int HW_AVX2;
} CPU_Feature; } CPU_Feature;
static void opus_cpu_feature_check(CPU_Feature *cpu_feature) static void opus_cpu_feature_check(CPU_Feature *cpu_feature)
@ -121,13 +121,19 @@ static void opus_cpu_feature_check(CPU_Feature *cpu_feature)
cpu_feature->HW_SSE = (info[3] & (1 << 25)) != 0; cpu_feature->HW_SSE = (info[3] & (1 << 25)) != 0;
cpu_feature->HW_SSE2 = (info[3] & (1 << 26)) != 0; cpu_feature->HW_SSE2 = (info[3] & (1 << 26)) != 0;
cpu_feature->HW_SSE41 = (info[2] & (1 << 19)) != 0; cpu_feature->HW_SSE41 = (info[2] & (1 << 19)) != 0;
cpu_feature->HW_AVX = (info[2] & (1 << 28)) != 0; cpu_feature->HW_AVX2 = (info[2] & (1 << 28)) != 0 && (info[2] & (1 << 12)) != 0;
if (cpu_feature->HW_AVX2 && nIds >= 7) {
cpuid(info, 7);
cpu_feature->HW_AVX2 = cpu_feature->HW_AVX2 && (info[1] & (1 << 5)) != 0;
} else {
cpu_feature->HW_AVX2 = 0;
}
} }
else { else {
cpu_feature->HW_SSE = 0; cpu_feature->HW_SSE = 0;
cpu_feature->HW_SSE2 = 0; cpu_feature->HW_SSE2 = 0;
cpu_feature->HW_SSE41 = 0; cpu_feature->HW_SSE41 = 0;
cpu_feature->HW_AVX = 0; cpu_feature->HW_AVX2 = 0;
} }
} }
@ -157,7 +163,7 @@ static int opus_select_arch_impl(void)
} }
arch++; arch++;
if (!cpu_feature.HW_AVX) if (!cpu_feature.HW_AVX2)
{ {
return arch; return arch;
} }

View File

@ -46,28 +46,67 @@
# define MAY_HAVE_SSE4_1(name) name ## _c # define MAY_HAVE_SSE4_1(name) name ## _c
# endif # endif
# if defined(OPUS_X86_MAY_HAVE_AVX) # if defined(OPUS_X86_MAY_HAVE_AVX2)
# define MAY_HAVE_AVX(name) name ## _avx # define MAY_HAVE_AVX2(name) name ## _avx2
# else # else
# define MAY_HAVE_AVX(name) name ## _c # define MAY_HAVE_AVX2(name) name ## _c
# endif # endif
# if defined(OPUS_HAVE_RTCD) # if defined(OPUS_HAVE_RTCD) && \
((defined(OPUS_X86_MAY_HAVE_SSE) && !defined(OPUS_X86_PRESUME_SSE)) || \
(defined(OPUS_X86_MAY_HAVE_SSE2) && !defined(OPUS_X86_PRESUME_SSE2)) || \
(defined(OPUS_X86_MAY_HAVE_SSE4_1) && !defined(OPUS_X86_PRESUME_SSE4_1)) || \
(defined(OPUS_X86_MAY_HAVE_AVX2) && !defined(OPUS_X86_PRESUME_AVX2)))
int opus_select_arch(void); int opus_select_arch(void);
# endif # endif
# if defined(OPUS_X86_MAY_HAVE_SSE2)
# include "opus_defines.h"
/*MOVD should not impose any alignment restrictions, but the C standard does, /*MOVD should not impose any alignment restrictions, but the C standard does,
and UBSan will report errors if we actually make unaligned accesses. and UBSan will report errors if we actually make unaligned accesses.
Use this to work around those restrictions (which should hopefully all get Use this to work around those restrictions (which should hopefully all get
optimized to a single MOVD instruction).*/ optimized to a single MOVD instruction).
#define OP_LOADU_EPI32(x) \ GCC implemented _mm_loadu_si32() since GCC 11; HOWEVER, there is a bug!
(int)((*(unsigned char *)(x) | *((unsigned char *)(x) + 1) << 8U |\ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99754
*((unsigned char *)(x) + 2) << 16U | (opus_uint32)*((unsigned char *)(x) + 3) << 24U)) LLVM implemented _mm_loadu_si32() since Clang 8.0, however the
__clang_major__ version number macro is unreliable, as vendors
(specifically, Apple) will use different numbering schemes than upstream.
Clang's advice is "use feature detection", but they do not provide feature
detection support for specific SIMD functions.
We follow the approach from the SIMDe project and instead detect unrelated
features that should be available in the version we want (see
<https://github.com/simd-everywhere/simde/blob/master/simde/simde-detect-clang.h>).*/
# if defined(__clang__)
# if __has_warning("-Wextra-semi-stmt") || \
__has_builtin(__builtin_rotateleft32)
# define OPUS_CLANG_8 (1)
# endif
# endif
# if !defined(_MSC_VER) && !OPUS_GNUC_PREREQ(11,3) && !defined(OPUS_CLANG_8)
# include <string.h>
# include <emmintrin.h>
#define OP_CVTEPI8_EPI32_M32(x) \ # ifdef _mm_loadu_si32
(_mm_cvtepi8_epi32(_mm_cvtsi32_si128(OP_LOADU_EPI32(x)))) # undef _mm_loadu_si32
# endif
# define _mm_loadu_si32 WORKAROUND_mm_loadu_si32
static inline __m128i WORKAROUND_mm_loadu_si32(void const* mem_addr) {
int val;
memcpy(&val, mem_addr, sizeof(val));
return _mm_cvtsi32_si128(val);
}
# elif defined(_MSC_VER)
/* MSVC needs this for _mm_loadu_si32 */
# include <immintrin.h>
# endif
#define OP_CVTEPI16_EPI32_M64(x) \ # define OP_CVTEPI8_EPI32_M32(x) \
(_mm_cvtepi16_epi32(_mm_loadl_epi64((__m128i *)(x)))) (_mm_cvtepi8_epi32(_mm_loadu_si32(x)))
# define OP_CVTEPI16_EPI32_M64(x) \
(_mm_cvtepi16_epi32(_mm_loadl_epi64((__m128i *)(void*)(x))))
# endif
#endif #endif

View File

@ -50,4 +50,5 @@ celt/mips/pitch_mipsr1.h \
celt/mips/vq_mipsr1.h \ celt/mips/vq_mipsr1.h \
celt/x86/pitch_sse.h \ celt/x86/pitch_sse.h \
celt/x86/vq_sse.h \ celt/x86/vq_sse.h \
celt/x86/x86_arch_macros.h \
celt/x86/x86cpu.h celt/x86/x86cpu.h

View File

@ -33,6 +33,9 @@ CELT_SOURCES_SSE4_1 = \
celt/x86/celt_lpc_sse4_1.c \ celt/x86/celt_lpc_sse4_1.c \
celt/x86/pitch_sse4_1.c celt/x86/pitch_sse4_1.c
CELT_SOURCES_AVX2 = \
celt/x86/pitch_avx.c
CELT_SOURCES_ARM_RTCD = \ CELT_SOURCES_ARM_RTCD = \
celt/arm/armcpu.c \ celt/arm/armcpu.c \
celt/arm/arm_celt_map.c celt/arm/arm_celt_map.c

View File

@ -102,7 +102,10 @@ if(MINGW)
endif() endif()
endif() endif()
if(NOT MSVC) if(MSVC)
# move cosmetic warnings to level 4
add_compile_options(/w44244 /w44305 /w44267)
else()
set(WARNING_LIST -Wall -W -Wstrict-prototypes -Wextra -Wcast-align -Wnested-externs -Wshadow) set(WARNING_LIST -Wall -W -Wstrict-prototypes -Wextra -Wcast-align -Wnested-externs -Wshadow)
include(CheckCCompilerFlag) include(CheckCCompilerFlag)
foreach(WARNING_FLAG ${WARNING_LIST}) foreach(WARNING_FLAG ${WARNING_LIST})

View File

@ -47,10 +47,12 @@ function(check_flag NAME FLAG)
endfunction() endfunction()
include(CheckIncludeFile) include(CheckIncludeFile)
# function to check if compiler supports SSE, SSE2, SSE4.1 and AVX if target
# systems may not have SSE support then use OPUS_MAY_HAVE_SSE option if target # This function determines if the compiler has support for SSE, SSE2, SSE4.1, AVX,
# system is guaranteed to have SSE support then OPUS_PRESUME_SSE can be used to # AVX2 and FMA. Should the target systems potentially lack SSE support, the
# skip SSE runtime check # OPUS_MAY_HAVE_SSE option is recommended for use. If, however, the target system is
# assured to support SSE, the OPUS_PRESUME_SSE option can be employed, thus
# eliminating the necessity for an SSE runtime check.
function(opus_detect_sse COMPILER_SUPPORT_SIMD) function(opus_detect_sse COMPILER_SUPPORT_SIMD)
message(STATUS "Check SIMD support by compiler") message(STATUS "Check SIMD support by compiler")
check_include_file(xmmintrin.h HAVE_XMMINTRIN_H) # SSE1 check_include_file(xmmintrin.h HAVE_XMMINTRIN_H) # SSE1
@ -111,20 +113,20 @@ function(opus_detect_sse COMPILER_SUPPORT_SIMD)
PARENT_SCOPE) PARENT_SCOPE)
endif() endif()
check_include_file(immintrin.h HAVE_IMMINTRIN_H) # AVX check_include_file(immintrin.h HAVE_IMMINTRIN_H) # AVX2
if(HAVE_IMMINTRIN_H) if(HAVE_IMMINTRIN_H)
if(MSVC) if(MSVC)
check_flag(AVX /arch:AVX) check_flag(AVX2 /arch:AVX2)
else() else()
check_flag(AVX -mavx) check_flag(AVX2 -mavx2 -mfma -mavx)
endif() endif()
else() else()
set(AVX_SUPPORTED set(AVX2_SUPPORTED
0 0
PARENT_SCOPE) PARENT_SCOPE)
endif() endif()
if(SSE1_SUPPORTED OR SSE2_SUPPORTED OR SSE4_1_SUPPORTED OR AVX_SUPPORTED) if(SSE1_SUPPORTED OR SSE2_SUPPORTED OR SSE4_1_SUPPORTED OR AVX2_SUPPORTED)
set(COMPILER_SUPPORT_SIMD 1 PARENT_SCOPE) set(COMPILER_SUPPORT_SIMD 1 PARENT_SCOPE)
else() else()
message(STATUS "No SIMD support in compiler") message(STATUS "No SIMD support in compiler")
@ -215,7 +217,7 @@ function(get_opus_sources SOURCE_GROUP MAKE_FILE SOURCES)
if(${list_length} LESS 1) if(${list_length} LESS 1)
message( message(
FATAL_ERROR FATAL_ERROR
"No files parsed succesfully from ${SOURCE_GROUP} in ${MAKE_FILE}") "No files parsed successfully from ${SOURCE_GROUP} in ${MAKE_FILE}")
endif() endif()
# remove trailing whitespaces # remove trailing whitespaces

View File

@ -13,6 +13,8 @@ get_opus_sources(SILK_SOURCES_X86_RTCD silk_sources.mk silk_sources_x86_rtcd)
get_opus_sources(SILK_SOURCES_SSE4_1 silk_sources.mk silk_sources_sse4_1) get_opus_sources(SILK_SOURCES_SSE4_1 silk_sources.mk silk_sources_sse4_1)
get_opus_sources(SILK_SOURCES_FIXED_SSE4_1 silk_sources.mk get_opus_sources(SILK_SOURCES_FIXED_SSE4_1 silk_sources.mk
silk_sources_fixed_sse4_1) silk_sources_fixed_sse4_1)
get_opus_sources(SILK_SOURCES_AVX2 silk_sources.mk silk_sources_avx2)
get_opus_sources(SILK_SOURCES_FLOAT_AVX2 silk_sources.mk silk_sources_float_avx2)
get_opus_sources(SILK_SOURCES_ARM_RTCD silk_sources.mk silk_sources_arm_rtcd) get_opus_sources(SILK_SOURCES_ARM_RTCD silk_sources.mk silk_sources_arm_rtcd)
get_opus_sources(SILK_SOURCES_ARM_NEON_INTR silk_sources.mk get_opus_sources(SILK_SOURCES_ARM_NEON_INTR silk_sources.mk
silk_sources_arm_neon_intr) silk_sources_arm_neon_intr)
@ -29,6 +31,7 @@ get_opus_sources(CELT_SOURCES_X86_RTCD celt_sources.mk celt_sources_x86_rtcd)
get_opus_sources(CELT_SOURCES_SSE celt_sources.mk celt_sources_sse) get_opus_sources(CELT_SOURCES_SSE celt_sources.mk celt_sources_sse)
get_opus_sources(CELT_SOURCES_SSE2 celt_sources.mk celt_sources_sse2) get_opus_sources(CELT_SOURCES_SSE2 celt_sources.mk celt_sources_sse2)
get_opus_sources(CELT_SOURCES_SSE4_1 celt_sources.mk celt_sources_sse4_1) get_opus_sources(CELT_SOURCES_SSE4_1 celt_sources.mk celt_sources_sse4_1)
get_opus_sources(CELT_SOURCES_AVX2 celt_sources.mk celt_sources_avx2)
get_opus_sources(CELT_SOURCES_ARM_RTCD celt_sources.mk celt_sources_arm_rtcd) get_opus_sources(CELT_SOURCES_ARM_RTCD celt_sources.mk celt_sources_arm_rtcd)
get_opus_sources(CELT_SOURCES_ARM_ASM celt_sources.mk celt_sources_arm_asm) get_opus_sources(CELT_SOURCES_ARM_ASM celt_sources.mk celt_sources_arm_asm)
get_opus_sources(CELT_AM_SOURCES_ARM_ASM celt_sources.mk get_opus_sources(CELT_AM_SOURCES_ARM_ASM celt_sources.mk
@ -37,13 +40,30 @@ get_opus_sources(CELT_SOURCES_ARM_NEON_INTR celt_sources.mk
celt_sources_arm_neon_intr) celt_sources_arm_neon_intr)
get_opus_sources(CELT_SOURCES_ARM_NE10 celt_sources.mk celt_sources_arm_ne10) get_opus_sources(CELT_SOURCES_ARM_NE10 celt_sources.mk celt_sources_arm_ne10)
get_opus_sources(DEEP_PLC_HEAD lpcnet_headers.mk deep_plc_headers)
get_opus_sources(DRED_HEAD lpcnet_headers.mk dred_headers)
get_opus_sources(OSCE_HEAD lpcnet_headers.mk osce_headers)
get_opus_sources(DEEP_PLC_SOURCES lpcnet_sources.mk deep_plc_sources)
get_opus_sources(DRED_SOURCES lpcnet_sources.mk dred_sources)
get_opus_sources(OSCE_SOURCES lpcnet_sources.mk osce_sources)
get_opus_sources(DNN_SOURCES_X86_RTCD lpcnet_sources.mk dnn_sources_x86_rtcd)
get_opus_sources(DNN_SOURCES_SSE2 lpcnet_sources.mk dnn_sources_sse2)
get_opus_sources(DNN_SOURCES_SSE4_1 lpcnet_sources.mk dnn_sources_sse4_1)
get_opus_sources(DNN_SOURCES_AVX2 lpcnet_sources.mk dnn_sources_avx2)
get_opus_sources(DNN_SOURCES_NEON lpcnet_sources.mk dnn_sources_arm_neon)
get_opus_sources(DNN_SOURCES_DOTPROD lpcnet_sources.mk dnn_sources_arm_dotprod)
get_opus_sources(opus_demo_SOURCES Makefile.am opus_demo_sources) get_opus_sources(opus_demo_SOURCES Makefile.am opus_demo_sources)
get_opus_sources(opus_custom_demo_SOURCES Makefile.am opus_custom_demo_sources) get_opus_sources(opus_custom_demo_SOURCES Makefile.am opus_custom_demo_sources)
get_opus_sources(opus_compare_SOURCES Makefile.am opus_compare_sources) get_opus_sources(opus_compare_SOURCES Makefile.am opus_compare_sources)
get_opus_sources(tests_test_opus_api_SOURCES Makefile.am test_opus_api_sources) get_opus_sources(tests_test_opus_api_SOURCES Makefile.am test_opus_api_sources)
get_opus_sources(tests_test_opus_encode_SOURCES Makefile.am get_opus_sources(tests_test_opus_encode_SOURCES Makefile.am
test_opus_encode_sources) test_opus_encode_sources)
get_opus_sources(tests_test_opus_extensions_SOURCES Makefile.am
test_opus_extensions_sources)
get_opus_sources(tests_test_opus_decode_SOURCES Makefile.am get_opus_sources(tests_test_opus_decode_SOURCES Makefile.am
test_opus_decode_sources) test_opus_decode_sources)
get_opus_sources(tests_test_opus_padding_SOURCES Makefile.am get_opus_sources(tests_test_opus_padding_SOURCES Makefile.am
test_opus_padding_sources) test_opus_padding_sources)
get_opus_sources(tests_test_opus_dred_SOURCES Makefile.am
test_opus_dred_sources)

View File

@ -3,7 +3,7 @@
scriptversion=2018-03-07.03; # UTC scriptversion=2018-03-07.03; # UTC
# Copyright (C) 1999-2018 Free Software Foundation, Inc. # Copyright (C) 1999-2021 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>. # Written by Tom Tromey <tromey@cygnus.com>.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
@ -53,7 +53,7 @@ func_file_conv ()
MINGW*) MINGW*)
file_conv=mingw file_conv=mingw
;; ;;
CYGWIN*) CYGWIN* | MSYS*)
file_conv=cygwin file_conv=cygwin
;; ;;
*) *)
@ -67,7 +67,7 @@ func_file_conv ()
mingw/*) mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;; ;;
cygwin/*) cygwin/* | msys/*)
file=`cygpath -m "$file" || echo "$file"` file=`cygpath -m "$file" || echo "$file"`
;; ;;
wine/*) wine/*)

File diff suppressed because it is too large Load Diff

View File

@ -9,6 +9,12 @@
/* Custom modes */ /* Custom modes */
#undef CUSTOM_MODES #undef CUSTOM_MODES
/* Disable DNN debug float */
#undef DISABLE_DEBUG_FLOAT
/* Disable dot product instructions */
#undef DISABLE_DOT_PROD
/* Do not build the float API */ /* Do not build the float API */
#undef DISABLE_FLOAT_API #undef DISABLE_FLOAT_API
@ -18,9 +24,24 @@
/* Assertions */ /* Assertions */
#undef ENABLE_ASSERTIONS #undef ENABLE_ASSERTIONS
/* Deep PLC */
#undef ENABLE_DEEP_PLC
/* DRED */
#undef ENABLE_DRED
/* Hardening */ /* Hardening */
#undef ENABLE_HARDENING #undef ENABLE_HARDENING
/* LOSSGEN */
#undef ENABLE_LOSSGEN
/* Enable Opus Speech Coding Enhancement */
#undef ENABLE_OSCE
/* Enable dumping of OSCE training data */
#undef ENABLE_OSCE_TRAINING_DATA
/* Debug fixed-point implementation */ /* Debug fixed-point implementation */
#undef FIXED_DEBUG #undef FIXED_DEBUG
@ -51,12 +72,12 @@
/* Define to 1 if you have the `lrintf' function. */ /* Define to 1 if you have the `lrintf' function. */
#undef HAVE_LRINTF #undef HAVE_LRINTF
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <stdint.h> header file. */ /* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H #undef HAVE_STDINT_H
/* Define to 1 if you have the <stdio.h> header file. */
#undef HAVE_STDIO_H
/* Define to 1 if you have the <stdlib.h> header file. */ /* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H #undef HAVE_STDLIB_H
@ -96,6 +117,9 @@
/* Use ARM NEON inline asm optimizations */ /* Use ARM NEON inline asm optimizations */
#undef OPUS_ARM_INLINE_NEON #undef OPUS_ARM_INLINE_NEON
/* Compiler supports Aarch64 DOTPROD Intrinsics */
#undef OPUS_ARM_MAY_HAVE_DOTPROD
/* Define if assembler supports EDSP instructions */ /* Define if assembler supports EDSP instructions */
#undef OPUS_ARM_MAY_HAVE_EDSP #undef OPUS_ARM_MAY_HAVE_EDSP
@ -111,6 +135,9 @@
/* Define if binary requires Aarch64 Neon Intrinsics */ /* Define if binary requires Aarch64 Neon Intrinsics */
#undef OPUS_ARM_PRESUME_AARCH64_NEON_INTR #undef OPUS_ARM_PRESUME_AARCH64_NEON_INTR
/* Define if binary requires Aarch64 dotprod Intrinsics */
#undef OPUS_ARM_PRESUME_DOTPROD
/* Define if binary requires EDSP instruction support */ /* Define if binary requires EDSP instruction support */
#undef OPUS_ARM_PRESUME_EDSP #undef OPUS_ARM_PRESUME_EDSP
@ -132,8 +159,8 @@
/* Use run-time CPU capabilities detection */ /* Use run-time CPU capabilities detection */
#undef OPUS_HAVE_RTCD #undef OPUS_HAVE_RTCD
/* Compiler supports X86 AVX Intrinsics */ /* Compiler supports X86 AVX2 Intrinsics */
#undef OPUS_X86_MAY_HAVE_AVX #undef OPUS_X86_MAY_HAVE_AVX2
/* Compiler supports X86 SSE Intrinsics */ /* Compiler supports X86 SSE Intrinsics */
#undef OPUS_X86_MAY_HAVE_SSE #undef OPUS_X86_MAY_HAVE_SSE
@ -144,8 +171,8 @@
/* Compiler supports X86 SSE4.1 Intrinsics */ /* Compiler supports X86 SSE4.1 Intrinsics */
#undef OPUS_X86_MAY_HAVE_SSE4_1 #undef OPUS_X86_MAY_HAVE_SSE4_1
/* Define if binary requires AVX intrinsics support */ /* Define if binary requires AVX2 intrinsics support */
#undef OPUS_X86_PRESUME_AVX #undef OPUS_X86_PRESUME_AVX2
/* Define if binary requires SSE intrinsics support */ /* Define if binary requires SSE intrinsics support */
#undef OPUS_X86_PRESUME_SSE #undef OPUS_X86_PRESUME_SSE
@ -174,7 +201,9 @@
/* Define to the version of this package. */ /* Define to the version of this package. */
#undef PACKAGE_VERSION #undef PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */ /* Define to 1 if all of the C90 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
backward compatibility; new code need not use it. */
#undef STDC_HEADERS #undef STDC_HEADERS
/* Make use of alloca */ /* Make use of alloca */

2855
src/libs/opus/config.sub vendored

File diff suppressed because it is too large Load Diff

6884
src/libs/opus/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -22,9 +22,9 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
# For libtool. # For libtool.
dnl Please update these for releases. dnl Please update these for releases.
OPUS_LT_CURRENT=9 OPUS_LT_CURRENT=10
OPUS_LT_REVISION=0 OPUS_LT_REVISION=1
OPUS_LT_AGE=9 OPUS_LT_AGE=10
AC_SUBST(OPUS_LT_CURRENT) AC_SUBST(OPUS_LT_CURRENT)
AC_SUBST(OPUS_LT_REVISION) AC_SUBST(OPUS_LT_REVISION)
@ -162,12 +162,39 @@ AS_IF([test "$enable_custom_modes" = "yes"],[
AM_CONDITIONAL([CUSTOM_MODES], [test "$enable_custom_modes" = "yes"]) AM_CONDITIONAL([CUSTOM_MODES], [test "$enable_custom_modes" = "yes"])
AC_ARG_ENABLE([dred],
[AS_HELP_STRING([--enable-dred], [Use Deep REDundancy (DRED)])],,
[enable_dred=no])
AS_IF([test "$enable_dred" = "yes"],[
AC_DEFINE([ENABLE_DRED], [1], [DRED])
])
AM_CONDITIONAL([ENABLE_DRED], [test "$enable_dred" = "yes"])
AC_ARG_ENABLE([deep-plc],
[AS_HELP_STRING([--enable-deep-plc], [Use deep PLC for SILK])],,
[enable_deep_plc=no])
AS_IF([test "$enable_deep_plc" = "yes" || test "$enable_dred" = "yes" || test "$enable_osce" = "yes" || test "$enable_osce_training_data" = "yes"],[
AC_DEFINE([ENABLE_DEEP_PLC], [1], [Deep PLC])
])
AM_CONDITIONAL([ENABLE_DEEP_PLC], [test "$enable_deep_plc" = "yes" || test "$enable_dred" = "yes" || test "$enable_osce" = "yes" || test "$enable_osce_training_data" = "yes"])
AC_ARG_ENABLE([lossgen],
[AS_HELP_STRING([--enable-lossgen], [Build opus_demo with packet loss simulator])],,
[enable_lossgen=no])
AS_IF([test "$enable_lossgen" = "yes"],[
AC_DEFINE([ENABLE_LOSSGEN], [1], [LOSSGEN])
])
AM_CONDITIONAL([ENABLE_LOSSGEN], [test "$enable_lossgen" = "yes"])
has_float_approx=no has_float_approx=no
#case "$host_cpu" in case "$host_cpu" in
#i[[3456]]86 | x86_64 | powerpc64 | powerpc32 | ia64) i[[3456]]86 | x86_64 | arm* | aarch64* | powerpc64 | powerpc32 | ia64)
# has_float_approx=yes has_float_approx=yes
# ;; ;;
#esac esac
AC_ARG_ENABLE([float-approx], AC_ARG_ENABLE([float-approx],
[AS_HELP_STRING([--enable-float-approx], [enable fast approximations for floating point])], [AS_HELP_STRING([--enable-float-approx], [enable fast approximations for floating point])],
@ -202,7 +229,7 @@ AS_IF([test x"${enable_asm}" = x"yes"],[
case $host_cpu in case $host_cpu in
arm*) arm*)
dnl Currently we only have asm for fixed-point dnl Currently we only have asm for fixed-point
AS_IF([test "$enable_float" != "yes"],[ #AS_IF([test "$enable_float" != "yes"],[
cpu_arm=yes cpu_arm=yes
AC_DEFINE([OPUS_ARM_ASM], [], [Make use of ARM asm optimization]) AC_DEFINE([OPUS_ARM_ASM], [], [Make use of ARM asm optimization])
AS_GCC_INLINE_ASSEMBLY( AS_GCC_INLINE_ASSEMBLY(
@ -316,6 +343,18 @@ AS_IF([test x"${enable_asm}" = x"yes"],[
) )
]) ])
AC_SUBST(OPUS_ARM_MAY_HAVE_NEON) AC_SUBST(OPUS_ARM_MAY_HAVE_NEON)
AS_IF([test x"$OPUS_ARM_MAY_HAVE_DOTPROD" = x"1"],[
AC_DEFINE(OPUS_ARM_MAY_HAVE_DOTPROD, 1,
[Define if compiler supports DOTPROD instructions])
AS_IF([test x"$OPUS_ARM_PRESUME_DOTPROD" = x"1"], [
AC_DEFINE(OPUS_ARM_PRESUME_DOTPROD, 1,
[Define if binary requires DOTPROD instruction support])
asm_optimization="$asm_optimization (DOTPROD)"
],
[rtcd_support="$rtcd_support (DOTPROD)"]
)
])
AC_SUBST(OPUS_ARM_MAY_HAVE_DOTPROD)
dnl Make sure turning on RTCD gets us at least one dnl Make sure turning on RTCD gets us at least one
dnl instruction set. dnl instruction set.
AS_IF([test x"$rtcd_support" != x""], AS_IF([test x"$rtcd_support" != x""],
@ -336,7 +375,7 @@ AS_IF([test x"${enable_asm}" = x"yes"],[
[*** ARM assembly requires perl -- disabling optimizations]) [*** ARM assembly requires perl -- disabling optimizations])
asm_optimization="(missing perl dependency for ARM)" asm_optimization="(missing perl dependency for ARM)"
]) ])
]) #])
;; ;;
esac esac
],[ ],[
@ -352,13 +391,14 @@ AM_CONDITIONAL([OPUS_ARM_EXTERNAL_ASM],
AM_CONDITIONAL([HAVE_SSE], [false]) AM_CONDITIONAL([HAVE_SSE], [false])
AM_CONDITIONAL([HAVE_SSE2], [false]) AM_CONDITIONAL([HAVE_SSE2], [false])
AM_CONDITIONAL([HAVE_SSE4_1], [false]) AM_CONDITIONAL([HAVE_SSE4_1], [false])
AM_CONDITIONAL([HAVE_AVX], [false]) AM_CONDITIONAL([HAVE_AVX2], [false])
m4_define([DEFAULT_X86_SSE_CFLAGS], [-msse]) m4_define([DEFAULT_X86_SSE_CFLAGS], [-msse])
m4_define([DEFAULT_X86_SSE2_CFLAGS], [-msse2]) m4_define([DEFAULT_X86_SSE2_CFLAGS], [-msse2])
m4_define([DEFAULT_X86_SSE4_1_CFLAGS], [-msse4.1]) m4_define([DEFAULT_X86_SSE4_1_CFLAGS], [-msse4.1])
m4_define([DEFAULT_X86_AVX_CFLAGS], [-mavx]) m4_define([DEFAULT_X86_AVX2_CFLAGS], [-mavx -mfma -mavx2])
m4_define([DEFAULT_ARM_NEON_INTR_CFLAGS], [-mfpu=neon]) m4_define([DEFAULT_ARM_NEON_INTR_CFLAGS], [-mfpu=neon])
m4_define([DEFAULT_ARM_DOTPROD_INTR_CFLAGS], ["-march=armv8.2-a+dotprod"])
# With GCC on ARM32 softfp architectures (e.g. Android, or older Ubuntu) you need to specify # With GCC on ARM32 softfp architectures (e.g. Android, or older Ubuntu) you need to specify
# -mfloat-abi=softfp for -mfpu=neon to work. However, on ARM32 hardfp architectures (e.g. newer Ubuntu), # -mfloat-abi=softfp for -mfpu=neon to work. However, on ARM32 hardfp architectures (e.g. newer Ubuntu),
# this option will break things. # this option will break things.
@ -374,14 +414,16 @@ AS_CASE([$host],
AC_ARG_VAR([X86_SSE_CFLAGS], [C compiler flags to compile SSE intrinsics @<:@default=]DEFAULT_X86_SSE_CFLAGS[@:>@]) AC_ARG_VAR([X86_SSE_CFLAGS], [C compiler flags to compile SSE intrinsics @<:@default=]DEFAULT_X86_SSE_CFLAGS[@:>@])
AC_ARG_VAR([X86_SSE2_CFLAGS], [C compiler flags to compile SSE2 intrinsics @<:@default=]DEFAULT_X86_SSE2_CFLAGS[@:>@]) AC_ARG_VAR([X86_SSE2_CFLAGS], [C compiler flags to compile SSE2 intrinsics @<:@default=]DEFAULT_X86_SSE2_CFLAGS[@:>@])
AC_ARG_VAR([X86_SSE4_1_CFLAGS], [C compiler flags to compile SSE4.1 intrinsics @<:@default=]DEFAULT_X86_SSE4_1_CFLAGS[@:>@]) AC_ARG_VAR([X86_SSE4_1_CFLAGS], [C compiler flags to compile SSE4.1 intrinsics @<:@default=]DEFAULT_X86_SSE4_1_CFLAGS[@:>@])
AC_ARG_VAR([X86_AVX_CFLAGS], [C compiler flags to compile AVX intrinsics @<:@default=]DEFAULT_X86_AVX_CFLAGS[@:>@]) AC_ARG_VAR([X86_AVX2_CFLAGS], [C compiler flags to compile AVX2 intrinsics @<:@default=]DEFAULT_X86_AVX2_CFLAGS[@:>@])
AC_ARG_VAR([ARM_NEON_INTR_CFLAGS], [C compiler flags to compile ARM NEON intrinsics @<:@default=]DEFAULT_ARM_NEON_INTR_CFLAGS / DEFAULT_ARM_NEON_SOFTFP_INTR_CFLAGS[@:>@]) AC_ARG_VAR([ARM_NEON_INTR_CFLAGS], [C compiler flags to compile ARM NEON intrinsics @<:@default=]DEFAULT_ARM_NEON_INTR_CFLAGS / DEFAULT_ARM_NEON_SOFTFP_INTR_CFLAGS[@:>@])
AC_ARG_VAR([ARM_DOTPROD_INTR_CFLAGS], [C compiler flags to compile ARM DOTPROD intrinsics @<:@default=]DEFAULT_ARM_DOTPROD_INTR_CFLAGS[@:>@])
AS_VAR_SET_IF([X86_SSE_CFLAGS], [], [AS_VAR_SET([X86_SSE_CFLAGS], "DEFAULT_X86_SSE_CFLAGS")]) AS_VAR_SET_IF([X86_SSE_CFLAGS], [], [AS_VAR_SET([X86_SSE_CFLAGS], "DEFAULT_X86_SSE_CFLAGS")])
AS_VAR_SET_IF([X86_SSE2_CFLAGS], [], [AS_VAR_SET([X86_SSE2_CFLAGS], "DEFAULT_X86_SSE2_CFLAGS")]) AS_VAR_SET_IF([X86_SSE2_CFLAGS], [], [AS_VAR_SET([X86_SSE2_CFLAGS], "DEFAULT_X86_SSE2_CFLAGS")])
AS_VAR_SET_IF([X86_SSE4_1_CFLAGS], [], [AS_VAR_SET([X86_SSE4_1_CFLAGS], "DEFAULT_X86_SSE4_1_CFLAGS")]) AS_VAR_SET_IF([X86_SSE4_1_CFLAGS], [], [AS_VAR_SET([X86_SSE4_1_CFLAGS], "DEFAULT_X86_SSE4_1_CFLAGS")])
AS_VAR_SET_IF([X86_AVX_CFLAGS], [], [AS_VAR_SET([X86_AVX_CFLAGS], "DEFAULT_X86_AVX_CFLAGS")]) AS_VAR_SET_IF([X86_AVX2_CFLAGS], [], [AS_VAR_SET([X86_AVX2_CFLAGS], "DEFAULT_X86_AVX2_CFLAGS")])
AS_VAR_SET_IF([ARM_NEON_INTR_CFLAGS], [], [AS_VAR_SET([ARM_NEON_INTR_CFLAGS], ["$RESOLVED_DEFAULT_ARM_NEON_INTR_CFLAGS"])]) AS_VAR_SET_IF([ARM_NEON_INTR_CFLAGS], [], [AS_VAR_SET([ARM_NEON_INTR_CFLAGS], ["$RESOLVED_DEFAULT_ARM_NEON_INTR_CFLAGS"])])
AS_VAR_SET_IF([ARM_DOTPROD_INTR_CFLAGS], [], [AS_VAR_SET([ARM_DOTPROD_INTR_CFLAGS], ["DEFAULT_ARM_DOTPROD_INTR_CFLAGS"])])
AC_DEFUN([OPUS_PATH_NE10], AC_DEFUN([OPUS_PATH_NE10],
[ [
@ -525,6 +567,46 @@ AS_IF([test x"$enable_intrinsics" = x"yes"],[
intrinsics_support="$intrinsics_support (NEON [Aarch64])" intrinsics_support="$intrinsics_support (NEON [Aarch64])"
]) ])
OPUS_CHECK_INTRINSICS(
[Aarch64 dotprod],
[$ARM_DOTPROD_INTR_CFLAGS],
[OPUS_ARM_MAY_HAVE_DOTPROD],
[OPUS_ARM_PRESUME_DOTPROD],
[[#include <arm_neon.h>
]],
[[
static int32x4_t acc;
static int8x16_t a, b;
acc = vdotq_s32(acc, a, b);
]]
)
AS_IF([test x"$OPUS_ARM_MAY_HAVE_DOTPROD" = x"1" && test x"$OPUS_ARM_PRESUME_DOTPROD" != x"1"],
[
OPUS_ARM_DOTPROD_INTR_CFLAGS="$ARM_NEON_DOTPROD_CFLAGS"
AC_SUBST([OPUS_ARM_DOTPROD_INTR_CFLAGS])
]
)
AS_IF([test x"$OPUS_ARM_MAY_HAVE_DOTPROD" = x"1"],
[
AC_DEFINE([OPUS_ARM_MAY_HAVE_DOTPROD], 1, [Compiler supports Aarch64 DOTPROD Intrinsics])
intrinsics_support="$intrinsics_support (DOTPROD)"
AS_IF([test x"$OPUS_ARM_PRESUME_DOTPROD" = x"1"],
[
AC_DEFINE([OPUS_ARM_PRESUME_DOTPROD], 1, [Define if binary requires Aarch64 dotprod Intrinsics])
intrinsics_support="$intrinsics_support (DOTPROD [Aarch64])"
])
AS_IF([test x"$enable_rtcd" != x"no" && test x"$OPUS_ARM_PRESUME_DOTPROD" != x"1"],
[AS_IF([test x"$rtcd_support" = x"no"],
[rtcd_support="ARM (DOTPROD Intrinsics)"],
[rtcd_support="$rtcd_support (DOTPROD Intrinsics)"])])
]
)
AS_IF([test x"$intrinsics_support" = x""], AS_IF([test x"$intrinsics_support" = x""],
[intrinsics_support=no], [intrinsics_support=no],
[intrinsics_support="ARM$intrinsics_support"]) [intrinsics_support="ARM$intrinsics_support"])
@ -601,24 +683,31 @@ AS_IF([test x"$enable_intrinsics" = x"yes"],[
] ]
) )
OPUS_CHECK_INTRINSICS( OPUS_CHECK_INTRINSICS(
[AVX], [AVX2],
[$X86_AVX_CFLAGS], [$X86_AVX2_CFLAGS],
[OPUS_X86_MAY_HAVE_AVX], [OPUS_X86_MAY_HAVE_AVX2],
[OPUS_X86_PRESUME_AVX], [OPUS_X86_PRESUME_AVX2],
[[#include <immintrin.h> [[#include <immintrin.h>
#include <time.h> #include <time.h>
]], ]],
[[ [[
unsigned char utest[[16]] = {1};
__m256 mtest; __m256 mtest;
__m256i mtest1;
__m256i mtest2;
mtest = _mm256_set1_ps((float)time(NULL)); mtest = _mm256_set1_ps((float)time(NULL));
mtest = _mm256_addsub_ps(mtest, mtest); mtest = _mm256_fmadd_ps(mtest, mtest, mtest);
return _mm_cvtss_si32(_mm256_extractf128_ps(mtest, 0)); mtest1 = _mm256_set_m128i(_mm_loadu_si64(utest), _mm_loadu_si64(utest));
mtest2 =
_mm256_cvtepi16_epi32(_mm_loadu_si128(utest));
return _mm256_extract_epi16(_mm256_xor_si256(
_mm256_xor_si256(mtest1, mtest2), _mm256_cvttps_epi32(mtest)), 0);
]] ]]
) )
AS_IF([test x"$OPUS_X86_MAY_HAVE_AVX" = x"1" && test x"$OPUS_X86_PRESUME_AVX" != x"1"], AS_IF([test x"$OPUS_X86_MAY_HAVE_AVX2" = x"1" && test x"$OPUS_X86_PRESUME_AVX2" != x"1"],
[ [
OPUS_X86_AVX_CFLAGS="$X86_AVX_CFLAGS" OPUS_X86_AVX2_CFLAGS="$X86_AVX2_CFLAGS"
AC_SUBST([OPUS_X86_AVX_CFLAGS]) AC_SUBST([OPUS_X86_AVX2_CFLAGS])
] ]
) )
AS_IF([test x"$rtcd_support" = x"no"], [rtcd_support=""]) AS_IF([test x"$rtcd_support" = x"no"], [rtcd_support=""])
@ -660,17 +749,17 @@ AS_IF([test x"$enable_intrinsics" = x"yes"],[
[ [
AC_MSG_WARN([Compiler does not support SSE4.1 intrinsics]) AC_MSG_WARN([Compiler does not support SSE4.1 intrinsics])
]) ])
AS_IF([test x"$OPUS_X86_MAY_HAVE_AVX" = x"1"], AS_IF([test x"$OPUS_X86_MAY_HAVE_AVX2" = x"1"],
[ [
AC_DEFINE([OPUS_X86_MAY_HAVE_AVX], 1, [Compiler supports X86 AVX Intrinsics]) AC_DEFINE([OPUS_X86_MAY_HAVE_AVX2], 1, [Compiler supports X86 AVX2 Intrinsics])
intrinsics_support="$intrinsics_support AVX" intrinsics_support="$intrinsics_support AVX2"
AS_IF([test x"$OPUS_X86_PRESUME_AVX" = x"1"], AS_IF([test x"$OPUS_X86_PRESUME_AVX2" = x"1"],
[AC_DEFINE([OPUS_X86_PRESUME_AVX], 1, [Define if binary requires AVX intrinsics support])], [AC_DEFINE([OPUS_X86_PRESUME_AVX2], 1, [Define if binary requires AVX2 intrinsics support])],
[rtcd_support="$rtcd_support AVX"]) [rtcd_support="$rtcd_support AVX2"])
], ],
[ [
AC_MSG_WARN([Compiler does not support AVX intrinsics]) AC_MSG_WARN([Compiler does not support AVX2 intrinsics])
]) ])
AS_IF([test x"$intrinsics_support" = x""], AS_IF([test x"$intrinsics_support" = x""],
@ -742,6 +831,8 @@ AS_IF([test x"$enable_intrinsics" = x"yes"],[
]) ])
AM_CONDITIONAL([CPU_ARM], [test "$cpu_arm" = "yes"]) AM_CONDITIONAL([CPU_ARM], [test "$cpu_arm" = "yes"])
AM_CONDITIONAL([HAVE_ARM_DOTPROD],
[test x"$OPUS_ARM_MAY_HAVE_DOTPROD" = x"1"])
AM_CONDITIONAL([HAVE_ARM_NEON_INTR], AM_CONDITIONAL([HAVE_ARM_NEON_INTR],
[test x"$OPUS_ARM_MAY_HAVE_NEON_INTR" = x"1"]) [test x"$OPUS_ARM_MAY_HAVE_NEON_INTR" = x"1"])
AM_CONDITIONAL([HAVE_ARM_NE10], AM_CONDITIONAL([HAVE_ARM_NE10],
@ -753,8 +844,8 @@ AM_CONDITIONAL([HAVE_SSE2],
[test x"$OPUS_X86_MAY_HAVE_SSE2" = x"1"]) [test x"$OPUS_X86_MAY_HAVE_SSE2" = x"1"])
AM_CONDITIONAL([HAVE_SSE4_1], AM_CONDITIONAL([HAVE_SSE4_1],
[test x"$OPUS_X86_MAY_HAVE_SSE4_1" = x"1"]) [test x"$OPUS_X86_MAY_HAVE_SSE4_1" = x"1"])
AM_CONDITIONAL([HAVE_AVX], AM_CONDITIONAL([HAVE_AVX2],
[test x"$OPUS_X86_MAY_HAVE_AVX" = x"1"]) [test x"$OPUS_X86_MAY_HAVE_AVX2" = x"1"])
AM_CONDITIONAL([HAVE_RTCD], AM_CONDITIONAL([HAVE_RTCD],
[test x"$enable_rtcd" = x"yes" -a x"$rtcd_support" != x"no"]) [test x"$enable_rtcd" = x"yes" -a x"$rtcd_support" != x"no"])
@ -813,6 +904,47 @@ AS_IF([test "$enable_doc" = "yes"], [
HAVE_DOXYGEN=no HAVE_DOXYGEN=no
]) ])
AC_ARG_ENABLE([dot-product],
AS_HELP_STRING([--disable-dot-product], [Disable dot product implementation]),,
enable_dot_product=yes)
AS_IF([test "$enable_dot_product" = "no"], [
AC_DEFINE([DISABLE_DOT_PROD], [1], [Disable dot product instructions])
])
AC_ARG_ENABLE([dnn-debug-float],
AS_HELP_STRING([--enable-dnn-debug-float], [Use floating-point DNN computation everywhere]),,
enable_dnn_debug_float=no)
AS_IF([test "$enable_dnn_debug_float" = "no"], [
AC_DEFINE([DISABLE_DEBUG_FLOAT], [1], [Disable DNN debug float])
])
AC_ARG_ENABLE([osce-training-data],
AS_HELP_STRING([--enable-osce-training-data], [enables feature output for SILK enhancement]),,
[enable_osc_training_data=no]
)
AS_IF([test "$enable_osce_training_data" = "yes"], [
AC_DEFINE([ENABLE_OSCE_TRAINING_DATA], [1], [Enable dumping of OSCE training data])
])
AC_MSG_CHECKING([argument osce training data])
AS_IF([test "$enable_osce_training_data" = "yes"], [
AC_MSG_RESULT([yes])
], [AC_MSG_RESULT([no])])
AC_ARG_ENABLE([osce],
AS_HELP_STRING([--enable-osce], [enables speech coding enhancement]),,
[enable_osce=no]
)
AS_IF([test "$enable_osce" = "yes" || test "$enable_osce_training_data" = "yes"], [
AC_DEFINE([ENABLE_OSCE], [1], [Enable Opus Speech Coding Enhancement])
])
AM_CONDITIONAL([ENABLE_OSCE], [test "$enable_osce" = "yes" || test "$enable_osce_training_data" = "yes"])
AM_CONDITIONAL([HAVE_DOXYGEN], [test "$HAVE_DOXYGEN" = "yes"]) AM_CONDITIONAL([HAVE_DOXYGEN], [test "$HAVE_DOXYGEN" = "yes"])
AC_ARG_ENABLE([extra-programs], AC_ARG_ENABLE([extra-programs],

View File

@ -3,7 +3,7 @@
scriptversion=2018-03-07.03; # UTC scriptversion=2018-03-07.03; # UTC
# Copyright (C) 1999-2018 Free Software Foundation, Inc. # Copyright (C) 1999-2021 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by

View File

@ -86297,361 +86297,361 @@ static const float dec_conv5_bias[32] = {
#ifndef USE_WEIGHTS_FILE #ifndef USE_WEIGHTS_FILE
const WeightArray rdovaedec_arrays[] = { const WeightArray rdovaedec_arrays[] = {
#ifdef WEIGHTS_dec_dense1_weights_float_DEFINED #ifdef WEIGHTS_dec_dense1_weights_float_DEFINED
{"dec_dense1_weights_float", WEIGHTS_dec_dense1_weights_float_TYPE,sizeof(dec_dense1_weights_float),dec_dense1_weights_float}, {"dec_dense1_weights_float",WEIGHTS_dec_dense1_weights_float_TYPE,sizeof(dec_dense1_weights_float),dec_dense1_weights_float},
#endif #endif
#ifdef WEIGHTS_dec_dense1_bias_DEFINED #ifdef WEIGHTS_dec_dense1_bias_DEFINED
{"dec_dense1_bias", WEIGHTS_dec_dense1_bias_TYPE,sizeof(dec_dense1_bias),dec_dense1_bias}, {"dec_dense1_bias",WEIGHTS_dec_dense1_bias_TYPE,sizeof(dec_dense1_bias),dec_dense1_bias},
#endif #endif
#ifdef WEIGHTS_dec_glu1_weights_int8_DEFINED #ifdef WEIGHTS_dec_glu1_weights_int8_DEFINED
{"dec_glu1_weights_int8", WEIGHTS_dec_glu1_weights_int8_TYPE,sizeof(dec_glu1_weights_int8),dec_glu1_weights_int8}, {"dec_glu1_weights_int8",WEIGHTS_dec_glu1_weights_int8_TYPE,sizeof(dec_glu1_weights_int8),dec_glu1_weights_int8},
#endif #endif
#ifdef WEIGHTS_dec_glu1_weights_float_DEFINED #ifdef WEIGHTS_dec_glu1_weights_float_DEFINED
{"dec_glu1_weights_float", WEIGHTS_dec_glu1_weights_float_TYPE,sizeof(dec_glu1_weights_float),dec_glu1_weights_float}, {"dec_glu1_weights_float",WEIGHTS_dec_glu1_weights_float_TYPE,sizeof(dec_glu1_weights_float),dec_glu1_weights_float},
#endif #endif
#ifdef WEIGHTS_dec_glu1_subias_DEFINED #ifdef WEIGHTS_dec_glu1_subias_DEFINED
{"dec_glu1_subias", WEIGHTS_dec_glu1_subias_TYPE,sizeof(dec_glu1_subias),dec_glu1_subias}, {"dec_glu1_subias",WEIGHTS_dec_glu1_subias_TYPE,sizeof(dec_glu1_subias),dec_glu1_subias},
#endif #endif
#ifdef WEIGHTS_dec_glu1_scale_DEFINED #ifdef WEIGHTS_dec_glu1_scale_DEFINED
{"dec_glu1_scale", WEIGHTS_dec_glu1_scale_TYPE,sizeof(dec_glu1_scale),dec_glu1_scale}, {"dec_glu1_scale",WEIGHTS_dec_glu1_scale_TYPE,sizeof(dec_glu1_scale),dec_glu1_scale},
#endif #endif
#ifdef WEIGHTS_dec_glu1_bias_DEFINED #ifdef WEIGHTS_dec_glu1_bias_DEFINED
{"dec_glu1_bias", WEIGHTS_dec_glu1_bias_TYPE,sizeof(dec_glu1_bias),dec_glu1_bias}, {"dec_glu1_bias",WEIGHTS_dec_glu1_bias_TYPE,sizeof(dec_glu1_bias),dec_glu1_bias},
#endif #endif
#ifdef WEIGHTS_dec_glu2_weights_int8_DEFINED #ifdef WEIGHTS_dec_glu2_weights_int8_DEFINED
{"dec_glu2_weights_int8", WEIGHTS_dec_glu2_weights_int8_TYPE,sizeof(dec_glu2_weights_int8),dec_glu2_weights_int8}, {"dec_glu2_weights_int8",WEIGHTS_dec_glu2_weights_int8_TYPE,sizeof(dec_glu2_weights_int8),dec_glu2_weights_int8},
#endif #endif
#ifdef WEIGHTS_dec_glu2_weights_float_DEFINED #ifdef WEIGHTS_dec_glu2_weights_float_DEFINED
{"dec_glu2_weights_float", WEIGHTS_dec_glu2_weights_float_TYPE,sizeof(dec_glu2_weights_float),dec_glu2_weights_float}, {"dec_glu2_weights_float",WEIGHTS_dec_glu2_weights_float_TYPE,sizeof(dec_glu2_weights_float),dec_glu2_weights_float},
#endif #endif
#ifdef WEIGHTS_dec_glu2_subias_DEFINED #ifdef WEIGHTS_dec_glu2_subias_DEFINED
{"dec_glu2_subias", WEIGHTS_dec_glu2_subias_TYPE,sizeof(dec_glu2_subias),dec_glu2_subias}, {"dec_glu2_subias",WEIGHTS_dec_glu2_subias_TYPE,sizeof(dec_glu2_subias),dec_glu2_subias},
#endif #endif
#ifdef WEIGHTS_dec_glu2_scale_DEFINED #ifdef WEIGHTS_dec_glu2_scale_DEFINED
{"dec_glu2_scale", WEIGHTS_dec_glu2_scale_TYPE,sizeof(dec_glu2_scale),dec_glu2_scale}, {"dec_glu2_scale",WEIGHTS_dec_glu2_scale_TYPE,sizeof(dec_glu2_scale),dec_glu2_scale},
#endif #endif
#ifdef WEIGHTS_dec_glu2_bias_DEFINED #ifdef WEIGHTS_dec_glu2_bias_DEFINED
{"dec_glu2_bias", WEIGHTS_dec_glu2_bias_TYPE,sizeof(dec_glu2_bias),dec_glu2_bias}, {"dec_glu2_bias",WEIGHTS_dec_glu2_bias_TYPE,sizeof(dec_glu2_bias),dec_glu2_bias},
#endif #endif
#ifdef WEIGHTS_dec_glu3_weights_int8_DEFINED #ifdef WEIGHTS_dec_glu3_weights_int8_DEFINED
{"dec_glu3_weights_int8", WEIGHTS_dec_glu3_weights_int8_TYPE,sizeof(dec_glu3_weights_int8),dec_glu3_weights_int8}, {"dec_glu3_weights_int8",WEIGHTS_dec_glu3_weights_int8_TYPE,sizeof(dec_glu3_weights_int8),dec_glu3_weights_int8},
#endif #endif
#ifdef WEIGHTS_dec_glu3_weights_float_DEFINED #ifdef WEIGHTS_dec_glu3_weights_float_DEFINED
{"dec_glu3_weights_float", WEIGHTS_dec_glu3_weights_float_TYPE,sizeof(dec_glu3_weights_float),dec_glu3_weights_float}, {"dec_glu3_weights_float",WEIGHTS_dec_glu3_weights_float_TYPE,sizeof(dec_glu3_weights_float),dec_glu3_weights_float},
#endif #endif
#ifdef WEIGHTS_dec_glu3_subias_DEFINED #ifdef WEIGHTS_dec_glu3_subias_DEFINED
{"dec_glu3_subias", WEIGHTS_dec_glu3_subias_TYPE,sizeof(dec_glu3_subias),dec_glu3_subias}, {"dec_glu3_subias",WEIGHTS_dec_glu3_subias_TYPE,sizeof(dec_glu3_subias),dec_glu3_subias},
#endif #endif
#ifdef WEIGHTS_dec_glu3_scale_DEFINED #ifdef WEIGHTS_dec_glu3_scale_DEFINED
{"dec_glu3_scale", WEIGHTS_dec_glu3_scale_TYPE,sizeof(dec_glu3_scale),dec_glu3_scale}, {"dec_glu3_scale",WEIGHTS_dec_glu3_scale_TYPE,sizeof(dec_glu3_scale),dec_glu3_scale},
#endif #endif
#ifdef WEIGHTS_dec_glu3_bias_DEFINED #ifdef WEIGHTS_dec_glu3_bias_DEFINED
{"dec_glu3_bias", WEIGHTS_dec_glu3_bias_TYPE,sizeof(dec_glu3_bias),dec_glu3_bias}, {"dec_glu3_bias",WEIGHTS_dec_glu3_bias_TYPE,sizeof(dec_glu3_bias),dec_glu3_bias},
#endif #endif
#ifdef WEIGHTS_dec_glu4_weights_int8_DEFINED #ifdef WEIGHTS_dec_glu4_weights_int8_DEFINED
{"dec_glu4_weights_int8", WEIGHTS_dec_glu4_weights_int8_TYPE,sizeof(dec_glu4_weights_int8),dec_glu4_weights_int8}, {"dec_glu4_weights_int8",WEIGHTS_dec_glu4_weights_int8_TYPE,sizeof(dec_glu4_weights_int8),dec_glu4_weights_int8},
#endif #endif
#ifdef WEIGHTS_dec_glu4_weights_float_DEFINED #ifdef WEIGHTS_dec_glu4_weights_float_DEFINED
{"dec_glu4_weights_float", WEIGHTS_dec_glu4_weights_float_TYPE,sizeof(dec_glu4_weights_float),dec_glu4_weights_float}, {"dec_glu4_weights_float",WEIGHTS_dec_glu4_weights_float_TYPE,sizeof(dec_glu4_weights_float),dec_glu4_weights_float},
#endif #endif
#ifdef WEIGHTS_dec_glu4_subias_DEFINED #ifdef WEIGHTS_dec_glu4_subias_DEFINED
{"dec_glu4_subias", WEIGHTS_dec_glu4_subias_TYPE,sizeof(dec_glu4_subias),dec_glu4_subias}, {"dec_glu4_subias",WEIGHTS_dec_glu4_subias_TYPE,sizeof(dec_glu4_subias),dec_glu4_subias},
#endif #endif
#ifdef WEIGHTS_dec_glu4_scale_DEFINED #ifdef WEIGHTS_dec_glu4_scale_DEFINED
{"dec_glu4_scale", WEIGHTS_dec_glu4_scale_TYPE,sizeof(dec_glu4_scale),dec_glu4_scale}, {"dec_glu4_scale",WEIGHTS_dec_glu4_scale_TYPE,sizeof(dec_glu4_scale),dec_glu4_scale},
#endif #endif
#ifdef WEIGHTS_dec_glu4_bias_DEFINED #ifdef WEIGHTS_dec_glu4_bias_DEFINED
{"dec_glu4_bias", WEIGHTS_dec_glu4_bias_TYPE,sizeof(dec_glu4_bias),dec_glu4_bias}, {"dec_glu4_bias",WEIGHTS_dec_glu4_bias_TYPE,sizeof(dec_glu4_bias),dec_glu4_bias},
#endif #endif
#ifdef WEIGHTS_dec_glu5_weights_int8_DEFINED #ifdef WEIGHTS_dec_glu5_weights_int8_DEFINED
{"dec_glu5_weights_int8", WEIGHTS_dec_glu5_weights_int8_TYPE,sizeof(dec_glu5_weights_int8),dec_glu5_weights_int8}, {"dec_glu5_weights_int8",WEIGHTS_dec_glu5_weights_int8_TYPE,sizeof(dec_glu5_weights_int8),dec_glu5_weights_int8},
#endif #endif
#ifdef WEIGHTS_dec_glu5_weights_float_DEFINED #ifdef WEIGHTS_dec_glu5_weights_float_DEFINED
{"dec_glu5_weights_float", WEIGHTS_dec_glu5_weights_float_TYPE,sizeof(dec_glu5_weights_float),dec_glu5_weights_float}, {"dec_glu5_weights_float",WEIGHTS_dec_glu5_weights_float_TYPE,sizeof(dec_glu5_weights_float),dec_glu5_weights_float},
#endif #endif
#ifdef WEIGHTS_dec_glu5_subias_DEFINED #ifdef WEIGHTS_dec_glu5_subias_DEFINED
{"dec_glu5_subias", WEIGHTS_dec_glu5_subias_TYPE,sizeof(dec_glu5_subias),dec_glu5_subias}, {"dec_glu5_subias",WEIGHTS_dec_glu5_subias_TYPE,sizeof(dec_glu5_subias),dec_glu5_subias},
#endif #endif
#ifdef WEIGHTS_dec_glu5_scale_DEFINED #ifdef WEIGHTS_dec_glu5_scale_DEFINED
{"dec_glu5_scale", WEIGHTS_dec_glu5_scale_TYPE,sizeof(dec_glu5_scale),dec_glu5_scale}, {"dec_glu5_scale",WEIGHTS_dec_glu5_scale_TYPE,sizeof(dec_glu5_scale),dec_glu5_scale},
#endif #endif
#ifdef WEIGHTS_dec_glu5_bias_DEFINED #ifdef WEIGHTS_dec_glu5_bias_DEFINED
{"dec_glu5_bias", WEIGHTS_dec_glu5_bias_TYPE,sizeof(dec_glu5_bias),dec_glu5_bias}, {"dec_glu5_bias",WEIGHTS_dec_glu5_bias_TYPE,sizeof(dec_glu5_bias),dec_glu5_bias},
#endif #endif
#ifdef WEIGHTS_dec_output_weights_int8_DEFINED #ifdef WEIGHTS_dec_output_weights_int8_DEFINED
{"dec_output_weights_int8", WEIGHTS_dec_output_weights_int8_TYPE,sizeof(dec_output_weights_int8),dec_output_weights_int8}, {"dec_output_weights_int8",WEIGHTS_dec_output_weights_int8_TYPE,sizeof(dec_output_weights_int8),dec_output_weights_int8},
#endif #endif
#ifdef WEIGHTS_dec_output_weights_float_DEFINED #ifdef WEIGHTS_dec_output_weights_float_DEFINED
{"dec_output_weights_float", WEIGHTS_dec_output_weights_float_TYPE,sizeof(dec_output_weights_float),dec_output_weights_float}, {"dec_output_weights_float",WEIGHTS_dec_output_weights_float_TYPE,sizeof(dec_output_weights_float),dec_output_weights_float},
#endif #endif
#ifdef WEIGHTS_dec_output_subias_DEFINED #ifdef WEIGHTS_dec_output_subias_DEFINED
{"dec_output_subias", WEIGHTS_dec_output_subias_TYPE,sizeof(dec_output_subias),dec_output_subias}, {"dec_output_subias",WEIGHTS_dec_output_subias_TYPE,sizeof(dec_output_subias),dec_output_subias},
#endif #endif
#ifdef WEIGHTS_dec_output_scale_DEFINED #ifdef WEIGHTS_dec_output_scale_DEFINED
{"dec_output_scale", WEIGHTS_dec_output_scale_TYPE,sizeof(dec_output_scale),dec_output_scale}, {"dec_output_scale",WEIGHTS_dec_output_scale_TYPE,sizeof(dec_output_scale),dec_output_scale},
#endif #endif
#ifdef WEIGHTS_dec_output_bias_DEFINED #ifdef WEIGHTS_dec_output_bias_DEFINED
{"dec_output_bias", WEIGHTS_dec_output_bias_TYPE,sizeof(dec_output_bias),dec_output_bias}, {"dec_output_bias",WEIGHTS_dec_output_bias_TYPE,sizeof(dec_output_bias),dec_output_bias},
#endif #endif
#ifdef WEIGHTS_dec_hidden_init_weights_float_DEFINED #ifdef WEIGHTS_dec_hidden_init_weights_float_DEFINED
{"dec_hidden_init_weights_float", WEIGHTS_dec_hidden_init_weights_float_TYPE,sizeof(dec_hidden_init_weights_float),dec_hidden_init_weights_float}, {"dec_hidden_init_weights_float",WEIGHTS_dec_hidden_init_weights_float_TYPE,sizeof(dec_hidden_init_weights_float),dec_hidden_init_weights_float},
#endif #endif
#ifdef WEIGHTS_dec_hidden_init_bias_DEFINED #ifdef WEIGHTS_dec_hidden_init_bias_DEFINED
{"dec_hidden_init_bias", WEIGHTS_dec_hidden_init_bias_TYPE,sizeof(dec_hidden_init_bias),dec_hidden_init_bias}, {"dec_hidden_init_bias",WEIGHTS_dec_hidden_init_bias_TYPE,sizeof(dec_hidden_init_bias),dec_hidden_init_bias},
#endif #endif
#ifdef WEIGHTS_dec_gru_init_weights_int8_DEFINED #ifdef WEIGHTS_dec_gru_init_weights_int8_DEFINED
{"dec_gru_init_weights_int8", WEIGHTS_dec_gru_init_weights_int8_TYPE,sizeof(dec_gru_init_weights_int8),dec_gru_init_weights_int8}, {"dec_gru_init_weights_int8",WEIGHTS_dec_gru_init_weights_int8_TYPE,sizeof(dec_gru_init_weights_int8),dec_gru_init_weights_int8},
#endif #endif
#ifdef WEIGHTS_dec_gru_init_weights_float_DEFINED #ifdef WEIGHTS_dec_gru_init_weights_float_DEFINED
{"dec_gru_init_weights_float", WEIGHTS_dec_gru_init_weights_float_TYPE,sizeof(dec_gru_init_weights_float),dec_gru_init_weights_float}, {"dec_gru_init_weights_float",WEIGHTS_dec_gru_init_weights_float_TYPE,sizeof(dec_gru_init_weights_float),dec_gru_init_weights_float},
#endif #endif
#ifdef WEIGHTS_dec_gru_init_subias_DEFINED #ifdef WEIGHTS_dec_gru_init_subias_DEFINED
{"dec_gru_init_subias", WEIGHTS_dec_gru_init_subias_TYPE,sizeof(dec_gru_init_subias),dec_gru_init_subias}, {"dec_gru_init_subias",WEIGHTS_dec_gru_init_subias_TYPE,sizeof(dec_gru_init_subias),dec_gru_init_subias},
#endif #endif
#ifdef WEIGHTS_dec_gru_init_scale_DEFINED #ifdef WEIGHTS_dec_gru_init_scale_DEFINED
{"dec_gru_init_scale", WEIGHTS_dec_gru_init_scale_TYPE,sizeof(dec_gru_init_scale),dec_gru_init_scale}, {"dec_gru_init_scale",WEIGHTS_dec_gru_init_scale_TYPE,sizeof(dec_gru_init_scale),dec_gru_init_scale},
#endif #endif
#ifdef WEIGHTS_dec_gru_init_bias_DEFINED #ifdef WEIGHTS_dec_gru_init_bias_DEFINED
{"dec_gru_init_bias", WEIGHTS_dec_gru_init_bias_TYPE,sizeof(dec_gru_init_bias),dec_gru_init_bias}, {"dec_gru_init_bias",WEIGHTS_dec_gru_init_bias_TYPE,sizeof(dec_gru_init_bias),dec_gru_init_bias},
#endif #endif
#ifdef WEIGHTS_dec_gru1_input_weights_int8_DEFINED #ifdef WEIGHTS_dec_gru1_input_weights_int8_DEFINED
{"dec_gru1_input_weights_int8", WEIGHTS_dec_gru1_input_weights_int8_TYPE,sizeof(dec_gru1_input_weights_int8),dec_gru1_input_weights_int8}, {"dec_gru1_input_weights_int8",WEIGHTS_dec_gru1_input_weights_int8_TYPE,sizeof(dec_gru1_input_weights_int8),dec_gru1_input_weights_int8},
#endif #endif
#ifdef WEIGHTS_dec_gru1_input_weights_float_DEFINED #ifdef WEIGHTS_dec_gru1_input_weights_float_DEFINED
{"dec_gru1_input_weights_float", WEIGHTS_dec_gru1_input_weights_float_TYPE,sizeof(dec_gru1_input_weights_float),dec_gru1_input_weights_float}, {"dec_gru1_input_weights_float",WEIGHTS_dec_gru1_input_weights_float_TYPE,sizeof(dec_gru1_input_weights_float),dec_gru1_input_weights_float},
#endif #endif
#ifdef WEIGHTS_dec_gru1_input_weights_idx_DEFINED #ifdef WEIGHTS_dec_gru1_input_weights_idx_DEFINED
{"dec_gru1_input_weights_idx", WEIGHTS_dec_gru1_input_weights_idx_TYPE,sizeof(dec_gru1_input_weights_idx),dec_gru1_input_weights_idx}, {"dec_gru1_input_weights_idx",WEIGHTS_dec_gru1_input_weights_idx_TYPE,sizeof(dec_gru1_input_weights_idx),dec_gru1_input_weights_idx},
#endif #endif
#ifdef WEIGHTS_dec_gru1_input_subias_DEFINED #ifdef WEIGHTS_dec_gru1_input_subias_DEFINED
{"dec_gru1_input_subias", WEIGHTS_dec_gru1_input_subias_TYPE,sizeof(dec_gru1_input_subias),dec_gru1_input_subias}, {"dec_gru1_input_subias",WEIGHTS_dec_gru1_input_subias_TYPE,sizeof(dec_gru1_input_subias),dec_gru1_input_subias},
#endif #endif
#ifdef WEIGHTS_dec_gru1_input_scale_DEFINED #ifdef WEIGHTS_dec_gru1_input_scale_DEFINED
{"dec_gru1_input_scale", WEIGHTS_dec_gru1_input_scale_TYPE,sizeof(dec_gru1_input_scale),dec_gru1_input_scale}, {"dec_gru1_input_scale",WEIGHTS_dec_gru1_input_scale_TYPE,sizeof(dec_gru1_input_scale),dec_gru1_input_scale},
#endif #endif
#ifdef WEIGHTS_dec_gru1_input_bias_DEFINED #ifdef WEIGHTS_dec_gru1_input_bias_DEFINED
{"dec_gru1_input_bias", WEIGHTS_dec_gru1_input_bias_TYPE,sizeof(dec_gru1_input_bias),dec_gru1_input_bias}, {"dec_gru1_input_bias",WEIGHTS_dec_gru1_input_bias_TYPE,sizeof(dec_gru1_input_bias),dec_gru1_input_bias},
#endif #endif
#ifdef WEIGHTS_dec_gru1_recurrent_weights_int8_DEFINED #ifdef WEIGHTS_dec_gru1_recurrent_weights_int8_DEFINED
{"dec_gru1_recurrent_weights_int8", WEIGHTS_dec_gru1_recurrent_weights_int8_TYPE,sizeof(dec_gru1_recurrent_weights_int8),dec_gru1_recurrent_weights_int8}, {"dec_gru1_recurrent_weights_int8",WEIGHTS_dec_gru1_recurrent_weights_int8_TYPE,sizeof(dec_gru1_recurrent_weights_int8),dec_gru1_recurrent_weights_int8},
#endif #endif
#ifdef WEIGHTS_dec_gru1_recurrent_weights_float_DEFINED #ifdef WEIGHTS_dec_gru1_recurrent_weights_float_DEFINED
{"dec_gru1_recurrent_weights_float", WEIGHTS_dec_gru1_recurrent_weights_float_TYPE,sizeof(dec_gru1_recurrent_weights_float),dec_gru1_recurrent_weights_float}, {"dec_gru1_recurrent_weights_float",WEIGHTS_dec_gru1_recurrent_weights_float_TYPE,sizeof(dec_gru1_recurrent_weights_float),dec_gru1_recurrent_weights_float},
#endif #endif
#ifdef WEIGHTS_dec_gru1_recurrent_subias_DEFINED #ifdef WEIGHTS_dec_gru1_recurrent_subias_DEFINED
{"dec_gru1_recurrent_subias", WEIGHTS_dec_gru1_recurrent_subias_TYPE,sizeof(dec_gru1_recurrent_subias),dec_gru1_recurrent_subias}, {"dec_gru1_recurrent_subias",WEIGHTS_dec_gru1_recurrent_subias_TYPE,sizeof(dec_gru1_recurrent_subias),dec_gru1_recurrent_subias},
#endif #endif
#ifdef WEIGHTS_dec_gru1_recurrent_scale_DEFINED #ifdef WEIGHTS_dec_gru1_recurrent_scale_DEFINED
{"dec_gru1_recurrent_scale", WEIGHTS_dec_gru1_recurrent_scale_TYPE,sizeof(dec_gru1_recurrent_scale),dec_gru1_recurrent_scale}, {"dec_gru1_recurrent_scale",WEIGHTS_dec_gru1_recurrent_scale_TYPE,sizeof(dec_gru1_recurrent_scale),dec_gru1_recurrent_scale},
#endif #endif
#ifdef WEIGHTS_dec_gru1_recurrent_bias_DEFINED #ifdef WEIGHTS_dec_gru1_recurrent_bias_DEFINED
{"dec_gru1_recurrent_bias", WEIGHTS_dec_gru1_recurrent_bias_TYPE,sizeof(dec_gru1_recurrent_bias),dec_gru1_recurrent_bias}, {"dec_gru1_recurrent_bias",WEIGHTS_dec_gru1_recurrent_bias_TYPE,sizeof(dec_gru1_recurrent_bias),dec_gru1_recurrent_bias},
#endif #endif
#ifdef WEIGHTS_dec_gru2_input_weights_int8_DEFINED #ifdef WEIGHTS_dec_gru2_input_weights_int8_DEFINED
{"dec_gru2_input_weights_int8", WEIGHTS_dec_gru2_input_weights_int8_TYPE,sizeof(dec_gru2_input_weights_int8),dec_gru2_input_weights_int8}, {"dec_gru2_input_weights_int8",WEIGHTS_dec_gru2_input_weights_int8_TYPE,sizeof(dec_gru2_input_weights_int8),dec_gru2_input_weights_int8},
#endif #endif
#ifdef WEIGHTS_dec_gru2_input_weights_float_DEFINED #ifdef WEIGHTS_dec_gru2_input_weights_float_DEFINED
{"dec_gru2_input_weights_float", WEIGHTS_dec_gru2_input_weights_float_TYPE,sizeof(dec_gru2_input_weights_float),dec_gru2_input_weights_float}, {"dec_gru2_input_weights_float",WEIGHTS_dec_gru2_input_weights_float_TYPE,sizeof(dec_gru2_input_weights_float),dec_gru2_input_weights_float},
#endif #endif
#ifdef WEIGHTS_dec_gru2_input_weights_idx_DEFINED #ifdef WEIGHTS_dec_gru2_input_weights_idx_DEFINED
{"dec_gru2_input_weights_idx", WEIGHTS_dec_gru2_input_weights_idx_TYPE,sizeof(dec_gru2_input_weights_idx),dec_gru2_input_weights_idx}, {"dec_gru2_input_weights_idx",WEIGHTS_dec_gru2_input_weights_idx_TYPE,sizeof(dec_gru2_input_weights_idx),dec_gru2_input_weights_idx},
#endif #endif
#ifdef WEIGHTS_dec_gru2_input_subias_DEFINED #ifdef WEIGHTS_dec_gru2_input_subias_DEFINED
{"dec_gru2_input_subias", WEIGHTS_dec_gru2_input_subias_TYPE,sizeof(dec_gru2_input_subias),dec_gru2_input_subias}, {"dec_gru2_input_subias",WEIGHTS_dec_gru2_input_subias_TYPE,sizeof(dec_gru2_input_subias),dec_gru2_input_subias},
#endif #endif
#ifdef WEIGHTS_dec_gru2_input_scale_DEFINED #ifdef WEIGHTS_dec_gru2_input_scale_DEFINED
{"dec_gru2_input_scale", WEIGHTS_dec_gru2_input_scale_TYPE,sizeof(dec_gru2_input_scale),dec_gru2_input_scale}, {"dec_gru2_input_scale",WEIGHTS_dec_gru2_input_scale_TYPE,sizeof(dec_gru2_input_scale),dec_gru2_input_scale},
#endif #endif
#ifdef WEIGHTS_dec_gru2_input_bias_DEFINED #ifdef WEIGHTS_dec_gru2_input_bias_DEFINED
{"dec_gru2_input_bias", WEIGHTS_dec_gru2_input_bias_TYPE,sizeof(dec_gru2_input_bias),dec_gru2_input_bias}, {"dec_gru2_input_bias",WEIGHTS_dec_gru2_input_bias_TYPE,sizeof(dec_gru2_input_bias),dec_gru2_input_bias},
#endif #endif
#ifdef WEIGHTS_dec_gru2_recurrent_weights_int8_DEFINED #ifdef WEIGHTS_dec_gru2_recurrent_weights_int8_DEFINED
{"dec_gru2_recurrent_weights_int8", WEIGHTS_dec_gru2_recurrent_weights_int8_TYPE,sizeof(dec_gru2_recurrent_weights_int8),dec_gru2_recurrent_weights_int8}, {"dec_gru2_recurrent_weights_int8",WEIGHTS_dec_gru2_recurrent_weights_int8_TYPE,sizeof(dec_gru2_recurrent_weights_int8),dec_gru2_recurrent_weights_int8},
#endif #endif
#ifdef WEIGHTS_dec_gru2_recurrent_weights_float_DEFINED #ifdef WEIGHTS_dec_gru2_recurrent_weights_float_DEFINED
{"dec_gru2_recurrent_weights_float", WEIGHTS_dec_gru2_recurrent_weights_float_TYPE,sizeof(dec_gru2_recurrent_weights_float),dec_gru2_recurrent_weights_float}, {"dec_gru2_recurrent_weights_float",WEIGHTS_dec_gru2_recurrent_weights_float_TYPE,sizeof(dec_gru2_recurrent_weights_float),dec_gru2_recurrent_weights_float},
#endif #endif
#ifdef WEIGHTS_dec_gru2_recurrent_subias_DEFINED #ifdef WEIGHTS_dec_gru2_recurrent_subias_DEFINED
{"dec_gru2_recurrent_subias", WEIGHTS_dec_gru2_recurrent_subias_TYPE,sizeof(dec_gru2_recurrent_subias),dec_gru2_recurrent_subias}, {"dec_gru2_recurrent_subias",WEIGHTS_dec_gru2_recurrent_subias_TYPE,sizeof(dec_gru2_recurrent_subias),dec_gru2_recurrent_subias},
#endif #endif
#ifdef WEIGHTS_dec_gru2_recurrent_scale_DEFINED #ifdef WEIGHTS_dec_gru2_recurrent_scale_DEFINED
{"dec_gru2_recurrent_scale", WEIGHTS_dec_gru2_recurrent_scale_TYPE,sizeof(dec_gru2_recurrent_scale),dec_gru2_recurrent_scale}, {"dec_gru2_recurrent_scale",WEIGHTS_dec_gru2_recurrent_scale_TYPE,sizeof(dec_gru2_recurrent_scale),dec_gru2_recurrent_scale},
#endif #endif
#ifdef WEIGHTS_dec_gru2_recurrent_bias_DEFINED #ifdef WEIGHTS_dec_gru2_recurrent_bias_DEFINED
{"dec_gru2_recurrent_bias", WEIGHTS_dec_gru2_recurrent_bias_TYPE,sizeof(dec_gru2_recurrent_bias),dec_gru2_recurrent_bias}, {"dec_gru2_recurrent_bias",WEIGHTS_dec_gru2_recurrent_bias_TYPE,sizeof(dec_gru2_recurrent_bias),dec_gru2_recurrent_bias},
#endif #endif
#ifdef WEIGHTS_dec_gru3_input_weights_int8_DEFINED #ifdef WEIGHTS_dec_gru3_input_weights_int8_DEFINED
{"dec_gru3_input_weights_int8", WEIGHTS_dec_gru3_input_weights_int8_TYPE,sizeof(dec_gru3_input_weights_int8),dec_gru3_input_weights_int8}, {"dec_gru3_input_weights_int8",WEIGHTS_dec_gru3_input_weights_int8_TYPE,sizeof(dec_gru3_input_weights_int8),dec_gru3_input_weights_int8},
#endif #endif
#ifdef WEIGHTS_dec_gru3_input_weights_float_DEFINED #ifdef WEIGHTS_dec_gru3_input_weights_float_DEFINED
{"dec_gru3_input_weights_float", WEIGHTS_dec_gru3_input_weights_float_TYPE,sizeof(dec_gru3_input_weights_float),dec_gru3_input_weights_float}, {"dec_gru3_input_weights_float",WEIGHTS_dec_gru3_input_weights_float_TYPE,sizeof(dec_gru3_input_weights_float),dec_gru3_input_weights_float},
#endif #endif
#ifdef WEIGHTS_dec_gru3_input_weights_idx_DEFINED #ifdef WEIGHTS_dec_gru3_input_weights_idx_DEFINED
{"dec_gru3_input_weights_idx", WEIGHTS_dec_gru3_input_weights_idx_TYPE,sizeof(dec_gru3_input_weights_idx),dec_gru3_input_weights_idx}, {"dec_gru3_input_weights_idx",WEIGHTS_dec_gru3_input_weights_idx_TYPE,sizeof(dec_gru3_input_weights_idx),dec_gru3_input_weights_idx},
#endif #endif
#ifdef WEIGHTS_dec_gru3_input_subias_DEFINED #ifdef WEIGHTS_dec_gru3_input_subias_DEFINED
{"dec_gru3_input_subias", WEIGHTS_dec_gru3_input_subias_TYPE,sizeof(dec_gru3_input_subias),dec_gru3_input_subias}, {"dec_gru3_input_subias",WEIGHTS_dec_gru3_input_subias_TYPE,sizeof(dec_gru3_input_subias),dec_gru3_input_subias},
#endif #endif
#ifdef WEIGHTS_dec_gru3_input_scale_DEFINED #ifdef WEIGHTS_dec_gru3_input_scale_DEFINED
{"dec_gru3_input_scale", WEIGHTS_dec_gru3_input_scale_TYPE,sizeof(dec_gru3_input_scale),dec_gru3_input_scale}, {"dec_gru3_input_scale",WEIGHTS_dec_gru3_input_scale_TYPE,sizeof(dec_gru3_input_scale),dec_gru3_input_scale},
#endif #endif
#ifdef WEIGHTS_dec_gru3_input_bias_DEFINED #ifdef WEIGHTS_dec_gru3_input_bias_DEFINED
{"dec_gru3_input_bias", WEIGHTS_dec_gru3_input_bias_TYPE,sizeof(dec_gru3_input_bias),dec_gru3_input_bias}, {"dec_gru3_input_bias",WEIGHTS_dec_gru3_input_bias_TYPE,sizeof(dec_gru3_input_bias),dec_gru3_input_bias},
#endif #endif
#ifdef WEIGHTS_dec_gru3_recurrent_weights_int8_DEFINED #ifdef WEIGHTS_dec_gru3_recurrent_weights_int8_DEFINED
{"dec_gru3_recurrent_weights_int8", WEIGHTS_dec_gru3_recurrent_weights_int8_TYPE,sizeof(dec_gru3_recurrent_weights_int8),dec_gru3_recurrent_weights_int8}, {"dec_gru3_recurrent_weights_int8",WEIGHTS_dec_gru3_recurrent_weights_int8_TYPE,sizeof(dec_gru3_recurrent_weights_int8),dec_gru3_recurrent_weights_int8},
#endif #endif
#ifdef WEIGHTS_dec_gru3_recurrent_weights_float_DEFINED #ifdef WEIGHTS_dec_gru3_recurrent_weights_float_DEFINED
{"dec_gru3_recurrent_weights_float", WEIGHTS_dec_gru3_recurrent_weights_float_TYPE,sizeof(dec_gru3_recurrent_weights_float),dec_gru3_recurrent_weights_float}, {"dec_gru3_recurrent_weights_float",WEIGHTS_dec_gru3_recurrent_weights_float_TYPE,sizeof(dec_gru3_recurrent_weights_float),dec_gru3_recurrent_weights_float},
#endif #endif
#ifdef WEIGHTS_dec_gru3_recurrent_subias_DEFINED #ifdef WEIGHTS_dec_gru3_recurrent_subias_DEFINED
{"dec_gru3_recurrent_subias", WEIGHTS_dec_gru3_recurrent_subias_TYPE,sizeof(dec_gru3_recurrent_subias),dec_gru3_recurrent_subias}, {"dec_gru3_recurrent_subias",WEIGHTS_dec_gru3_recurrent_subias_TYPE,sizeof(dec_gru3_recurrent_subias),dec_gru3_recurrent_subias},
#endif #endif
#ifdef WEIGHTS_dec_gru3_recurrent_scale_DEFINED #ifdef WEIGHTS_dec_gru3_recurrent_scale_DEFINED
{"dec_gru3_recurrent_scale", WEIGHTS_dec_gru3_recurrent_scale_TYPE,sizeof(dec_gru3_recurrent_scale),dec_gru3_recurrent_scale}, {"dec_gru3_recurrent_scale",WEIGHTS_dec_gru3_recurrent_scale_TYPE,sizeof(dec_gru3_recurrent_scale),dec_gru3_recurrent_scale},
#endif #endif
#ifdef WEIGHTS_dec_gru3_recurrent_bias_DEFINED #ifdef WEIGHTS_dec_gru3_recurrent_bias_DEFINED
{"dec_gru3_recurrent_bias", WEIGHTS_dec_gru3_recurrent_bias_TYPE,sizeof(dec_gru3_recurrent_bias),dec_gru3_recurrent_bias}, {"dec_gru3_recurrent_bias",WEIGHTS_dec_gru3_recurrent_bias_TYPE,sizeof(dec_gru3_recurrent_bias),dec_gru3_recurrent_bias},
#endif #endif
#ifdef WEIGHTS_dec_gru4_input_weights_int8_DEFINED #ifdef WEIGHTS_dec_gru4_input_weights_int8_DEFINED
{"dec_gru4_input_weights_int8", WEIGHTS_dec_gru4_input_weights_int8_TYPE,sizeof(dec_gru4_input_weights_int8),dec_gru4_input_weights_int8}, {"dec_gru4_input_weights_int8",WEIGHTS_dec_gru4_input_weights_int8_TYPE,sizeof(dec_gru4_input_weights_int8),dec_gru4_input_weights_int8},
#endif #endif
#ifdef WEIGHTS_dec_gru4_input_weights_float_DEFINED #ifdef WEIGHTS_dec_gru4_input_weights_float_DEFINED
{"dec_gru4_input_weights_float", WEIGHTS_dec_gru4_input_weights_float_TYPE,sizeof(dec_gru4_input_weights_float),dec_gru4_input_weights_float}, {"dec_gru4_input_weights_float",WEIGHTS_dec_gru4_input_weights_float_TYPE,sizeof(dec_gru4_input_weights_float),dec_gru4_input_weights_float},
#endif #endif
#ifdef WEIGHTS_dec_gru4_input_weights_idx_DEFINED #ifdef WEIGHTS_dec_gru4_input_weights_idx_DEFINED
{"dec_gru4_input_weights_idx", WEIGHTS_dec_gru4_input_weights_idx_TYPE,sizeof(dec_gru4_input_weights_idx),dec_gru4_input_weights_idx}, {"dec_gru4_input_weights_idx",WEIGHTS_dec_gru4_input_weights_idx_TYPE,sizeof(dec_gru4_input_weights_idx),dec_gru4_input_weights_idx},
#endif #endif
#ifdef WEIGHTS_dec_gru4_input_subias_DEFINED #ifdef WEIGHTS_dec_gru4_input_subias_DEFINED
{"dec_gru4_input_subias", WEIGHTS_dec_gru4_input_subias_TYPE,sizeof(dec_gru4_input_subias),dec_gru4_input_subias}, {"dec_gru4_input_subias",WEIGHTS_dec_gru4_input_subias_TYPE,sizeof(dec_gru4_input_subias),dec_gru4_input_subias},
#endif #endif
#ifdef WEIGHTS_dec_gru4_input_scale_DEFINED #ifdef WEIGHTS_dec_gru4_input_scale_DEFINED
{"dec_gru4_input_scale", WEIGHTS_dec_gru4_input_scale_TYPE,sizeof(dec_gru4_input_scale),dec_gru4_input_scale}, {"dec_gru4_input_scale",WEIGHTS_dec_gru4_input_scale_TYPE,sizeof(dec_gru4_input_scale),dec_gru4_input_scale},
#endif #endif
#ifdef WEIGHTS_dec_gru4_input_bias_DEFINED #ifdef WEIGHTS_dec_gru4_input_bias_DEFINED
{"dec_gru4_input_bias", WEIGHTS_dec_gru4_input_bias_TYPE,sizeof(dec_gru4_input_bias),dec_gru4_input_bias}, {"dec_gru4_input_bias",WEIGHTS_dec_gru4_input_bias_TYPE,sizeof(dec_gru4_input_bias),dec_gru4_input_bias},
#endif #endif
#ifdef WEIGHTS_dec_gru4_recurrent_weights_int8_DEFINED #ifdef WEIGHTS_dec_gru4_recurrent_weights_int8_DEFINED
{"dec_gru4_recurrent_weights_int8", WEIGHTS_dec_gru4_recurrent_weights_int8_TYPE,sizeof(dec_gru4_recurrent_weights_int8),dec_gru4_recurrent_weights_int8}, {"dec_gru4_recurrent_weights_int8",WEIGHTS_dec_gru4_recurrent_weights_int8_TYPE,sizeof(dec_gru4_recurrent_weights_int8),dec_gru4_recurrent_weights_int8},
#endif #endif
#ifdef WEIGHTS_dec_gru4_recurrent_weights_float_DEFINED #ifdef WEIGHTS_dec_gru4_recurrent_weights_float_DEFINED
{"dec_gru4_recurrent_weights_float", WEIGHTS_dec_gru4_recurrent_weights_float_TYPE,sizeof(dec_gru4_recurrent_weights_float),dec_gru4_recurrent_weights_float}, {"dec_gru4_recurrent_weights_float",WEIGHTS_dec_gru4_recurrent_weights_float_TYPE,sizeof(dec_gru4_recurrent_weights_float),dec_gru4_recurrent_weights_float},
#endif #endif
#ifdef WEIGHTS_dec_gru4_recurrent_subias_DEFINED #ifdef WEIGHTS_dec_gru4_recurrent_subias_DEFINED
{"dec_gru4_recurrent_subias", WEIGHTS_dec_gru4_recurrent_subias_TYPE,sizeof(dec_gru4_recurrent_subias),dec_gru4_recurrent_subias}, {"dec_gru4_recurrent_subias",WEIGHTS_dec_gru4_recurrent_subias_TYPE,sizeof(dec_gru4_recurrent_subias),dec_gru4_recurrent_subias},
#endif #endif
#ifdef WEIGHTS_dec_gru4_recurrent_scale_DEFINED #ifdef WEIGHTS_dec_gru4_recurrent_scale_DEFINED
{"dec_gru4_recurrent_scale", WEIGHTS_dec_gru4_recurrent_scale_TYPE,sizeof(dec_gru4_recurrent_scale),dec_gru4_recurrent_scale}, {"dec_gru4_recurrent_scale",WEIGHTS_dec_gru4_recurrent_scale_TYPE,sizeof(dec_gru4_recurrent_scale),dec_gru4_recurrent_scale},
#endif #endif
#ifdef WEIGHTS_dec_gru4_recurrent_bias_DEFINED #ifdef WEIGHTS_dec_gru4_recurrent_bias_DEFINED
{"dec_gru4_recurrent_bias", WEIGHTS_dec_gru4_recurrent_bias_TYPE,sizeof(dec_gru4_recurrent_bias),dec_gru4_recurrent_bias}, {"dec_gru4_recurrent_bias",WEIGHTS_dec_gru4_recurrent_bias_TYPE,sizeof(dec_gru4_recurrent_bias),dec_gru4_recurrent_bias},
#endif #endif
#ifdef WEIGHTS_dec_gru5_input_weights_int8_DEFINED #ifdef WEIGHTS_dec_gru5_input_weights_int8_DEFINED
{"dec_gru5_input_weights_int8", WEIGHTS_dec_gru5_input_weights_int8_TYPE,sizeof(dec_gru5_input_weights_int8),dec_gru5_input_weights_int8}, {"dec_gru5_input_weights_int8",WEIGHTS_dec_gru5_input_weights_int8_TYPE,sizeof(dec_gru5_input_weights_int8),dec_gru5_input_weights_int8},
#endif #endif
#ifdef WEIGHTS_dec_gru5_input_weights_float_DEFINED #ifdef WEIGHTS_dec_gru5_input_weights_float_DEFINED
{"dec_gru5_input_weights_float", WEIGHTS_dec_gru5_input_weights_float_TYPE,sizeof(dec_gru5_input_weights_float),dec_gru5_input_weights_float}, {"dec_gru5_input_weights_float",WEIGHTS_dec_gru5_input_weights_float_TYPE,sizeof(dec_gru5_input_weights_float),dec_gru5_input_weights_float},
#endif #endif
#ifdef WEIGHTS_dec_gru5_input_weights_idx_DEFINED #ifdef WEIGHTS_dec_gru5_input_weights_idx_DEFINED
{"dec_gru5_input_weights_idx", WEIGHTS_dec_gru5_input_weights_idx_TYPE,sizeof(dec_gru5_input_weights_idx),dec_gru5_input_weights_idx}, {"dec_gru5_input_weights_idx",WEIGHTS_dec_gru5_input_weights_idx_TYPE,sizeof(dec_gru5_input_weights_idx),dec_gru5_input_weights_idx},
#endif #endif
#ifdef WEIGHTS_dec_gru5_input_subias_DEFINED #ifdef WEIGHTS_dec_gru5_input_subias_DEFINED
{"dec_gru5_input_subias", WEIGHTS_dec_gru5_input_subias_TYPE,sizeof(dec_gru5_input_subias),dec_gru5_input_subias}, {"dec_gru5_input_subias",WEIGHTS_dec_gru5_input_subias_TYPE,sizeof(dec_gru5_input_subias),dec_gru5_input_subias},
#endif #endif
#ifdef WEIGHTS_dec_gru5_input_scale_DEFINED #ifdef WEIGHTS_dec_gru5_input_scale_DEFINED
{"dec_gru5_input_scale", WEIGHTS_dec_gru5_input_scale_TYPE,sizeof(dec_gru5_input_scale),dec_gru5_input_scale}, {"dec_gru5_input_scale",WEIGHTS_dec_gru5_input_scale_TYPE,sizeof(dec_gru5_input_scale),dec_gru5_input_scale},
#endif #endif
#ifdef WEIGHTS_dec_gru5_input_bias_DEFINED #ifdef WEIGHTS_dec_gru5_input_bias_DEFINED
{"dec_gru5_input_bias", WEIGHTS_dec_gru5_input_bias_TYPE,sizeof(dec_gru5_input_bias),dec_gru5_input_bias}, {"dec_gru5_input_bias",WEIGHTS_dec_gru5_input_bias_TYPE,sizeof(dec_gru5_input_bias),dec_gru5_input_bias},
#endif #endif
#ifdef WEIGHTS_dec_gru5_recurrent_weights_int8_DEFINED #ifdef WEIGHTS_dec_gru5_recurrent_weights_int8_DEFINED
{"dec_gru5_recurrent_weights_int8", WEIGHTS_dec_gru5_recurrent_weights_int8_TYPE,sizeof(dec_gru5_recurrent_weights_int8),dec_gru5_recurrent_weights_int8}, {"dec_gru5_recurrent_weights_int8",WEIGHTS_dec_gru5_recurrent_weights_int8_TYPE,sizeof(dec_gru5_recurrent_weights_int8),dec_gru5_recurrent_weights_int8},
#endif #endif
#ifdef WEIGHTS_dec_gru5_recurrent_weights_float_DEFINED #ifdef WEIGHTS_dec_gru5_recurrent_weights_float_DEFINED
{"dec_gru5_recurrent_weights_float", WEIGHTS_dec_gru5_recurrent_weights_float_TYPE,sizeof(dec_gru5_recurrent_weights_float),dec_gru5_recurrent_weights_float}, {"dec_gru5_recurrent_weights_float",WEIGHTS_dec_gru5_recurrent_weights_float_TYPE,sizeof(dec_gru5_recurrent_weights_float),dec_gru5_recurrent_weights_float},
#endif #endif
#ifdef WEIGHTS_dec_gru5_recurrent_subias_DEFINED #ifdef WEIGHTS_dec_gru5_recurrent_subias_DEFINED
{"dec_gru5_recurrent_subias", WEIGHTS_dec_gru5_recurrent_subias_TYPE,sizeof(dec_gru5_recurrent_subias),dec_gru5_recurrent_subias}, {"dec_gru5_recurrent_subias",WEIGHTS_dec_gru5_recurrent_subias_TYPE,sizeof(dec_gru5_recurrent_subias),dec_gru5_recurrent_subias},
#endif #endif
#ifdef WEIGHTS_dec_gru5_recurrent_scale_DEFINED #ifdef WEIGHTS_dec_gru5_recurrent_scale_DEFINED
{"dec_gru5_recurrent_scale", WEIGHTS_dec_gru5_recurrent_scale_TYPE,sizeof(dec_gru5_recurrent_scale),dec_gru5_recurrent_scale}, {"dec_gru5_recurrent_scale",WEIGHTS_dec_gru5_recurrent_scale_TYPE,sizeof(dec_gru5_recurrent_scale),dec_gru5_recurrent_scale},
#endif #endif
#ifdef WEIGHTS_dec_gru5_recurrent_bias_DEFINED #ifdef WEIGHTS_dec_gru5_recurrent_bias_DEFINED
{"dec_gru5_recurrent_bias", WEIGHTS_dec_gru5_recurrent_bias_TYPE,sizeof(dec_gru5_recurrent_bias),dec_gru5_recurrent_bias}, {"dec_gru5_recurrent_bias",WEIGHTS_dec_gru5_recurrent_bias_TYPE,sizeof(dec_gru5_recurrent_bias),dec_gru5_recurrent_bias},
#endif #endif
#ifdef WEIGHTS_dec_conv1_weights_int8_DEFINED #ifdef WEIGHTS_dec_conv1_weights_int8_DEFINED
{"dec_conv1_weights_int8", WEIGHTS_dec_conv1_weights_int8_TYPE,sizeof(dec_conv1_weights_int8),dec_conv1_weights_int8}, {"dec_conv1_weights_int8",WEIGHTS_dec_conv1_weights_int8_TYPE,sizeof(dec_conv1_weights_int8),dec_conv1_weights_int8},
#endif #endif
#ifdef WEIGHTS_dec_conv1_weights_float_DEFINED #ifdef WEIGHTS_dec_conv1_weights_float_DEFINED
{"dec_conv1_weights_float", WEIGHTS_dec_conv1_weights_float_TYPE,sizeof(dec_conv1_weights_float),dec_conv1_weights_float}, {"dec_conv1_weights_float",WEIGHTS_dec_conv1_weights_float_TYPE,sizeof(dec_conv1_weights_float),dec_conv1_weights_float},
#endif #endif
#ifdef WEIGHTS_dec_conv1_subias_DEFINED #ifdef WEIGHTS_dec_conv1_subias_DEFINED
{"dec_conv1_subias", WEIGHTS_dec_conv1_subias_TYPE,sizeof(dec_conv1_subias),dec_conv1_subias}, {"dec_conv1_subias",WEIGHTS_dec_conv1_subias_TYPE,sizeof(dec_conv1_subias),dec_conv1_subias},
#endif #endif
#ifdef WEIGHTS_dec_conv1_scale_DEFINED #ifdef WEIGHTS_dec_conv1_scale_DEFINED
{"dec_conv1_scale", WEIGHTS_dec_conv1_scale_TYPE,sizeof(dec_conv1_scale),dec_conv1_scale}, {"dec_conv1_scale",WEIGHTS_dec_conv1_scale_TYPE,sizeof(dec_conv1_scale),dec_conv1_scale},
#endif #endif
#ifdef WEIGHTS_dec_conv1_bias_DEFINED #ifdef WEIGHTS_dec_conv1_bias_DEFINED
{"dec_conv1_bias", WEIGHTS_dec_conv1_bias_TYPE,sizeof(dec_conv1_bias),dec_conv1_bias}, {"dec_conv1_bias",WEIGHTS_dec_conv1_bias_TYPE,sizeof(dec_conv1_bias),dec_conv1_bias},
#endif #endif
#ifdef WEIGHTS_dec_conv2_weights_int8_DEFINED #ifdef WEIGHTS_dec_conv2_weights_int8_DEFINED
{"dec_conv2_weights_int8", WEIGHTS_dec_conv2_weights_int8_TYPE,sizeof(dec_conv2_weights_int8),dec_conv2_weights_int8}, {"dec_conv2_weights_int8",WEIGHTS_dec_conv2_weights_int8_TYPE,sizeof(dec_conv2_weights_int8),dec_conv2_weights_int8},
#endif #endif
#ifdef WEIGHTS_dec_conv2_weights_float_DEFINED #ifdef WEIGHTS_dec_conv2_weights_float_DEFINED
{"dec_conv2_weights_float", WEIGHTS_dec_conv2_weights_float_TYPE,sizeof(dec_conv2_weights_float),dec_conv2_weights_float}, {"dec_conv2_weights_float",WEIGHTS_dec_conv2_weights_float_TYPE,sizeof(dec_conv2_weights_float),dec_conv2_weights_float},
#endif #endif
#ifdef WEIGHTS_dec_conv2_subias_DEFINED #ifdef WEIGHTS_dec_conv2_subias_DEFINED
{"dec_conv2_subias", WEIGHTS_dec_conv2_subias_TYPE,sizeof(dec_conv2_subias),dec_conv2_subias}, {"dec_conv2_subias",WEIGHTS_dec_conv2_subias_TYPE,sizeof(dec_conv2_subias),dec_conv2_subias},
#endif #endif
#ifdef WEIGHTS_dec_conv2_scale_DEFINED #ifdef WEIGHTS_dec_conv2_scale_DEFINED
{"dec_conv2_scale", WEIGHTS_dec_conv2_scale_TYPE,sizeof(dec_conv2_scale),dec_conv2_scale}, {"dec_conv2_scale",WEIGHTS_dec_conv2_scale_TYPE,sizeof(dec_conv2_scale),dec_conv2_scale},
#endif #endif
#ifdef WEIGHTS_dec_conv2_bias_DEFINED #ifdef WEIGHTS_dec_conv2_bias_DEFINED
{"dec_conv2_bias", WEIGHTS_dec_conv2_bias_TYPE,sizeof(dec_conv2_bias),dec_conv2_bias}, {"dec_conv2_bias",WEIGHTS_dec_conv2_bias_TYPE,sizeof(dec_conv2_bias),dec_conv2_bias},
#endif #endif
#ifdef WEIGHTS_dec_conv3_weights_int8_DEFINED #ifdef WEIGHTS_dec_conv3_weights_int8_DEFINED
{"dec_conv3_weights_int8", WEIGHTS_dec_conv3_weights_int8_TYPE,sizeof(dec_conv3_weights_int8),dec_conv3_weights_int8}, {"dec_conv3_weights_int8",WEIGHTS_dec_conv3_weights_int8_TYPE,sizeof(dec_conv3_weights_int8),dec_conv3_weights_int8},
#endif #endif
#ifdef WEIGHTS_dec_conv3_weights_float_DEFINED #ifdef WEIGHTS_dec_conv3_weights_float_DEFINED
{"dec_conv3_weights_float", WEIGHTS_dec_conv3_weights_float_TYPE,sizeof(dec_conv3_weights_float),dec_conv3_weights_float}, {"dec_conv3_weights_float",WEIGHTS_dec_conv3_weights_float_TYPE,sizeof(dec_conv3_weights_float),dec_conv3_weights_float},
#endif #endif
#ifdef WEIGHTS_dec_conv3_subias_DEFINED #ifdef WEIGHTS_dec_conv3_subias_DEFINED
{"dec_conv3_subias", WEIGHTS_dec_conv3_subias_TYPE,sizeof(dec_conv3_subias),dec_conv3_subias}, {"dec_conv3_subias",WEIGHTS_dec_conv3_subias_TYPE,sizeof(dec_conv3_subias),dec_conv3_subias},
#endif #endif
#ifdef WEIGHTS_dec_conv3_scale_DEFINED #ifdef WEIGHTS_dec_conv3_scale_DEFINED
{"dec_conv3_scale", WEIGHTS_dec_conv3_scale_TYPE,sizeof(dec_conv3_scale),dec_conv3_scale}, {"dec_conv3_scale",WEIGHTS_dec_conv3_scale_TYPE,sizeof(dec_conv3_scale),dec_conv3_scale},
#endif #endif
#ifdef WEIGHTS_dec_conv3_bias_DEFINED #ifdef WEIGHTS_dec_conv3_bias_DEFINED
{"dec_conv3_bias", WEIGHTS_dec_conv3_bias_TYPE,sizeof(dec_conv3_bias),dec_conv3_bias}, {"dec_conv3_bias",WEIGHTS_dec_conv3_bias_TYPE,sizeof(dec_conv3_bias),dec_conv3_bias},
#endif #endif
#ifdef WEIGHTS_dec_conv4_weights_int8_DEFINED #ifdef WEIGHTS_dec_conv4_weights_int8_DEFINED
{"dec_conv4_weights_int8", WEIGHTS_dec_conv4_weights_int8_TYPE,sizeof(dec_conv4_weights_int8),dec_conv4_weights_int8}, {"dec_conv4_weights_int8",WEIGHTS_dec_conv4_weights_int8_TYPE,sizeof(dec_conv4_weights_int8),dec_conv4_weights_int8},
#endif #endif
#ifdef WEIGHTS_dec_conv4_weights_float_DEFINED #ifdef WEIGHTS_dec_conv4_weights_float_DEFINED
{"dec_conv4_weights_float", WEIGHTS_dec_conv4_weights_float_TYPE,sizeof(dec_conv4_weights_float),dec_conv4_weights_float}, {"dec_conv4_weights_float",WEIGHTS_dec_conv4_weights_float_TYPE,sizeof(dec_conv4_weights_float),dec_conv4_weights_float},
#endif #endif
#ifdef WEIGHTS_dec_conv4_subias_DEFINED #ifdef WEIGHTS_dec_conv4_subias_DEFINED
{"dec_conv4_subias", WEIGHTS_dec_conv4_subias_TYPE,sizeof(dec_conv4_subias),dec_conv4_subias}, {"dec_conv4_subias",WEIGHTS_dec_conv4_subias_TYPE,sizeof(dec_conv4_subias),dec_conv4_subias},
#endif #endif
#ifdef WEIGHTS_dec_conv4_scale_DEFINED #ifdef WEIGHTS_dec_conv4_scale_DEFINED
{"dec_conv4_scale", WEIGHTS_dec_conv4_scale_TYPE,sizeof(dec_conv4_scale),dec_conv4_scale}, {"dec_conv4_scale",WEIGHTS_dec_conv4_scale_TYPE,sizeof(dec_conv4_scale),dec_conv4_scale},
#endif #endif
#ifdef WEIGHTS_dec_conv4_bias_DEFINED #ifdef WEIGHTS_dec_conv4_bias_DEFINED
{"dec_conv4_bias", WEIGHTS_dec_conv4_bias_TYPE,sizeof(dec_conv4_bias),dec_conv4_bias}, {"dec_conv4_bias",WEIGHTS_dec_conv4_bias_TYPE,sizeof(dec_conv4_bias),dec_conv4_bias},
#endif #endif
#ifdef WEIGHTS_dec_conv5_weights_int8_DEFINED #ifdef WEIGHTS_dec_conv5_weights_int8_DEFINED
{"dec_conv5_weights_int8", WEIGHTS_dec_conv5_weights_int8_TYPE,sizeof(dec_conv5_weights_int8),dec_conv5_weights_int8}, {"dec_conv5_weights_int8",WEIGHTS_dec_conv5_weights_int8_TYPE,sizeof(dec_conv5_weights_int8),dec_conv5_weights_int8},
#endif #endif
#ifdef WEIGHTS_dec_conv5_weights_float_DEFINED #ifdef WEIGHTS_dec_conv5_weights_float_DEFINED
{"dec_conv5_weights_float", WEIGHTS_dec_conv5_weights_float_TYPE,sizeof(dec_conv5_weights_float),dec_conv5_weights_float}, {"dec_conv5_weights_float",WEIGHTS_dec_conv5_weights_float_TYPE,sizeof(dec_conv5_weights_float),dec_conv5_weights_float},
#endif #endif
#ifdef WEIGHTS_dec_conv5_subias_DEFINED #ifdef WEIGHTS_dec_conv5_subias_DEFINED
{"dec_conv5_subias", WEIGHTS_dec_conv5_subias_TYPE,sizeof(dec_conv5_subias),dec_conv5_subias}, {"dec_conv5_subias",WEIGHTS_dec_conv5_subias_TYPE,sizeof(dec_conv5_subias),dec_conv5_subias},
#endif #endif
#ifdef WEIGHTS_dec_conv5_scale_DEFINED #ifdef WEIGHTS_dec_conv5_scale_DEFINED
{"dec_conv5_scale", WEIGHTS_dec_conv5_scale_TYPE,sizeof(dec_conv5_scale),dec_conv5_scale}, {"dec_conv5_scale",WEIGHTS_dec_conv5_scale_TYPE,sizeof(dec_conv5_scale),dec_conv5_scale},
#endif #endif
#ifdef WEIGHTS_dec_conv5_bias_DEFINED #ifdef WEIGHTS_dec_conv5_bias_DEFINED
{"dec_conv5_bias", WEIGHTS_dec_conv5_bias_TYPE,sizeof(dec_conv5_bias),dec_conv5_bias}, {"dec_conv5_bias",WEIGHTS_dec_conv5_bias_TYPE,sizeof(dec_conv5_bias),dec_conv5_bias},
#endif #endif
{NULL,0,0,NULL} {NULL,0,0,NULL}
}; };

View File

@ -127942,295 +127942,295 @@ static const float enc_conv5_bias[96] = {
#ifndef USE_WEIGHTS_FILE #ifndef USE_WEIGHTS_FILE
const WeightArray rdovaeenc_arrays[] = { const WeightArray rdovaeenc_arrays[] = {
#ifdef WEIGHTS_enc_dense1_weights_float_DEFINED #ifdef WEIGHTS_enc_dense1_weights_float_DEFINED
{"enc_dense1_weights_float", WEIGHTS_enc_dense1_weights_float_TYPE,sizeof(enc_dense1_weights_float),enc_dense1_weights_float}, {"enc_dense1_weights_float",WEIGHTS_enc_dense1_weights_float_TYPE,sizeof(enc_dense1_weights_float),enc_dense1_weights_float},
#endif #endif
#ifdef WEIGHTS_enc_dense1_bias_DEFINED #ifdef WEIGHTS_enc_dense1_bias_DEFINED
{"enc_dense1_bias", WEIGHTS_enc_dense1_bias_TYPE,sizeof(enc_dense1_bias),enc_dense1_bias}, {"enc_dense1_bias",WEIGHTS_enc_dense1_bias_TYPE,sizeof(enc_dense1_bias),enc_dense1_bias},
#endif #endif
#ifdef WEIGHTS_enc_zdense_weights_int8_DEFINED #ifdef WEIGHTS_enc_zdense_weights_int8_DEFINED
{"enc_zdense_weights_int8", WEIGHTS_enc_zdense_weights_int8_TYPE,sizeof(enc_zdense_weights_int8),enc_zdense_weights_int8}, {"enc_zdense_weights_int8",WEIGHTS_enc_zdense_weights_int8_TYPE,sizeof(enc_zdense_weights_int8),enc_zdense_weights_int8},
#endif #endif
#ifdef WEIGHTS_enc_zdense_weights_float_DEFINED #ifdef WEIGHTS_enc_zdense_weights_float_DEFINED
{"enc_zdense_weights_float", WEIGHTS_enc_zdense_weights_float_TYPE,sizeof(enc_zdense_weights_float),enc_zdense_weights_float}, {"enc_zdense_weights_float",WEIGHTS_enc_zdense_weights_float_TYPE,sizeof(enc_zdense_weights_float),enc_zdense_weights_float},
#endif #endif
#ifdef WEIGHTS_enc_zdense_subias_DEFINED #ifdef WEIGHTS_enc_zdense_subias_DEFINED
{"enc_zdense_subias", WEIGHTS_enc_zdense_subias_TYPE,sizeof(enc_zdense_subias),enc_zdense_subias}, {"enc_zdense_subias",WEIGHTS_enc_zdense_subias_TYPE,sizeof(enc_zdense_subias),enc_zdense_subias},
#endif #endif
#ifdef WEIGHTS_enc_zdense_scale_DEFINED #ifdef WEIGHTS_enc_zdense_scale_DEFINED
{"enc_zdense_scale", WEIGHTS_enc_zdense_scale_TYPE,sizeof(enc_zdense_scale),enc_zdense_scale}, {"enc_zdense_scale",WEIGHTS_enc_zdense_scale_TYPE,sizeof(enc_zdense_scale),enc_zdense_scale},
#endif #endif
#ifdef WEIGHTS_enc_zdense_bias_DEFINED #ifdef WEIGHTS_enc_zdense_bias_DEFINED
{"enc_zdense_bias", WEIGHTS_enc_zdense_bias_TYPE,sizeof(enc_zdense_bias),enc_zdense_bias}, {"enc_zdense_bias",WEIGHTS_enc_zdense_bias_TYPE,sizeof(enc_zdense_bias),enc_zdense_bias},
#endif #endif
#ifdef WEIGHTS_gdense1_weights_int8_DEFINED #ifdef WEIGHTS_gdense1_weights_int8_DEFINED
{"gdense1_weights_int8", WEIGHTS_gdense1_weights_int8_TYPE,sizeof(gdense1_weights_int8),gdense1_weights_int8}, {"gdense1_weights_int8",WEIGHTS_gdense1_weights_int8_TYPE,sizeof(gdense1_weights_int8),gdense1_weights_int8},
#endif #endif
#ifdef WEIGHTS_gdense1_weights_float_DEFINED #ifdef WEIGHTS_gdense1_weights_float_DEFINED
{"gdense1_weights_float", WEIGHTS_gdense1_weights_float_TYPE,sizeof(gdense1_weights_float),gdense1_weights_float}, {"gdense1_weights_float",WEIGHTS_gdense1_weights_float_TYPE,sizeof(gdense1_weights_float),gdense1_weights_float},
#endif #endif
#ifdef WEIGHTS_gdense1_subias_DEFINED #ifdef WEIGHTS_gdense1_subias_DEFINED
{"gdense1_subias", WEIGHTS_gdense1_subias_TYPE,sizeof(gdense1_subias),gdense1_subias}, {"gdense1_subias",WEIGHTS_gdense1_subias_TYPE,sizeof(gdense1_subias),gdense1_subias},
#endif #endif
#ifdef WEIGHTS_gdense1_scale_DEFINED #ifdef WEIGHTS_gdense1_scale_DEFINED
{"gdense1_scale", WEIGHTS_gdense1_scale_TYPE,sizeof(gdense1_scale),gdense1_scale}, {"gdense1_scale",WEIGHTS_gdense1_scale_TYPE,sizeof(gdense1_scale),gdense1_scale},
#endif #endif
#ifdef WEIGHTS_gdense1_bias_DEFINED #ifdef WEIGHTS_gdense1_bias_DEFINED
{"gdense1_bias", WEIGHTS_gdense1_bias_TYPE,sizeof(gdense1_bias),gdense1_bias}, {"gdense1_bias",WEIGHTS_gdense1_bias_TYPE,sizeof(gdense1_bias),gdense1_bias},
#endif #endif
#ifdef WEIGHTS_gdense2_weights_int8_DEFINED #ifdef WEIGHTS_gdense2_weights_int8_DEFINED
{"gdense2_weights_int8", WEIGHTS_gdense2_weights_int8_TYPE,sizeof(gdense2_weights_int8),gdense2_weights_int8}, {"gdense2_weights_int8",WEIGHTS_gdense2_weights_int8_TYPE,sizeof(gdense2_weights_int8),gdense2_weights_int8},
#endif #endif
#ifdef WEIGHTS_gdense2_weights_float_DEFINED #ifdef WEIGHTS_gdense2_weights_float_DEFINED
{"gdense2_weights_float", WEIGHTS_gdense2_weights_float_TYPE,sizeof(gdense2_weights_float),gdense2_weights_float}, {"gdense2_weights_float",WEIGHTS_gdense2_weights_float_TYPE,sizeof(gdense2_weights_float),gdense2_weights_float},
#endif #endif
#ifdef WEIGHTS_gdense2_subias_DEFINED #ifdef WEIGHTS_gdense2_subias_DEFINED
{"gdense2_subias", WEIGHTS_gdense2_subias_TYPE,sizeof(gdense2_subias),gdense2_subias}, {"gdense2_subias",WEIGHTS_gdense2_subias_TYPE,sizeof(gdense2_subias),gdense2_subias},
#endif #endif
#ifdef WEIGHTS_gdense2_scale_DEFINED #ifdef WEIGHTS_gdense2_scale_DEFINED
{"gdense2_scale", WEIGHTS_gdense2_scale_TYPE,sizeof(gdense2_scale),gdense2_scale}, {"gdense2_scale",WEIGHTS_gdense2_scale_TYPE,sizeof(gdense2_scale),gdense2_scale},
#endif #endif
#ifdef WEIGHTS_gdense2_bias_DEFINED #ifdef WEIGHTS_gdense2_bias_DEFINED
{"gdense2_bias", WEIGHTS_gdense2_bias_TYPE,sizeof(gdense2_bias),gdense2_bias}, {"gdense2_bias",WEIGHTS_gdense2_bias_TYPE,sizeof(gdense2_bias),gdense2_bias},
#endif #endif
#ifdef WEIGHTS_enc_gru1_input_weights_int8_DEFINED #ifdef WEIGHTS_enc_gru1_input_weights_int8_DEFINED
{"enc_gru1_input_weights_int8", WEIGHTS_enc_gru1_input_weights_int8_TYPE,sizeof(enc_gru1_input_weights_int8),enc_gru1_input_weights_int8}, {"enc_gru1_input_weights_int8",WEIGHTS_enc_gru1_input_weights_int8_TYPE,sizeof(enc_gru1_input_weights_int8),enc_gru1_input_weights_int8},
#endif #endif
#ifdef WEIGHTS_enc_gru1_input_weights_float_DEFINED #ifdef WEIGHTS_enc_gru1_input_weights_float_DEFINED
{"enc_gru1_input_weights_float", WEIGHTS_enc_gru1_input_weights_float_TYPE,sizeof(enc_gru1_input_weights_float),enc_gru1_input_weights_float}, {"enc_gru1_input_weights_float",WEIGHTS_enc_gru1_input_weights_float_TYPE,sizeof(enc_gru1_input_weights_float),enc_gru1_input_weights_float},
#endif #endif
#ifdef WEIGHTS_enc_gru1_input_weights_idx_DEFINED #ifdef WEIGHTS_enc_gru1_input_weights_idx_DEFINED
{"enc_gru1_input_weights_idx", WEIGHTS_enc_gru1_input_weights_idx_TYPE,sizeof(enc_gru1_input_weights_idx),enc_gru1_input_weights_idx}, {"enc_gru1_input_weights_idx",WEIGHTS_enc_gru1_input_weights_idx_TYPE,sizeof(enc_gru1_input_weights_idx),enc_gru1_input_weights_idx},
#endif #endif
#ifdef WEIGHTS_enc_gru1_input_subias_DEFINED #ifdef WEIGHTS_enc_gru1_input_subias_DEFINED
{"enc_gru1_input_subias", WEIGHTS_enc_gru1_input_subias_TYPE,sizeof(enc_gru1_input_subias),enc_gru1_input_subias}, {"enc_gru1_input_subias",WEIGHTS_enc_gru1_input_subias_TYPE,sizeof(enc_gru1_input_subias),enc_gru1_input_subias},
#endif #endif
#ifdef WEIGHTS_enc_gru1_input_scale_DEFINED #ifdef WEIGHTS_enc_gru1_input_scale_DEFINED
{"enc_gru1_input_scale", WEIGHTS_enc_gru1_input_scale_TYPE,sizeof(enc_gru1_input_scale),enc_gru1_input_scale}, {"enc_gru1_input_scale",WEIGHTS_enc_gru1_input_scale_TYPE,sizeof(enc_gru1_input_scale),enc_gru1_input_scale},
#endif #endif
#ifdef WEIGHTS_enc_gru1_input_bias_DEFINED #ifdef WEIGHTS_enc_gru1_input_bias_DEFINED
{"enc_gru1_input_bias", WEIGHTS_enc_gru1_input_bias_TYPE,sizeof(enc_gru1_input_bias),enc_gru1_input_bias}, {"enc_gru1_input_bias",WEIGHTS_enc_gru1_input_bias_TYPE,sizeof(enc_gru1_input_bias),enc_gru1_input_bias},
#endif #endif
#ifdef WEIGHTS_enc_gru1_recurrent_weights_int8_DEFINED #ifdef WEIGHTS_enc_gru1_recurrent_weights_int8_DEFINED
{"enc_gru1_recurrent_weights_int8", WEIGHTS_enc_gru1_recurrent_weights_int8_TYPE,sizeof(enc_gru1_recurrent_weights_int8),enc_gru1_recurrent_weights_int8}, {"enc_gru1_recurrent_weights_int8",WEIGHTS_enc_gru1_recurrent_weights_int8_TYPE,sizeof(enc_gru1_recurrent_weights_int8),enc_gru1_recurrent_weights_int8},
#endif #endif
#ifdef WEIGHTS_enc_gru1_recurrent_weights_float_DEFINED #ifdef WEIGHTS_enc_gru1_recurrent_weights_float_DEFINED
{"enc_gru1_recurrent_weights_float", WEIGHTS_enc_gru1_recurrent_weights_float_TYPE,sizeof(enc_gru1_recurrent_weights_float),enc_gru1_recurrent_weights_float}, {"enc_gru1_recurrent_weights_float",WEIGHTS_enc_gru1_recurrent_weights_float_TYPE,sizeof(enc_gru1_recurrent_weights_float),enc_gru1_recurrent_weights_float},
#endif #endif
#ifdef WEIGHTS_enc_gru1_recurrent_subias_DEFINED #ifdef WEIGHTS_enc_gru1_recurrent_subias_DEFINED
{"enc_gru1_recurrent_subias", WEIGHTS_enc_gru1_recurrent_subias_TYPE,sizeof(enc_gru1_recurrent_subias),enc_gru1_recurrent_subias}, {"enc_gru1_recurrent_subias",WEIGHTS_enc_gru1_recurrent_subias_TYPE,sizeof(enc_gru1_recurrent_subias),enc_gru1_recurrent_subias},
#endif #endif
#ifdef WEIGHTS_enc_gru1_recurrent_scale_DEFINED #ifdef WEIGHTS_enc_gru1_recurrent_scale_DEFINED
{"enc_gru1_recurrent_scale", WEIGHTS_enc_gru1_recurrent_scale_TYPE,sizeof(enc_gru1_recurrent_scale),enc_gru1_recurrent_scale}, {"enc_gru1_recurrent_scale",WEIGHTS_enc_gru1_recurrent_scale_TYPE,sizeof(enc_gru1_recurrent_scale),enc_gru1_recurrent_scale},
#endif #endif
#ifdef WEIGHTS_enc_gru1_recurrent_bias_DEFINED #ifdef WEIGHTS_enc_gru1_recurrent_bias_DEFINED
{"enc_gru1_recurrent_bias", WEIGHTS_enc_gru1_recurrent_bias_TYPE,sizeof(enc_gru1_recurrent_bias),enc_gru1_recurrent_bias}, {"enc_gru1_recurrent_bias",WEIGHTS_enc_gru1_recurrent_bias_TYPE,sizeof(enc_gru1_recurrent_bias),enc_gru1_recurrent_bias},
#endif #endif
#ifdef WEIGHTS_enc_gru2_input_weights_int8_DEFINED #ifdef WEIGHTS_enc_gru2_input_weights_int8_DEFINED
{"enc_gru2_input_weights_int8", WEIGHTS_enc_gru2_input_weights_int8_TYPE,sizeof(enc_gru2_input_weights_int8),enc_gru2_input_weights_int8}, {"enc_gru2_input_weights_int8",WEIGHTS_enc_gru2_input_weights_int8_TYPE,sizeof(enc_gru2_input_weights_int8),enc_gru2_input_weights_int8},
#endif #endif
#ifdef WEIGHTS_enc_gru2_input_weights_float_DEFINED #ifdef WEIGHTS_enc_gru2_input_weights_float_DEFINED
{"enc_gru2_input_weights_float", WEIGHTS_enc_gru2_input_weights_float_TYPE,sizeof(enc_gru2_input_weights_float),enc_gru2_input_weights_float}, {"enc_gru2_input_weights_float",WEIGHTS_enc_gru2_input_weights_float_TYPE,sizeof(enc_gru2_input_weights_float),enc_gru2_input_weights_float},
#endif #endif
#ifdef WEIGHTS_enc_gru2_input_weights_idx_DEFINED #ifdef WEIGHTS_enc_gru2_input_weights_idx_DEFINED
{"enc_gru2_input_weights_idx", WEIGHTS_enc_gru2_input_weights_idx_TYPE,sizeof(enc_gru2_input_weights_idx),enc_gru2_input_weights_idx}, {"enc_gru2_input_weights_idx",WEIGHTS_enc_gru2_input_weights_idx_TYPE,sizeof(enc_gru2_input_weights_idx),enc_gru2_input_weights_idx},
#endif #endif
#ifdef WEIGHTS_enc_gru2_input_subias_DEFINED #ifdef WEIGHTS_enc_gru2_input_subias_DEFINED
{"enc_gru2_input_subias", WEIGHTS_enc_gru2_input_subias_TYPE,sizeof(enc_gru2_input_subias),enc_gru2_input_subias}, {"enc_gru2_input_subias",WEIGHTS_enc_gru2_input_subias_TYPE,sizeof(enc_gru2_input_subias),enc_gru2_input_subias},
#endif #endif
#ifdef WEIGHTS_enc_gru2_input_scale_DEFINED #ifdef WEIGHTS_enc_gru2_input_scale_DEFINED
{"enc_gru2_input_scale", WEIGHTS_enc_gru2_input_scale_TYPE,sizeof(enc_gru2_input_scale),enc_gru2_input_scale}, {"enc_gru2_input_scale",WEIGHTS_enc_gru2_input_scale_TYPE,sizeof(enc_gru2_input_scale),enc_gru2_input_scale},
#endif #endif
#ifdef WEIGHTS_enc_gru2_input_bias_DEFINED #ifdef WEIGHTS_enc_gru2_input_bias_DEFINED
{"enc_gru2_input_bias", WEIGHTS_enc_gru2_input_bias_TYPE,sizeof(enc_gru2_input_bias),enc_gru2_input_bias}, {"enc_gru2_input_bias",WEIGHTS_enc_gru2_input_bias_TYPE,sizeof(enc_gru2_input_bias),enc_gru2_input_bias},
#endif #endif
#ifdef WEIGHTS_enc_gru2_recurrent_weights_int8_DEFINED #ifdef WEIGHTS_enc_gru2_recurrent_weights_int8_DEFINED
{"enc_gru2_recurrent_weights_int8", WEIGHTS_enc_gru2_recurrent_weights_int8_TYPE,sizeof(enc_gru2_recurrent_weights_int8),enc_gru2_recurrent_weights_int8}, {"enc_gru2_recurrent_weights_int8",WEIGHTS_enc_gru2_recurrent_weights_int8_TYPE,sizeof(enc_gru2_recurrent_weights_int8),enc_gru2_recurrent_weights_int8},
#endif #endif
#ifdef WEIGHTS_enc_gru2_recurrent_weights_float_DEFINED #ifdef WEIGHTS_enc_gru2_recurrent_weights_float_DEFINED
{"enc_gru2_recurrent_weights_float", WEIGHTS_enc_gru2_recurrent_weights_float_TYPE,sizeof(enc_gru2_recurrent_weights_float),enc_gru2_recurrent_weights_float}, {"enc_gru2_recurrent_weights_float",WEIGHTS_enc_gru2_recurrent_weights_float_TYPE,sizeof(enc_gru2_recurrent_weights_float),enc_gru2_recurrent_weights_float},
#endif #endif
#ifdef WEIGHTS_enc_gru2_recurrent_subias_DEFINED #ifdef WEIGHTS_enc_gru2_recurrent_subias_DEFINED
{"enc_gru2_recurrent_subias", WEIGHTS_enc_gru2_recurrent_subias_TYPE,sizeof(enc_gru2_recurrent_subias),enc_gru2_recurrent_subias}, {"enc_gru2_recurrent_subias",WEIGHTS_enc_gru2_recurrent_subias_TYPE,sizeof(enc_gru2_recurrent_subias),enc_gru2_recurrent_subias},
#endif #endif
#ifdef WEIGHTS_enc_gru2_recurrent_scale_DEFINED #ifdef WEIGHTS_enc_gru2_recurrent_scale_DEFINED
{"enc_gru2_recurrent_scale", WEIGHTS_enc_gru2_recurrent_scale_TYPE,sizeof(enc_gru2_recurrent_scale),enc_gru2_recurrent_scale}, {"enc_gru2_recurrent_scale",WEIGHTS_enc_gru2_recurrent_scale_TYPE,sizeof(enc_gru2_recurrent_scale),enc_gru2_recurrent_scale},
#endif #endif
#ifdef WEIGHTS_enc_gru2_recurrent_bias_DEFINED #ifdef WEIGHTS_enc_gru2_recurrent_bias_DEFINED
{"enc_gru2_recurrent_bias", WEIGHTS_enc_gru2_recurrent_bias_TYPE,sizeof(enc_gru2_recurrent_bias),enc_gru2_recurrent_bias}, {"enc_gru2_recurrent_bias",WEIGHTS_enc_gru2_recurrent_bias_TYPE,sizeof(enc_gru2_recurrent_bias),enc_gru2_recurrent_bias},
#endif #endif
#ifdef WEIGHTS_enc_gru3_input_weights_int8_DEFINED #ifdef WEIGHTS_enc_gru3_input_weights_int8_DEFINED
{"enc_gru3_input_weights_int8", WEIGHTS_enc_gru3_input_weights_int8_TYPE,sizeof(enc_gru3_input_weights_int8),enc_gru3_input_weights_int8}, {"enc_gru3_input_weights_int8",WEIGHTS_enc_gru3_input_weights_int8_TYPE,sizeof(enc_gru3_input_weights_int8),enc_gru3_input_weights_int8},
#endif #endif
#ifdef WEIGHTS_enc_gru3_input_weights_float_DEFINED #ifdef WEIGHTS_enc_gru3_input_weights_float_DEFINED
{"enc_gru3_input_weights_float", WEIGHTS_enc_gru3_input_weights_float_TYPE,sizeof(enc_gru3_input_weights_float),enc_gru3_input_weights_float}, {"enc_gru3_input_weights_float",WEIGHTS_enc_gru3_input_weights_float_TYPE,sizeof(enc_gru3_input_weights_float),enc_gru3_input_weights_float},
#endif #endif
#ifdef WEIGHTS_enc_gru3_input_weights_idx_DEFINED #ifdef WEIGHTS_enc_gru3_input_weights_idx_DEFINED
{"enc_gru3_input_weights_idx", WEIGHTS_enc_gru3_input_weights_idx_TYPE,sizeof(enc_gru3_input_weights_idx),enc_gru3_input_weights_idx}, {"enc_gru3_input_weights_idx",WEIGHTS_enc_gru3_input_weights_idx_TYPE,sizeof(enc_gru3_input_weights_idx),enc_gru3_input_weights_idx},
#endif #endif
#ifdef WEIGHTS_enc_gru3_input_subias_DEFINED #ifdef WEIGHTS_enc_gru3_input_subias_DEFINED
{"enc_gru3_input_subias", WEIGHTS_enc_gru3_input_subias_TYPE,sizeof(enc_gru3_input_subias),enc_gru3_input_subias}, {"enc_gru3_input_subias",WEIGHTS_enc_gru3_input_subias_TYPE,sizeof(enc_gru3_input_subias),enc_gru3_input_subias},
#endif #endif
#ifdef WEIGHTS_enc_gru3_input_scale_DEFINED #ifdef WEIGHTS_enc_gru3_input_scale_DEFINED
{"enc_gru3_input_scale", WEIGHTS_enc_gru3_input_scale_TYPE,sizeof(enc_gru3_input_scale),enc_gru3_input_scale}, {"enc_gru3_input_scale",WEIGHTS_enc_gru3_input_scale_TYPE,sizeof(enc_gru3_input_scale),enc_gru3_input_scale},
#endif #endif
#ifdef WEIGHTS_enc_gru3_input_bias_DEFINED #ifdef WEIGHTS_enc_gru3_input_bias_DEFINED
{"enc_gru3_input_bias", WEIGHTS_enc_gru3_input_bias_TYPE,sizeof(enc_gru3_input_bias),enc_gru3_input_bias}, {"enc_gru3_input_bias",WEIGHTS_enc_gru3_input_bias_TYPE,sizeof(enc_gru3_input_bias),enc_gru3_input_bias},
#endif #endif
#ifdef WEIGHTS_enc_gru3_recurrent_weights_int8_DEFINED #ifdef WEIGHTS_enc_gru3_recurrent_weights_int8_DEFINED
{"enc_gru3_recurrent_weights_int8", WEIGHTS_enc_gru3_recurrent_weights_int8_TYPE,sizeof(enc_gru3_recurrent_weights_int8),enc_gru3_recurrent_weights_int8}, {"enc_gru3_recurrent_weights_int8",WEIGHTS_enc_gru3_recurrent_weights_int8_TYPE,sizeof(enc_gru3_recurrent_weights_int8),enc_gru3_recurrent_weights_int8},
#endif #endif
#ifdef WEIGHTS_enc_gru3_recurrent_weights_float_DEFINED #ifdef WEIGHTS_enc_gru3_recurrent_weights_float_DEFINED
{"enc_gru3_recurrent_weights_float", WEIGHTS_enc_gru3_recurrent_weights_float_TYPE,sizeof(enc_gru3_recurrent_weights_float),enc_gru3_recurrent_weights_float}, {"enc_gru3_recurrent_weights_float",WEIGHTS_enc_gru3_recurrent_weights_float_TYPE,sizeof(enc_gru3_recurrent_weights_float),enc_gru3_recurrent_weights_float},
#endif #endif
#ifdef WEIGHTS_enc_gru3_recurrent_subias_DEFINED #ifdef WEIGHTS_enc_gru3_recurrent_subias_DEFINED
{"enc_gru3_recurrent_subias", WEIGHTS_enc_gru3_recurrent_subias_TYPE,sizeof(enc_gru3_recurrent_subias),enc_gru3_recurrent_subias}, {"enc_gru3_recurrent_subias",WEIGHTS_enc_gru3_recurrent_subias_TYPE,sizeof(enc_gru3_recurrent_subias),enc_gru3_recurrent_subias},
#endif #endif
#ifdef WEIGHTS_enc_gru3_recurrent_scale_DEFINED #ifdef WEIGHTS_enc_gru3_recurrent_scale_DEFINED
{"enc_gru3_recurrent_scale", WEIGHTS_enc_gru3_recurrent_scale_TYPE,sizeof(enc_gru3_recurrent_scale),enc_gru3_recurrent_scale}, {"enc_gru3_recurrent_scale",WEIGHTS_enc_gru3_recurrent_scale_TYPE,sizeof(enc_gru3_recurrent_scale),enc_gru3_recurrent_scale},
#endif #endif
#ifdef WEIGHTS_enc_gru3_recurrent_bias_DEFINED #ifdef WEIGHTS_enc_gru3_recurrent_bias_DEFINED
{"enc_gru3_recurrent_bias", WEIGHTS_enc_gru3_recurrent_bias_TYPE,sizeof(enc_gru3_recurrent_bias),enc_gru3_recurrent_bias}, {"enc_gru3_recurrent_bias",WEIGHTS_enc_gru3_recurrent_bias_TYPE,sizeof(enc_gru3_recurrent_bias),enc_gru3_recurrent_bias},
#endif #endif
#ifdef WEIGHTS_enc_gru4_input_weights_int8_DEFINED #ifdef WEIGHTS_enc_gru4_input_weights_int8_DEFINED
{"enc_gru4_input_weights_int8", WEIGHTS_enc_gru4_input_weights_int8_TYPE,sizeof(enc_gru4_input_weights_int8),enc_gru4_input_weights_int8}, {"enc_gru4_input_weights_int8",WEIGHTS_enc_gru4_input_weights_int8_TYPE,sizeof(enc_gru4_input_weights_int8),enc_gru4_input_weights_int8},
#endif #endif
#ifdef WEIGHTS_enc_gru4_input_weights_float_DEFINED #ifdef WEIGHTS_enc_gru4_input_weights_float_DEFINED
{"enc_gru4_input_weights_float", WEIGHTS_enc_gru4_input_weights_float_TYPE,sizeof(enc_gru4_input_weights_float),enc_gru4_input_weights_float}, {"enc_gru4_input_weights_float",WEIGHTS_enc_gru4_input_weights_float_TYPE,sizeof(enc_gru4_input_weights_float),enc_gru4_input_weights_float},
#endif #endif
#ifdef WEIGHTS_enc_gru4_input_weights_idx_DEFINED #ifdef WEIGHTS_enc_gru4_input_weights_idx_DEFINED
{"enc_gru4_input_weights_idx", WEIGHTS_enc_gru4_input_weights_idx_TYPE,sizeof(enc_gru4_input_weights_idx),enc_gru4_input_weights_idx}, {"enc_gru4_input_weights_idx",WEIGHTS_enc_gru4_input_weights_idx_TYPE,sizeof(enc_gru4_input_weights_idx),enc_gru4_input_weights_idx},
#endif #endif
#ifdef WEIGHTS_enc_gru4_input_subias_DEFINED #ifdef WEIGHTS_enc_gru4_input_subias_DEFINED
{"enc_gru4_input_subias", WEIGHTS_enc_gru4_input_subias_TYPE,sizeof(enc_gru4_input_subias),enc_gru4_input_subias}, {"enc_gru4_input_subias",WEIGHTS_enc_gru4_input_subias_TYPE,sizeof(enc_gru4_input_subias),enc_gru4_input_subias},
#endif #endif
#ifdef WEIGHTS_enc_gru4_input_scale_DEFINED #ifdef WEIGHTS_enc_gru4_input_scale_DEFINED
{"enc_gru4_input_scale", WEIGHTS_enc_gru4_input_scale_TYPE,sizeof(enc_gru4_input_scale),enc_gru4_input_scale}, {"enc_gru4_input_scale",WEIGHTS_enc_gru4_input_scale_TYPE,sizeof(enc_gru4_input_scale),enc_gru4_input_scale},
#endif #endif
#ifdef WEIGHTS_enc_gru4_input_bias_DEFINED #ifdef WEIGHTS_enc_gru4_input_bias_DEFINED
{"enc_gru4_input_bias", WEIGHTS_enc_gru4_input_bias_TYPE,sizeof(enc_gru4_input_bias),enc_gru4_input_bias}, {"enc_gru4_input_bias",WEIGHTS_enc_gru4_input_bias_TYPE,sizeof(enc_gru4_input_bias),enc_gru4_input_bias},
#endif #endif
#ifdef WEIGHTS_enc_gru4_recurrent_weights_int8_DEFINED #ifdef WEIGHTS_enc_gru4_recurrent_weights_int8_DEFINED
{"enc_gru4_recurrent_weights_int8", WEIGHTS_enc_gru4_recurrent_weights_int8_TYPE,sizeof(enc_gru4_recurrent_weights_int8),enc_gru4_recurrent_weights_int8}, {"enc_gru4_recurrent_weights_int8",WEIGHTS_enc_gru4_recurrent_weights_int8_TYPE,sizeof(enc_gru4_recurrent_weights_int8),enc_gru4_recurrent_weights_int8},
#endif #endif
#ifdef WEIGHTS_enc_gru4_recurrent_weights_float_DEFINED #ifdef WEIGHTS_enc_gru4_recurrent_weights_float_DEFINED
{"enc_gru4_recurrent_weights_float", WEIGHTS_enc_gru4_recurrent_weights_float_TYPE,sizeof(enc_gru4_recurrent_weights_float),enc_gru4_recurrent_weights_float}, {"enc_gru4_recurrent_weights_float",WEIGHTS_enc_gru4_recurrent_weights_float_TYPE,sizeof(enc_gru4_recurrent_weights_float),enc_gru4_recurrent_weights_float},
#endif #endif
#ifdef WEIGHTS_enc_gru4_recurrent_subias_DEFINED #ifdef WEIGHTS_enc_gru4_recurrent_subias_DEFINED
{"enc_gru4_recurrent_subias", WEIGHTS_enc_gru4_recurrent_subias_TYPE,sizeof(enc_gru4_recurrent_subias),enc_gru4_recurrent_subias}, {"enc_gru4_recurrent_subias",WEIGHTS_enc_gru4_recurrent_subias_TYPE,sizeof(enc_gru4_recurrent_subias),enc_gru4_recurrent_subias},
#endif #endif
#ifdef WEIGHTS_enc_gru4_recurrent_scale_DEFINED #ifdef WEIGHTS_enc_gru4_recurrent_scale_DEFINED
{"enc_gru4_recurrent_scale", WEIGHTS_enc_gru4_recurrent_scale_TYPE,sizeof(enc_gru4_recurrent_scale),enc_gru4_recurrent_scale}, {"enc_gru4_recurrent_scale",WEIGHTS_enc_gru4_recurrent_scale_TYPE,sizeof(enc_gru4_recurrent_scale),enc_gru4_recurrent_scale},
#endif #endif
#ifdef WEIGHTS_enc_gru4_recurrent_bias_DEFINED #ifdef WEIGHTS_enc_gru4_recurrent_bias_DEFINED
{"enc_gru4_recurrent_bias", WEIGHTS_enc_gru4_recurrent_bias_TYPE,sizeof(enc_gru4_recurrent_bias),enc_gru4_recurrent_bias}, {"enc_gru4_recurrent_bias",WEIGHTS_enc_gru4_recurrent_bias_TYPE,sizeof(enc_gru4_recurrent_bias),enc_gru4_recurrent_bias},
#endif #endif
#ifdef WEIGHTS_enc_gru5_input_weights_int8_DEFINED #ifdef WEIGHTS_enc_gru5_input_weights_int8_DEFINED
{"enc_gru5_input_weights_int8", WEIGHTS_enc_gru5_input_weights_int8_TYPE,sizeof(enc_gru5_input_weights_int8),enc_gru5_input_weights_int8}, {"enc_gru5_input_weights_int8",WEIGHTS_enc_gru5_input_weights_int8_TYPE,sizeof(enc_gru5_input_weights_int8),enc_gru5_input_weights_int8},
#endif #endif
#ifdef WEIGHTS_enc_gru5_input_weights_float_DEFINED #ifdef WEIGHTS_enc_gru5_input_weights_float_DEFINED
{"enc_gru5_input_weights_float", WEIGHTS_enc_gru5_input_weights_float_TYPE,sizeof(enc_gru5_input_weights_float),enc_gru5_input_weights_float}, {"enc_gru5_input_weights_float",WEIGHTS_enc_gru5_input_weights_float_TYPE,sizeof(enc_gru5_input_weights_float),enc_gru5_input_weights_float},
#endif #endif
#ifdef WEIGHTS_enc_gru5_input_weights_idx_DEFINED #ifdef WEIGHTS_enc_gru5_input_weights_idx_DEFINED
{"enc_gru5_input_weights_idx", WEIGHTS_enc_gru5_input_weights_idx_TYPE,sizeof(enc_gru5_input_weights_idx),enc_gru5_input_weights_idx}, {"enc_gru5_input_weights_idx",WEIGHTS_enc_gru5_input_weights_idx_TYPE,sizeof(enc_gru5_input_weights_idx),enc_gru5_input_weights_idx},
#endif #endif
#ifdef WEIGHTS_enc_gru5_input_subias_DEFINED #ifdef WEIGHTS_enc_gru5_input_subias_DEFINED
{"enc_gru5_input_subias", WEIGHTS_enc_gru5_input_subias_TYPE,sizeof(enc_gru5_input_subias),enc_gru5_input_subias}, {"enc_gru5_input_subias",WEIGHTS_enc_gru5_input_subias_TYPE,sizeof(enc_gru5_input_subias),enc_gru5_input_subias},
#endif #endif
#ifdef WEIGHTS_enc_gru5_input_scale_DEFINED #ifdef WEIGHTS_enc_gru5_input_scale_DEFINED
{"enc_gru5_input_scale", WEIGHTS_enc_gru5_input_scale_TYPE,sizeof(enc_gru5_input_scale),enc_gru5_input_scale}, {"enc_gru5_input_scale",WEIGHTS_enc_gru5_input_scale_TYPE,sizeof(enc_gru5_input_scale),enc_gru5_input_scale},
#endif #endif
#ifdef WEIGHTS_enc_gru5_input_bias_DEFINED #ifdef WEIGHTS_enc_gru5_input_bias_DEFINED
{"enc_gru5_input_bias", WEIGHTS_enc_gru5_input_bias_TYPE,sizeof(enc_gru5_input_bias),enc_gru5_input_bias}, {"enc_gru5_input_bias",WEIGHTS_enc_gru5_input_bias_TYPE,sizeof(enc_gru5_input_bias),enc_gru5_input_bias},
#endif #endif
#ifdef WEIGHTS_enc_gru5_recurrent_weights_int8_DEFINED #ifdef WEIGHTS_enc_gru5_recurrent_weights_int8_DEFINED
{"enc_gru5_recurrent_weights_int8", WEIGHTS_enc_gru5_recurrent_weights_int8_TYPE,sizeof(enc_gru5_recurrent_weights_int8),enc_gru5_recurrent_weights_int8}, {"enc_gru5_recurrent_weights_int8",WEIGHTS_enc_gru5_recurrent_weights_int8_TYPE,sizeof(enc_gru5_recurrent_weights_int8),enc_gru5_recurrent_weights_int8},
#endif #endif
#ifdef WEIGHTS_enc_gru5_recurrent_weights_float_DEFINED #ifdef WEIGHTS_enc_gru5_recurrent_weights_float_DEFINED
{"enc_gru5_recurrent_weights_float", WEIGHTS_enc_gru5_recurrent_weights_float_TYPE,sizeof(enc_gru5_recurrent_weights_float),enc_gru5_recurrent_weights_float}, {"enc_gru5_recurrent_weights_float",WEIGHTS_enc_gru5_recurrent_weights_float_TYPE,sizeof(enc_gru5_recurrent_weights_float),enc_gru5_recurrent_weights_float},
#endif #endif
#ifdef WEIGHTS_enc_gru5_recurrent_subias_DEFINED #ifdef WEIGHTS_enc_gru5_recurrent_subias_DEFINED
{"enc_gru5_recurrent_subias", WEIGHTS_enc_gru5_recurrent_subias_TYPE,sizeof(enc_gru5_recurrent_subias),enc_gru5_recurrent_subias}, {"enc_gru5_recurrent_subias",WEIGHTS_enc_gru5_recurrent_subias_TYPE,sizeof(enc_gru5_recurrent_subias),enc_gru5_recurrent_subias},
#endif #endif
#ifdef WEIGHTS_enc_gru5_recurrent_scale_DEFINED #ifdef WEIGHTS_enc_gru5_recurrent_scale_DEFINED
{"enc_gru5_recurrent_scale", WEIGHTS_enc_gru5_recurrent_scale_TYPE,sizeof(enc_gru5_recurrent_scale),enc_gru5_recurrent_scale}, {"enc_gru5_recurrent_scale",WEIGHTS_enc_gru5_recurrent_scale_TYPE,sizeof(enc_gru5_recurrent_scale),enc_gru5_recurrent_scale},
#endif #endif
#ifdef WEIGHTS_enc_gru5_recurrent_bias_DEFINED #ifdef WEIGHTS_enc_gru5_recurrent_bias_DEFINED
{"enc_gru5_recurrent_bias", WEIGHTS_enc_gru5_recurrent_bias_TYPE,sizeof(enc_gru5_recurrent_bias),enc_gru5_recurrent_bias}, {"enc_gru5_recurrent_bias",WEIGHTS_enc_gru5_recurrent_bias_TYPE,sizeof(enc_gru5_recurrent_bias),enc_gru5_recurrent_bias},
#endif #endif
#ifdef WEIGHTS_enc_conv1_weights_int8_DEFINED #ifdef WEIGHTS_enc_conv1_weights_int8_DEFINED
{"enc_conv1_weights_int8", WEIGHTS_enc_conv1_weights_int8_TYPE,sizeof(enc_conv1_weights_int8),enc_conv1_weights_int8}, {"enc_conv1_weights_int8",WEIGHTS_enc_conv1_weights_int8_TYPE,sizeof(enc_conv1_weights_int8),enc_conv1_weights_int8},
#endif #endif
#ifdef WEIGHTS_enc_conv1_weights_float_DEFINED #ifdef WEIGHTS_enc_conv1_weights_float_DEFINED
{"enc_conv1_weights_float", WEIGHTS_enc_conv1_weights_float_TYPE,sizeof(enc_conv1_weights_float),enc_conv1_weights_float}, {"enc_conv1_weights_float",WEIGHTS_enc_conv1_weights_float_TYPE,sizeof(enc_conv1_weights_float),enc_conv1_weights_float},
#endif #endif
#ifdef WEIGHTS_enc_conv1_subias_DEFINED #ifdef WEIGHTS_enc_conv1_subias_DEFINED
{"enc_conv1_subias", WEIGHTS_enc_conv1_subias_TYPE,sizeof(enc_conv1_subias),enc_conv1_subias}, {"enc_conv1_subias",WEIGHTS_enc_conv1_subias_TYPE,sizeof(enc_conv1_subias),enc_conv1_subias},
#endif #endif
#ifdef WEIGHTS_enc_conv1_scale_DEFINED #ifdef WEIGHTS_enc_conv1_scale_DEFINED
{"enc_conv1_scale", WEIGHTS_enc_conv1_scale_TYPE,sizeof(enc_conv1_scale),enc_conv1_scale}, {"enc_conv1_scale",WEIGHTS_enc_conv1_scale_TYPE,sizeof(enc_conv1_scale),enc_conv1_scale},
#endif #endif
#ifdef WEIGHTS_enc_conv1_bias_DEFINED #ifdef WEIGHTS_enc_conv1_bias_DEFINED
{"enc_conv1_bias", WEIGHTS_enc_conv1_bias_TYPE,sizeof(enc_conv1_bias),enc_conv1_bias}, {"enc_conv1_bias",WEIGHTS_enc_conv1_bias_TYPE,sizeof(enc_conv1_bias),enc_conv1_bias},
#endif #endif
#ifdef WEIGHTS_enc_conv2_weights_int8_DEFINED #ifdef WEIGHTS_enc_conv2_weights_int8_DEFINED
{"enc_conv2_weights_int8", WEIGHTS_enc_conv2_weights_int8_TYPE,sizeof(enc_conv2_weights_int8),enc_conv2_weights_int8}, {"enc_conv2_weights_int8",WEIGHTS_enc_conv2_weights_int8_TYPE,sizeof(enc_conv2_weights_int8),enc_conv2_weights_int8},
#endif #endif
#ifdef WEIGHTS_enc_conv2_weights_float_DEFINED #ifdef WEIGHTS_enc_conv2_weights_float_DEFINED
{"enc_conv2_weights_float", WEIGHTS_enc_conv2_weights_float_TYPE,sizeof(enc_conv2_weights_float),enc_conv2_weights_float}, {"enc_conv2_weights_float",WEIGHTS_enc_conv2_weights_float_TYPE,sizeof(enc_conv2_weights_float),enc_conv2_weights_float},
#endif #endif
#ifdef WEIGHTS_enc_conv2_subias_DEFINED #ifdef WEIGHTS_enc_conv2_subias_DEFINED
{"enc_conv2_subias", WEIGHTS_enc_conv2_subias_TYPE,sizeof(enc_conv2_subias),enc_conv2_subias}, {"enc_conv2_subias",WEIGHTS_enc_conv2_subias_TYPE,sizeof(enc_conv2_subias),enc_conv2_subias},
#endif #endif
#ifdef WEIGHTS_enc_conv2_scale_DEFINED #ifdef WEIGHTS_enc_conv2_scale_DEFINED
{"enc_conv2_scale", WEIGHTS_enc_conv2_scale_TYPE,sizeof(enc_conv2_scale),enc_conv2_scale}, {"enc_conv2_scale",WEIGHTS_enc_conv2_scale_TYPE,sizeof(enc_conv2_scale),enc_conv2_scale},
#endif #endif
#ifdef WEIGHTS_enc_conv2_bias_DEFINED #ifdef WEIGHTS_enc_conv2_bias_DEFINED
{"enc_conv2_bias", WEIGHTS_enc_conv2_bias_TYPE,sizeof(enc_conv2_bias),enc_conv2_bias}, {"enc_conv2_bias",WEIGHTS_enc_conv2_bias_TYPE,sizeof(enc_conv2_bias),enc_conv2_bias},
#endif #endif
#ifdef WEIGHTS_enc_conv3_weights_int8_DEFINED #ifdef WEIGHTS_enc_conv3_weights_int8_DEFINED
{"enc_conv3_weights_int8", WEIGHTS_enc_conv3_weights_int8_TYPE,sizeof(enc_conv3_weights_int8),enc_conv3_weights_int8}, {"enc_conv3_weights_int8",WEIGHTS_enc_conv3_weights_int8_TYPE,sizeof(enc_conv3_weights_int8),enc_conv3_weights_int8},
#endif #endif
#ifdef WEIGHTS_enc_conv3_weights_float_DEFINED #ifdef WEIGHTS_enc_conv3_weights_float_DEFINED
{"enc_conv3_weights_float", WEIGHTS_enc_conv3_weights_float_TYPE,sizeof(enc_conv3_weights_float),enc_conv3_weights_float}, {"enc_conv3_weights_float",WEIGHTS_enc_conv3_weights_float_TYPE,sizeof(enc_conv3_weights_float),enc_conv3_weights_float},
#endif #endif
#ifdef WEIGHTS_enc_conv3_subias_DEFINED #ifdef WEIGHTS_enc_conv3_subias_DEFINED
{"enc_conv3_subias", WEIGHTS_enc_conv3_subias_TYPE,sizeof(enc_conv3_subias),enc_conv3_subias}, {"enc_conv3_subias",WEIGHTS_enc_conv3_subias_TYPE,sizeof(enc_conv3_subias),enc_conv3_subias},
#endif #endif
#ifdef WEIGHTS_enc_conv3_scale_DEFINED #ifdef WEIGHTS_enc_conv3_scale_DEFINED
{"enc_conv3_scale", WEIGHTS_enc_conv3_scale_TYPE,sizeof(enc_conv3_scale),enc_conv3_scale}, {"enc_conv3_scale",WEIGHTS_enc_conv3_scale_TYPE,sizeof(enc_conv3_scale),enc_conv3_scale},
#endif #endif
#ifdef WEIGHTS_enc_conv3_bias_DEFINED #ifdef WEIGHTS_enc_conv3_bias_DEFINED
{"enc_conv3_bias", WEIGHTS_enc_conv3_bias_TYPE,sizeof(enc_conv3_bias),enc_conv3_bias}, {"enc_conv3_bias",WEIGHTS_enc_conv3_bias_TYPE,sizeof(enc_conv3_bias),enc_conv3_bias},
#endif #endif
#ifdef WEIGHTS_enc_conv4_weights_int8_DEFINED #ifdef WEIGHTS_enc_conv4_weights_int8_DEFINED
{"enc_conv4_weights_int8", WEIGHTS_enc_conv4_weights_int8_TYPE,sizeof(enc_conv4_weights_int8),enc_conv4_weights_int8}, {"enc_conv4_weights_int8",WEIGHTS_enc_conv4_weights_int8_TYPE,sizeof(enc_conv4_weights_int8),enc_conv4_weights_int8},
#endif #endif
#ifdef WEIGHTS_enc_conv4_weights_float_DEFINED #ifdef WEIGHTS_enc_conv4_weights_float_DEFINED
{"enc_conv4_weights_float", WEIGHTS_enc_conv4_weights_float_TYPE,sizeof(enc_conv4_weights_float),enc_conv4_weights_float}, {"enc_conv4_weights_float",WEIGHTS_enc_conv4_weights_float_TYPE,sizeof(enc_conv4_weights_float),enc_conv4_weights_float},
#endif #endif
#ifdef WEIGHTS_enc_conv4_subias_DEFINED #ifdef WEIGHTS_enc_conv4_subias_DEFINED
{"enc_conv4_subias", WEIGHTS_enc_conv4_subias_TYPE,sizeof(enc_conv4_subias),enc_conv4_subias}, {"enc_conv4_subias",WEIGHTS_enc_conv4_subias_TYPE,sizeof(enc_conv4_subias),enc_conv4_subias},
#endif #endif
#ifdef WEIGHTS_enc_conv4_scale_DEFINED #ifdef WEIGHTS_enc_conv4_scale_DEFINED
{"enc_conv4_scale", WEIGHTS_enc_conv4_scale_TYPE,sizeof(enc_conv4_scale),enc_conv4_scale}, {"enc_conv4_scale",WEIGHTS_enc_conv4_scale_TYPE,sizeof(enc_conv4_scale),enc_conv4_scale},
#endif #endif
#ifdef WEIGHTS_enc_conv4_bias_DEFINED #ifdef WEIGHTS_enc_conv4_bias_DEFINED
{"enc_conv4_bias", WEIGHTS_enc_conv4_bias_TYPE,sizeof(enc_conv4_bias),enc_conv4_bias}, {"enc_conv4_bias",WEIGHTS_enc_conv4_bias_TYPE,sizeof(enc_conv4_bias),enc_conv4_bias},
#endif #endif
#ifdef WEIGHTS_enc_conv5_weights_int8_DEFINED #ifdef WEIGHTS_enc_conv5_weights_int8_DEFINED
{"enc_conv5_weights_int8", WEIGHTS_enc_conv5_weights_int8_TYPE,sizeof(enc_conv5_weights_int8),enc_conv5_weights_int8}, {"enc_conv5_weights_int8",WEIGHTS_enc_conv5_weights_int8_TYPE,sizeof(enc_conv5_weights_int8),enc_conv5_weights_int8},
#endif #endif
#ifdef WEIGHTS_enc_conv5_weights_float_DEFINED #ifdef WEIGHTS_enc_conv5_weights_float_DEFINED
{"enc_conv5_weights_float", WEIGHTS_enc_conv5_weights_float_TYPE,sizeof(enc_conv5_weights_float),enc_conv5_weights_float}, {"enc_conv5_weights_float",WEIGHTS_enc_conv5_weights_float_TYPE,sizeof(enc_conv5_weights_float),enc_conv5_weights_float},
#endif #endif
#ifdef WEIGHTS_enc_conv5_subias_DEFINED #ifdef WEIGHTS_enc_conv5_subias_DEFINED
{"enc_conv5_subias", WEIGHTS_enc_conv5_subias_TYPE,sizeof(enc_conv5_subias),enc_conv5_subias}, {"enc_conv5_subias",WEIGHTS_enc_conv5_subias_TYPE,sizeof(enc_conv5_subias),enc_conv5_subias},
#endif #endif
#ifdef WEIGHTS_enc_conv5_scale_DEFINED #ifdef WEIGHTS_enc_conv5_scale_DEFINED
{"enc_conv5_scale", WEIGHTS_enc_conv5_scale_TYPE,sizeof(enc_conv5_scale),enc_conv5_scale}, {"enc_conv5_scale",WEIGHTS_enc_conv5_scale_TYPE,sizeof(enc_conv5_scale),enc_conv5_scale},
#endif #endif
#ifdef WEIGHTS_enc_conv5_bias_DEFINED #ifdef WEIGHTS_enc_conv5_bias_DEFINED
{"enc_conv5_bias", WEIGHTS_enc_conv5_bias_TYPE,sizeof(enc_conv5_bias),enc_conv5_bias}, {"enc_conv5_bias",WEIGHTS_enc_conv5_bias_TYPE,sizeof(enc_conv5_bias),enc_conv5_bias},
#endif #endif
{NULL,0,0,NULL} {NULL,0,0,NULL}
}; };

View File

@ -68,13 +68,6 @@ static void rand_resp(float *a, float *b) {
b[1] = .75*uni_rand(); b[1] = .75*uni_rand();
} }
void compute_noise(int *noise, float noise_std) {
int i;
for (i=0;i<FRAME_SIZE;i++) {
noise[i] = (int)floor(.5 + noise_std*.707*(log_approx(rand()/(float)RAND_MAX)-log_approx(rand()/(float)RAND_MAX)));
}
}
static opus_int16 float2short(float x) static opus_int16 float2short(float x)
{ {
int i; int i;
@ -82,30 +75,6 @@ static opus_int16 float2short(float x)
return IMAX(-32767, IMIN(32767, i)); return IMAX(-32767, IMIN(32767, i));
} }
void write_audio(LPCNetEncState *st, const opus_int16 *pcm, const int *noise, FILE *file) {
int i;
opus_int16 data[2*FRAME_SIZE];
for (i=0;i<FRAME_SIZE;i++) {
float p=0;
float e;
int j;
for (j=0;j<LPC_ORDER;j++) p -= st->features[NB_BANDS+2+j]*st->sig_mem[j];
e = lin2ulaw(pcm[i] - p);
/* Signal in. */
data[2*i] = float2short(st->sig_mem[0]);
/* Signal out. */
data[2*i+1] = pcm[i];
/* Simulate error on excitation. */
e += noise[i];
e = IMIN(255, IMAX(0, e));
OPUS_MOVE(&st->sig_mem[1], &st->sig_mem[0], LPC_ORDER-1);
st->sig_mem[0] = p + ulaw2lin(e);
}
fwrite(data, 4*FRAME_SIZE, 1, file);
}
int main(int argc, char **argv) { int main(int argc, char **argv) {
int i; int i;
char *argv0; char *argv0;
@ -123,13 +92,11 @@ int main(int argc, char **argv) {
FILE *ffeat; FILE *ffeat;
FILE *fpcm=NULL; FILE *fpcm=NULL;
opus_int16 pcm[FRAME_SIZE]={0}; opus_int16 pcm[FRAME_SIZE]={0};
int noisebuf[FRAME_SIZE]={0};
opus_int16 tmp[FRAME_SIZE] = {0}; opus_int16 tmp[FRAME_SIZE] = {0};
float speech_gain=1; float speech_gain=1;
float old_speech_gain = 1; float old_speech_gain = 1;
int one_pass_completed = 0; int one_pass_completed = 0;
LPCNetEncState *st; LPCNetEncState *st;
float noise_std=0;
int training = -1; int training = -1;
int burg = 0; int burg = 0;
int pitch = 0; int pitch = 0;
@ -202,16 +169,12 @@ int main(int argc, char **argv) {
for (i=0;i<FRAME_SIZE;i++) x[i] = tmp[i]; for (i=0;i<FRAME_SIZE;i++) x[i] = tmp[i];
if (count*FRAME_SIZE_5MS>=10000000 && one_pass_completed) break; if (count*FRAME_SIZE_5MS>=10000000 && one_pass_completed) break;
if (training && ++gain_change_count > 2821) { if (training && ++gain_change_count > 2821) {
float tmp1, tmp2;
speech_gain = pow(10., (-30+(rand()%40))/20.); speech_gain = pow(10., (-30+(rand()%40))/20.);
if (rand()&1) speech_gain = -speech_gain; if (rand()&1) speech_gain = -speech_gain;
if (rand()%20==0) speech_gain *= .01; if (rand()%20==0) speech_gain *= .01;
if (!pitch && rand()%100==0) speech_gain = 0; if (!pitch && rand()%100==0) speech_gain = 0;
gain_change_count = 0; gain_change_count = 0;
rand_resp(a_sig, b_sig); rand_resp(a_sig, b_sig);
tmp1 = rand()/(float)RAND_MAX;
tmp2 = rand()/(float)RAND_MAX;
noise_std = ABS16(-1.5*log(1e-4+tmp1)-.5*log(1e-4+tmp2));
if (fnoise != NULL) { if (fnoise != NULL) {
long pos; long pos;
/* Randomize the fraction because rand() only gives us 31 bits. */ /* Randomize the fraction because rand() only gives us 31 bits. */
@ -244,15 +207,10 @@ int main(int argc, char **argv) {
fwrite(ceps, sizeof(float), 2*NB_BANDS, ffeat); fwrite(ceps, sizeof(float), 2*NB_BANDS, ffeat);
} }
preemphasis(x, &mem_preemph, x, PREEMPHASIS, FRAME_SIZE); preemphasis(x, &mem_preemph, x, PREEMPHASIS, FRAME_SIZE);
for (i=0;i<FRAME_SIZE;i++) x[i] += rand()/(float)RAND_MAX - .5f;
/* PCM is delayed by 1/2 frame to make the features centered on the frames. */ /* PCM is delayed by 1/2 frame to make the features centered on the frames. */
for (i=0;i<FRAME_SIZE-TRAINING_OFFSET;i++) pcm[i+TRAINING_OFFSET] = float2short(x[i]); for (i=0;i<FRAME_SIZE-TRAINING_OFFSET;i++) pcm[i+TRAINING_OFFSET] = float2short(x[i]);
compute_frame_features(st, x, arch); compute_frame_features(st, x, arch);
if (fpcm) {
compute_noise(noisebuf, noise_std);
}
if (pitch) { if (pitch) {
signed char pitch_features[PITCH_MAX_PERIOD-PITCH_MIN_PERIOD+PITCH_IF_FEATURES]; signed char pitch_features[PITCH_MAX_PERIOD-PITCH_MIN_PERIOD+PITCH_IF_FEATURES];
for (i=0;i<PITCH_MAX_PERIOD-PITCH_MIN_PERIOD;i++) { for (i=0;i<PITCH_MAX_PERIOD-PITCH_MIN_PERIOD;i++) {
@ -266,7 +224,7 @@ int main(int argc, char **argv) {
fwrite(st->features, sizeof(float), NB_TOTAL_FEATURES, ffeat); fwrite(st->features, sizeof(float), NB_TOTAL_FEATURES, ffeat);
} }
/*if(pitch) fwrite(pcm, FRAME_SIZE, 2, stdout);*/ /*if(pitch) fwrite(pcm, FRAME_SIZE, 2, stdout);*/
if (fpcm) write_audio(st, pcm, noisebuf, fpcm); if (fpcm) fwrite(pcm, FRAME_SIZE, 2, fpcm);
/*if (fpcm) fwrite(pcm, sizeof(opus_int16), FRAME_SIZE, fpcm);*/ /*if (fpcm) fwrite(pcm, sizeof(opus_int16), FRAME_SIZE, fpcm);*/
for (i=0;i<TRAINING_OFFSET;i++) pcm[i] = float2short(x[i+FRAME_SIZE-TRAINING_OFFSET]); for (i=0;i<TRAINING_OFFSET;i++) pcm[i] = float2short(x[i+FRAME_SIZE-TRAINING_OFFSET]);
old_speech_gain = speech_gain; old_speech_gain = speech_gain;

View File

@ -104022,250 +104022,250 @@ static const float sig_net_gain_dense_out_bias[4] = {
#ifndef USE_WEIGHTS_FILE #ifndef USE_WEIGHTS_FILE
const WeightArray fargan_arrays[] = { const WeightArray fargan_arrays[] = {
#ifdef WEIGHTS_cond_net_pembed_weights_float_DEFINED #ifdef WEIGHTS_cond_net_pembed_weights_float_DEFINED
{"cond_net_pembed_weights_float", WEIGHTS_cond_net_pembed_weights_float_TYPE,sizeof(cond_net_pembed_weights_float),cond_net_pembed_weights_float}, {"cond_net_pembed_weights_float",WEIGHTS_cond_net_pembed_weights_float_TYPE,sizeof(cond_net_pembed_weights_float),cond_net_pembed_weights_float},
#endif #endif
#ifdef WEIGHTS_cond_net_pembed_bias_DEFINED #ifdef WEIGHTS_cond_net_pembed_bias_DEFINED
{"cond_net_pembed_bias", WEIGHTS_cond_net_pembed_bias_TYPE,sizeof(cond_net_pembed_bias),cond_net_pembed_bias}, {"cond_net_pembed_bias",WEIGHTS_cond_net_pembed_bias_TYPE,sizeof(cond_net_pembed_bias),cond_net_pembed_bias},
#endif #endif
#ifdef WEIGHTS_cond_net_fdense1_weights_float_DEFINED #ifdef WEIGHTS_cond_net_fdense1_weights_float_DEFINED
{"cond_net_fdense1_weights_float", WEIGHTS_cond_net_fdense1_weights_float_TYPE,sizeof(cond_net_fdense1_weights_float),cond_net_fdense1_weights_float}, {"cond_net_fdense1_weights_float",WEIGHTS_cond_net_fdense1_weights_float_TYPE,sizeof(cond_net_fdense1_weights_float),cond_net_fdense1_weights_float},
#endif #endif
#ifdef WEIGHTS_cond_net_fdense1_bias_DEFINED #ifdef WEIGHTS_cond_net_fdense1_bias_DEFINED
{"cond_net_fdense1_bias", WEIGHTS_cond_net_fdense1_bias_TYPE,sizeof(cond_net_fdense1_bias),cond_net_fdense1_bias}, {"cond_net_fdense1_bias",WEIGHTS_cond_net_fdense1_bias_TYPE,sizeof(cond_net_fdense1_bias),cond_net_fdense1_bias},
#endif #endif
#ifdef WEIGHTS_cond_net_fconv1_weights_int8_DEFINED #ifdef WEIGHTS_cond_net_fconv1_weights_int8_DEFINED
{"cond_net_fconv1_weights_int8", WEIGHTS_cond_net_fconv1_weights_int8_TYPE,sizeof(cond_net_fconv1_weights_int8),cond_net_fconv1_weights_int8}, {"cond_net_fconv1_weights_int8",WEIGHTS_cond_net_fconv1_weights_int8_TYPE,sizeof(cond_net_fconv1_weights_int8),cond_net_fconv1_weights_int8},
#endif #endif
#ifdef WEIGHTS_cond_net_fconv1_weights_float_DEFINED #ifdef WEIGHTS_cond_net_fconv1_weights_float_DEFINED
{"cond_net_fconv1_weights_float", WEIGHTS_cond_net_fconv1_weights_float_TYPE,sizeof(cond_net_fconv1_weights_float),cond_net_fconv1_weights_float}, {"cond_net_fconv1_weights_float",WEIGHTS_cond_net_fconv1_weights_float_TYPE,sizeof(cond_net_fconv1_weights_float),cond_net_fconv1_weights_float},
#endif #endif
#ifdef WEIGHTS_cond_net_fconv1_subias_DEFINED #ifdef WEIGHTS_cond_net_fconv1_subias_DEFINED
{"cond_net_fconv1_subias", WEIGHTS_cond_net_fconv1_subias_TYPE,sizeof(cond_net_fconv1_subias),cond_net_fconv1_subias}, {"cond_net_fconv1_subias",WEIGHTS_cond_net_fconv1_subias_TYPE,sizeof(cond_net_fconv1_subias),cond_net_fconv1_subias},
#endif #endif
#ifdef WEIGHTS_cond_net_fconv1_scale_DEFINED #ifdef WEIGHTS_cond_net_fconv1_scale_DEFINED
{"cond_net_fconv1_scale", WEIGHTS_cond_net_fconv1_scale_TYPE,sizeof(cond_net_fconv1_scale),cond_net_fconv1_scale}, {"cond_net_fconv1_scale",WEIGHTS_cond_net_fconv1_scale_TYPE,sizeof(cond_net_fconv1_scale),cond_net_fconv1_scale},
#endif #endif
#ifdef WEIGHTS_cond_net_fconv1_bias_DEFINED #ifdef WEIGHTS_cond_net_fconv1_bias_DEFINED
{"cond_net_fconv1_bias", WEIGHTS_cond_net_fconv1_bias_TYPE,sizeof(cond_net_fconv1_bias),cond_net_fconv1_bias}, {"cond_net_fconv1_bias",WEIGHTS_cond_net_fconv1_bias_TYPE,sizeof(cond_net_fconv1_bias),cond_net_fconv1_bias},
#endif #endif
#ifdef WEIGHTS_cond_net_fdense2_weights_int8_DEFINED #ifdef WEIGHTS_cond_net_fdense2_weights_int8_DEFINED
{"cond_net_fdense2_weights_int8", WEIGHTS_cond_net_fdense2_weights_int8_TYPE,sizeof(cond_net_fdense2_weights_int8),cond_net_fdense2_weights_int8}, {"cond_net_fdense2_weights_int8",WEIGHTS_cond_net_fdense2_weights_int8_TYPE,sizeof(cond_net_fdense2_weights_int8),cond_net_fdense2_weights_int8},
#endif #endif
#ifdef WEIGHTS_cond_net_fdense2_weights_float_DEFINED #ifdef WEIGHTS_cond_net_fdense2_weights_float_DEFINED
{"cond_net_fdense2_weights_float", WEIGHTS_cond_net_fdense2_weights_float_TYPE,sizeof(cond_net_fdense2_weights_float),cond_net_fdense2_weights_float}, {"cond_net_fdense2_weights_float",WEIGHTS_cond_net_fdense2_weights_float_TYPE,sizeof(cond_net_fdense2_weights_float),cond_net_fdense2_weights_float},
#endif #endif
#ifdef WEIGHTS_cond_net_fdense2_subias_DEFINED #ifdef WEIGHTS_cond_net_fdense2_subias_DEFINED
{"cond_net_fdense2_subias", WEIGHTS_cond_net_fdense2_subias_TYPE,sizeof(cond_net_fdense2_subias),cond_net_fdense2_subias}, {"cond_net_fdense2_subias",WEIGHTS_cond_net_fdense2_subias_TYPE,sizeof(cond_net_fdense2_subias),cond_net_fdense2_subias},
#endif #endif
#ifdef WEIGHTS_cond_net_fdense2_scale_DEFINED #ifdef WEIGHTS_cond_net_fdense2_scale_DEFINED
{"cond_net_fdense2_scale", WEIGHTS_cond_net_fdense2_scale_TYPE,sizeof(cond_net_fdense2_scale),cond_net_fdense2_scale}, {"cond_net_fdense2_scale",WEIGHTS_cond_net_fdense2_scale_TYPE,sizeof(cond_net_fdense2_scale),cond_net_fdense2_scale},
#endif #endif
#ifdef WEIGHTS_cond_net_fdense2_bias_DEFINED #ifdef WEIGHTS_cond_net_fdense2_bias_DEFINED
{"cond_net_fdense2_bias", WEIGHTS_cond_net_fdense2_bias_TYPE,sizeof(cond_net_fdense2_bias),cond_net_fdense2_bias}, {"cond_net_fdense2_bias",WEIGHTS_cond_net_fdense2_bias_TYPE,sizeof(cond_net_fdense2_bias),cond_net_fdense2_bias},
#endif #endif
#ifdef WEIGHTS_sig_net_cond_gain_dense_weights_float_DEFINED #ifdef WEIGHTS_sig_net_cond_gain_dense_weights_float_DEFINED
{"sig_net_cond_gain_dense_weights_float", WEIGHTS_sig_net_cond_gain_dense_weights_float_TYPE,sizeof(sig_net_cond_gain_dense_weights_float),sig_net_cond_gain_dense_weights_float}, {"sig_net_cond_gain_dense_weights_float",WEIGHTS_sig_net_cond_gain_dense_weights_float_TYPE,sizeof(sig_net_cond_gain_dense_weights_float),sig_net_cond_gain_dense_weights_float},
#endif #endif
#ifdef WEIGHTS_sig_net_cond_gain_dense_bias_DEFINED #ifdef WEIGHTS_sig_net_cond_gain_dense_bias_DEFINED
{"sig_net_cond_gain_dense_bias", WEIGHTS_sig_net_cond_gain_dense_bias_TYPE,sizeof(sig_net_cond_gain_dense_bias),sig_net_cond_gain_dense_bias}, {"sig_net_cond_gain_dense_bias",WEIGHTS_sig_net_cond_gain_dense_bias_TYPE,sizeof(sig_net_cond_gain_dense_bias),sig_net_cond_gain_dense_bias},
#endif #endif
#ifdef WEIGHTS_sig_net_fwc0_conv_weights_int8_DEFINED #ifdef WEIGHTS_sig_net_fwc0_conv_weights_int8_DEFINED
{"sig_net_fwc0_conv_weights_int8", WEIGHTS_sig_net_fwc0_conv_weights_int8_TYPE,sizeof(sig_net_fwc0_conv_weights_int8),sig_net_fwc0_conv_weights_int8}, {"sig_net_fwc0_conv_weights_int8",WEIGHTS_sig_net_fwc0_conv_weights_int8_TYPE,sizeof(sig_net_fwc0_conv_weights_int8),sig_net_fwc0_conv_weights_int8},
#endif #endif
#ifdef WEIGHTS_sig_net_fwc0_conv_weights_float_DEFINED #ifdef WEIGHTS_sig_net_fwc0_conv_weights_float_DEFINED
{"sig_net_fwc0_conv_weights_float", WEIGHTS_sig_net_fwc0_conv_weights_float_TYPE,sizeof(sig_net_fwc0_conv_weights_float),sig_net_fwc0_conv_weights_float}, {"sig_net_fwc0_conv_weights_float",WEIGHTS_sig_net_fwc0_conv_weights_float_TYPE,sizeof(sig_net_fwc0_conv_weights_float),sig_net_fwc0_conv_weights_float},
#endif #endif
#ifdef WEIGHTS_sig_net_fwc0_conv_subias_DEFINED #ifdef WEIGHTS_sig_net_fwc0_conv_subias_DEFINED
{"sig_net_fwc0_conv_subias", WEIGHTS_sig_net_fwc0_conv_subias_TYPE,sizeof(sig_net_fwc0_conv_subias),sig_net_fwc0_conv_subias}, {"sig_net_fwc0_conv_subias",WEIGHTS_sig_net_fwc0_conv_subias_TYPE,sizeof(sig_net_fwc0_conv_subias),sig_net_fwc0_conv_subias},
#endif #endif
#ifdef WEIGHTS_sig_net_fwc0_conv_scale_DEFINED #ifdef WEIGHTS_sig_net_fwc0_conv_scale_DEFINED
{"sig_net_fwc0_conv_scale", WEIGHTS_sig_net_fwc0_conv_scale_TYPE,sizeof(sig_net_fwc0_conv_scale),sig_net_fwc0_conv_scale}, {"sig_net_fwc0_conv_scale",WEIGHTS_sig_net_fwc0_conv_scale_TYPE,sizeof(sig_net_fwc0_conv_scale),sig_net_fwc0_conv_scale},
#endif #endif
#ifdef WEIGHTS_sig_net_fwc0_conv_bias_DEFINED #ifdef WEIGHTS_sig_net_fwc0_conv_bias_DEFINED
{"sig_net_fwc0_conv_bias", WEIGHTS_sig_net_fwc0_conv_bias_TYPE,sizeof(sig_net_fwc0_conv_bias),sig_net_fwc0_conv_bias}, {"sig_net_fwc0_conv_bias",WEIGHTS_sig_net_fwc0_conv_bias_TYPE,sizeof(sig_net_fwc0_conv_bias),sig_net_fwc0_conv_bias},
#endif #endif
#ifdef WEIGHTS_sig_net_fwc0_glu_gate_weights_int8_DEFINED #ifdef WEIGHTS_sig_net_fwc0_glu_gate_weights_int8_DEFINED
{"sig_net_fwc0_glu_gate_weights_int8", WEIGHTS_sig_net_fwc0_glu_gate_weights_int8_TYPE,sizeof(sig_net_fwc0_glu_gate_weights_int8),sig_net_fwc0_glu_gate_weights_int8}, {"sig_net_fwc0_glu_gate_weights_int8",WEIGHTS_sig_net_fwc0_glu_gate_weights_int8_TYPE,sizeof(sig_net_fwc0_glu_gate_weights_int8),sig_net_fwc0_glu_gate_weights_int8},
#endif #endif
#ifdef WEIGHTS_sig_net_fwc0_glu_gate_weights_float_DEFINED #ifdef WEIGHTS_sig_net_fwc0_glu_gate_weights_float_DEFINED
{"sig_net_fwc0_glu_gate_weights_float", WEIGHTS_sig_net_fwc0_glu_gate_weights_float_TYPE,sizeof(sig_net_fwc0_glu_gate_weights_float),sig_net_fwc0_glu_gate_weights_float}, {"sig_net_fwc0_glu_gate_weights_float",WEIGHTS_sig_net_fwc0_glu_gate_weights_float_TYPE,sizeof(sig_net_fwc0_glu_gate_weights_float),sig_net_fwc0_glu_gate_weights_float},
#endif #endif
#ifdef WEIGHTS_sig_net_fwc0_glu_gate_subias_DEFINED #ifdef WEIGHTS_sig_net_fwc0_glu_gate_subias_DEFINED
{"sig_net_fwc0_glu_gate_subias", WEIGHTS_sig_net_fwc0_glu_gate_subias_TYPE,sizeof(sig_net_fwc0_glu_gate_subias),sig_net_fwc0_glu_gate_subias}, {"sig_net_fwc0_glu_gate_subias",WEIGHTS_sig_net_fwc0_glu_gate_subias_TYPE,sizeof(sig_net_fwc0_glu_gate_subias),sig_net_fwc0_glu_gate_subias},
#endif #endif
#ifdef WEIGHTS_sig_net_fwc0_glu_gate_scale_DEFINED #ifdef WEIGHTS_sig_net_fwc0_glu_gate_scale_DEFINED
{"sig_net_fwc0_glu_gate_scale", WEIGHTS_sig_net_fwc0_glu_gate_scale_TYPE,sizeof(sig_net_fwc0_glu_gate_scale),sig_net_fwc0_glu_gate_scale}, {"sig_net_fwc0_glu_gate_scale",WEIGHTS_sig_net_fwc0_glu_gate_scale_TYPE,sizeof(sig_net_fwc0_glu_gate_scale),sig_net_fwc0_glu_gate_scale},
#endif #endif
#ifdef WEIGHTS_sig_net_fwc0_glu_gate_bias_DEFINED #ifdef WEIGHTS_sig_net_fwc0_glu_gate_bias_DEFINED
{"sig_net_fwc0_glu_gate_bias", WEIGHTS_sig_net_fwc0_glu_gate_bias_TYPE,sizeof(sig_net_fwc0_glu_gate_bias),sig_net_fwc0_glu_gate_bias}, {"sig_net_fwc0_glu_gate_bias",WEIGHTS_sig_net_fwc0_glu_gate_bias_TYPE,sizeof(sig_net_fwc0_glu_gate_bias),sig_net_fwc0_glu_gate_bias},
#endif #endif
#ifdef WEIGHTS_sig_net_gru1_input_weights_int8_DEFINED #ifdef WEIGHTS_sig_net_gru1_input_weights_int8_DEFINED
{"sig_net_gru1_input_weights_int8", WEIGHTS_sig_net_gru1_input_weights_int8_TYPE,sizeof(sig_net_gru1_input_weights_int8),sig_net_gru1_input_weights_int8}, {"sig_net_gru1_input_weights_int8",WEIGHTS_sig_net_gru1_input_weights_int8_TYPE,sizeof(sig_net_gru1_input_weights_int8),sig_net_gru1_input_weights_int8},
#endif #endif
#ifdef WEIGHTS_sig_net_gru1_input_weights_float_DEFINED #ifdef WEIGHTS_sig_net_gru1_input_weights_float_DEFINED
{"sig_net_gru1_input_weights_float", WEIGHTS_sig_net_gru1_input_weights_float_TYPE,sizeof(sig_net_gru1_input_weights_float),sig_net_gru1_input_weights_float}, {"sig_net_gru1_input_weights_float",WEIGHTS_sig_net_gru1_input_weights_float_TYPE,sizeof(sig_net_gru1_input_weights_float),sig_net_gru1_input_weights_float},
#endif #endif
#ifdef WEIGHTS_sig_net_gru1_input_subias_DEFINED #ifdef WEIGHTS_sig_net_gru1_input_subias_DEFINED
{"sig_net_gru1_input_subias", WEIGHTS_sig_net_gru1_input_subias_TYPE,sizeof(sig_net_gru1_input_subias),sig_net_gru1_input_subias}, {"sig_net_gru1_input_subias",WEIGHTS_sig_net_gru1_input_subias_TYPE,sizeof(sig_net_gru1_input_subias),sig_net_gru1_input_subias},
#endif #endif
#ifdef WEIGHTS_sig_net_gru1_input_scale_DEFINED #ifdef WEIGHTS_sig_net_gru1_input_scale_DEFINED
{"sig_net_gru1_input_scale", WEIGHTS_sig_net_gru1_input_scale_TYPE,sizeof(sig_net_gru1_input_scale),sig_net_gru1_input_scale}, {"sig_net_gru1_input_scale",WEIGHTS_sig_net_gru1_input_scale_TYPE,sizeof(sig_net_gru1_input_scale),sig_net_gru1_input_scale},
#endif #endif
#ifdef WEIGHTS_sig_net_gru1_recurrent_weights_int8_DEFINED #ifdef WEIGHTS_sig_net_gru1_recurrent_weights_int8_DEFINED
{"sig_net_gru1_recurrent_weights_int8", WEIGHTS_sig_net_gru1_recurrent_weights_int8_TYPE,sizeof(sig_net_gru1_recurrent_weights_int8),sig_net_gru1_recurrent_weights_int8}, {"sig_net_gru1_recurrent_weights_int8",WEIGHTS_sig_net_gru1_recurrent_weights_int8_TYPE,sizeof(sig_net_gru1_recurrent_weights_int8),sig_net_gru1_recurrent_weights_int8},
#endif #endif
#ifdef WEIGHTS_sig_net_gru1_recurrent_weights_float_DEFINED #ifdef WEIGHTS_sig_net_gru1_recurrent_weights_float_DEFINED
{"sig_net_gru1_recurrent_weights_float", WEIGHTS_sig_net_gru1_recurrent_weights_float_TYPE,sizeof(sig_net_gru1_recurrent_weights_float),sig_net_gru1_recurrent_weights_float}, {"sig_net_gru1_recurrent_weights_float",WEIGHTS_sig_net_gru1_recurrent_weights_float_TYPE,sizeof(sig_net_gru1_recurrent_weights_float),sig_net_gru1_recurrent_weights_float},
#endif #endif
#ifdef WEIGHTS_sig_net_gru1_recurrent_subias_DEFINED #ifdef WEIGHTS_sig_net_gru1_recurrent_subias_DEFINED
{"sig_net_gru1_recurrent_subias", WEIGHTS_sig_net_gru1_recurrent_subias_TYPE,sizeof(sig_net_gru1_recurrent_subias),sig_net_gru1_recurrent_subias}, {"sig_net_gru1_recurrent_subias",WEIGHTS_sig_net_gru1_recurrent_subias_TYPE,sizeof(sig_net_gru1_recurrent_subias),sig_net_gru1_recurrent_subias},
#endif #endif
#ifdef WEIGHTS_sig_net_gru1_recurrent_scale_DEFINED #ifdef WEIGHTS_sig_net_gru1_recurrent_scale_DEFINED
{"sig_net_gru1_recurrent_scale", WEIGHTS_sig_net_gru1_recurrent_scale_TYPE,sizeof(sig_net_gru1_recurrent_scale),sig_net_gru1_recurrent_scale}, {"sig_net_gru1_recurrent_scale",WEIGHTS_sig_net_gru1_recurrent_scale_TYPE,sizeof(sig_net_gru1_recurrent_scale),sig_net_gru1_recurrent_scale},
#endif #endif
#ifdef WEIGHTS_sig_net_gru2_input_weights_int8_DEFINED #ifdef WEIGHTS_sig_net_gru2_input_weights_int8_DEFINED
{"sig_net_gru2_input_weights_int8", WEIGHTS_sig_net_gru2_input_weights_int8_TYPE,sizeof(sig_net_gru2_input_weights_int8),sig_net_gru2_input_weights_int8}, {"sig_net_gru2_input_weights_int8",WEIGHTS_sig_net_gru2_input_weights_int8_TYPE,sizeof(sig_net_gru2_input_weights_int8),sig_net_gru2_input_weights_int8},
#endif #endif
#ifdef WEIGHTS_sig_net_gru2_input_weights_float_DEFINED #ifdef WEIGHTS_sig_net_gru2_input_weights_float_DEFINED
{"sig_net_gru2_input_weights_float", WEIGHTS_sig_net_gru2_input_weights_float_TYPE,sizeof(sig_net_gru2_input_weights_float),sig_net_gru2_input_weights_float}, {"sig_net_gru2_input_weights_float",WEIGHTS_sig_net_gru2_input_weights_float_TYPE,sizeof(sig_net_gru2_input_weights_float),sig_net_gru2_input_weights_float},
#endif #endif
#ifdef WEIGHTS_sig_net_gru2_input_subias_DEFINED #ifdef WEIGHTS_sig_net_gru2_input_subias_DEFINED
{"sig_net_gru2_input_subias", WEIGHTS_sig_net_gru2_input_subias_TYPE,sizeof(sig_net_gru2_input_subias),sig_net_gru2_input_subias}, {"sig_net_gru2_input_subias",WEIGHTS_sig_net_gru2_input_subias_TYPE,sizeof(sig_net_gru2_input_subias),sig_net_gru2_input_subias},
#endif #endif
#ifdef WEIGHTS_sig_net_gru2_input_scale_DEFINED #ifdef WEIGHTS_sig_net_gru2_input_scale_DEFINED
{"sig_net_gru2_input_scale", WEIGHTS_sig_net_gru2_input_scale_TYPE,sizeof(sig_net_gru2_input_scale),sig_net_gru2_input_scale}, {"sig_net_gru2_input_scale",WEIGHTS_sig_net_gru2_input_scale_TYPE,sizeof(sig_net_gru2_input_scale),sig_net_gru2_input_scale},
#endif #endif
#ifdef WEIGHTS_sig_net_gru2_recurrent_weights_int8_DEFINED #ifdef WEIGHTS_sig_net_gru2_recurrent_weights_int8_DEFINED
{"sig_net_gru2_recurrent_weights_int8", WEIGHTS_sig_net_gru2_recurrent_weights_int8_TYPE,sizeof(sig_net_gru2_recurrent_weights_int8),sig_net_gru2_recurrent_weights_int8}, {"sig_net_gru2_recurrent_weights_int8",WEIGHTS_sig_net_gru2_recurrent_weights_int8_TYPE,sizeof(sig_net_gru2_recurrent_weights_int8),sig_net_gru2_recurrent_weights_int8},
#endif #endif
#ifdef WEIGHTS_sig_net_gru2_recurrent_weights_float_DEFINED #ifdef WEIGHTS_sig_net_gru2_recurrent_weights_float_DEFINED
{"sig_net_gru2_recurrent_weights_float", WEIGHTS_sig_net_gru2_recurrent_weights_float_TYPE,sizeof(sig_net_gru2_recurrent_weights_float),sig_net_gru2_recurrent_weights_float}, {"sig_net_gru2_recurrent_weights_float",WEIGHTS_sig_net_gru2_recurrent_weights_float_TYPE,sizeof(sig_net_gru2_recurrent_weights_float),sig_net_gru2_recurrent_weights_float},
#endif #endif
#ifdef WEIGHTS_sig_net_gru2_recurrent_subias_DEFINED #ifdef WEIGHTS_sig_net_gru2_recurrent_subias_DEFINED
{"sig_net_gru2_recurrent_subias", WEIGHTS_sig_net_gru2_recurrent_subias_TYPE,sizeof(sig_net_gru2_recurrent_subias),sig_net_gru2_recurrent_subias}, {"sig_net_gru2_recurrent_subias",WEIGHTS_sig_net_gru2_recurrent_subias_TYPE,sizeof(sig_net_gru2_recurrent_subias),sig_net_gru2_recurrent_subias},
#endif #endif
#ifdef WEIGHTS_sig_net_gru2_recurrent_scale_DEFINED #ifdef WEIGHTS_sig_net_gru2_recurrent_scale_DEFINED
{"sig_net_gru2_recurrent_scale", WEIGHTS_sig_net_gru2_recurrent_scale_TYPE,sizeof(sig_net_gru2_recurrent_scale),sig_net_gru2_recurrent_scale}, {"sig_net_gru2_recurrent_scale",WEIGHTS_sig_net_gru2_recurrent_scale_TYPE,sizeof(sig_net_gru2_recurrent_scale),sig_net_gru2_recurrent_scale},
#endif #endif
#ifdef WEIGHTS_sig_net_gru3_input_weights_int8_DEFINED #ifdef WEIGHTS_sig_net_gru3_input_weights_int8_DEFINED
{"sig_net_gru3_input_weights_int8", WEIGHTS_sig_net_gru3_input_weights_int8_TYPE,sizeof(sig_net_gru3_input_weights_int8),sig_net_gru3_input_weights_int8}, {"sig_net_gru3_input_weights_int8",WEIGHTS_sig_net_gru3_input_weights_int8_TYPE,sizeof(sig_net_gru3_input_weights_int8),sig_net_gru3_input_weights_int8},
#endif #endif
#ifdef WEIGHTS_sig_net_gru3_input_weights_float_DEFINED #ifdef WEIGHTS_sig_net_gru3_input_weights_float_DEFINED
{"sig_net_gru3_input_weights_float", WEIGHTS_sig_net_gru3_input_weights_float_TYPE,sizeof(sig_net_gru3_input_weights_float),sig_net_gru3_input_weights_float}, {"sig_net_gru3_input_weights_float",WEIGHTS_sig_net_gru3_input_weights_float_TYPE,sizeof(sig_net_gru3_input_weights_float),sig_net_gru3_input_weights_float},
#endif #endif
#ifdef WEIGHTS_sig_net_gru3_input_subias_DEFINED #ifdef WEIGHTS_sig_net_gru3_input_subias_DEFINED
{"sig_net_gru3_input_subias", WEIGHTS_sig_net_gru3_input_subias_TYPE,sizeof(sig_net_gru3_input_subias),sig_net_gru3_input_subias}, {"sig_net_gru3_input_subias",WEIGHTS_sig_net_gru3_input_subias_TYPE,sizeof(sig_net_gru3_input_subias),sig_net_gru3_input_subias},
#endif #endif
#ifdef WEIGHTS_sig_net_gru3_input_scale_DEFINED #ifdef WEIGHTS_sig_net_gru3_input_scale_DEFINED
{"sig_net_gru3_input_scale", WEIGHTS_sig_net_gru3_input_scale_TYPE,sizeof(sig_net_gru3_input_scale),sig_net_gru3_input_scale}, {"sig_net_gru3_input_scale",WEIGHTS_sig_net_gru3_input_scale_TYPE,sizeof(sig_net_gru3_input_scale),sig_net_gru3_input_scale},
#endif #endif
#ifdef WEIGHTS_sig_net_gru3_recurrent_weights_int8_DEFINED #ifdef WEIGHTS_sig_net_gru3_recurrent_weights_int8_DEFINED
{"sig_net_gru3_recurrent_weights_int8", WEIGHTS_sig_net_gru3_recurrent_weights_int8_TYPE,sizeof(sig_net_gru3_recurrent_weights_int8),sig_net_gru3_recurrent_weights_int8}, {"sig_net_gru3_recurrent_weights_int8",WEIGHTS_sig_net_gru3_recurrent_weights_int8_TYPE,sizeof(sig_net_gru3_recurrent_weights_int8),sig_net_gru3_recurrent_weights_int8},
#endif #endif
#ifdef WEIGHTS_sig_net_gru3_recurrent_weights_float_DEFINED #ifdef WEIGHTS_sig_net_gru3_recurrent_weights_float_DEFINED
{"sig_net_gru3_recurrent_weights_float", WEIGHTS_sig_net_gru3_recurrent_weights_float_TYPE,sizeof(sig_net_gru3_recurrent_weights_float),sig_net_gru3_recurrent_weights_float}, {"sig_net_gru3_recurrent_weights_float",WEIGHTS_sig_net_gru3_recurrent_weights_float_TYPE,sizeof(sig_net_gru3_recurrent_weights_float),sig_net_gru3_recurrent_weights_float},
#endif #endif
#ifdef WEIGHTS_sig_net_gru3_recurrent_subias_DEFINED #ifdef WEIGHTS_sig_net_gru3_recurrent_subias_DEFINED
{"sig_net_gru3_recurrent_subias", WEIGHTS_sig_net_gru3_recurrent_subias_TYPE,sizeof(sig_net_gru3_recurrent_subias),sig_net_gru3_recurrent_subias}, {"sig_net_gru3_recurrent_subias",WEIGHTS_sig_net_gru3_recurrent_subias_TYPE,sizeof(sig_net_gru3_recurrent_subias),sig_net_gru3_recurrent_subias},
#endif #endif
#ifdef WEIGHTS_sig_net_gru3_recurrent_scale_DEFINED #ifdef WEIGHTS_sig_net_gru3_recurrent_scale_DEFINED
{"sig_net_gru3_recurrent_scale", WEIGHTS_sig_net_gru3_recurrent_scale_TYPE,sizeof(sig_net_gru3_recurrent_scale),sig_net_gru3_recurrent_scale}, {"sig_net_gru3_recurrent_scale",WEIGHTS_sig_net_gru3_recurrent_scale_TYPE,sizeof(sig_net_gru3_recurrent_scale),sig_net_gru3_recurrent_scale},
#endif #endif
#ifdef WEIGHTS_sig_net_gru1_glu_gate_weights_int8_DEFINED #ifdef WEIGHTS_sig_net_gru1_glu_gate_weights_int8_DEFINED
{"sig_net_gru1_glu_gate_weights_int8", WEIGHTS_sig_net_gru1_glu_gate_weights_int8_TYPE,sizeof(sig_net_gru1_glu_gate_weights_int8),sig_net_gru1_glu_gate_weights_int8}, {"sig_net_gru1_glu_gate_weights_int8",WEIGHTS_sig_net_gru1_glu_gate_weights_int8_TYPE,sizeof(sig_net_gru1_glu_gate_weights_int8),sig_net_gru1_glu_gate_weights_int8},
#endif #endif
#ifdef WEIGHTS_sig_net_gru1_glu_gate_weights_float_DEFINED #ifdef WEIGHTS_sig_net_gru1_glu_gate_weights_float_DEFINED
{"sig_net_gru1_glu_gate_weights_float", WEIGHTS_sig_net_gru1_glu_gate_weights_float_TYPE,sizeof(sig_net_gru1_glu_gate_weights_float),sig_net_gru1_glu_gate_weights_float}, {"sig_net_gru1_glu_gate_weights_float",WEIGHTS_sig_net_gru1_glu_gate_weights_float_TYPE,sizeof(sig_net_gru1_glu_gate_weights_float),sig_net_gru1_glu_gate_weights_float},
#endif #endif
#ifdef WEIGHTS_sig_net_gru1_glu_gate_subias_DEFINED #ifdef WEIGHTS_sig_net_gru1_glu_gate_subias_DEFINED
{"sig_net_gru1_glu_gate_subias", WEIGHTS_sig_net_gru1_glu_gate_subias_TYPE,sizeof(sig_net_gru1_glu_gate_subias),sig_net_gru1_glu_gate_subias}, {"sig_net_gru1_glu_gate_subias",WEIGHTS_sig_net_gru1_glu_gate_subias_TYPE,sizeof(sig_net_gru1_glu_gate_subias),sig_net_gru1_glu_gate_subias},
#endif #endif
#ifdef WEIGHTS_sig_net_gru1_glu_gate_scale_DEFINED #ifdef WEIGHTS_sig_net_gru1_glu_gate_scale_DEFINED
{"sig_net_gru1_glu_gate_scale", WEIGHTS_sig_net_gru1_glu_gate_scale_TYPE,sizeof(sig_net_gru1_glu_gate_scale),sig_net_gru1_glu_gate_scale}, {"sig_net_gru1_glu_gate_scale",WEIGHTS_sig_net_gru1_glu_gate_scale_TYPE,sizeof(sig_net_gru1_glu_gate_scale),sig_net_gru1_glu_gate_scale},
#endif #endif
#ifdef WEIGHTS_sig_net_gru1_glu_gate_bias_DEFINED #ifdef WEIGHTS_sig_net_gru1_glu_gate_bias_DEFINED
{"sig_net_gru1_glu_gate_bias", WEIGHTS_sig_net_gru1_glu_gate_bias_TYPE,sizeof(sig_net_gru1_glu_gate_bias),sig_net_gru1_glu_gate_bias}, {"sig_net_gru1_glu_gate_bias",WEIGHTS_sig_net_gru1_glu_gate_bias_TYPE,sizeof(sig_net_gru1_glu_gate_bias),sig_net_gru1_glu_gate_bias},
#endif #endif
#ifdef WEIGHTS_sig_net_gru2_glu_gate_weights_int8_DEFINED #ifdef WEIGHTS_sig_net_gru2_glu_gate_weights_int8_DEFINED
{"sig_net_gru2_glu_gate_weights_int8", WEIGHTS_sig_net_gru2_glu_gate_weights_int8_TYPE,sizeof(sig_net_gru2_glu_gate_weights_int8),sig_net_gru2_glu_gate_weights_int8}, {"sig_net_gru2_glu_gate_weights_int8",WEIGHTS_sig_net_gru2_glu_gate_weights_int8_TYPE,sizeof(sig_net_gru2_glu_gate_weights_int8),sig_net_gru2_glu_gate_weights_int8},
#endif #endif
#ifdef WEIGHTS_sig_net_gru2_glu_gate_weights_float_DEFINED #ifdef WEIGHTS_sig_net_gru2_glu_gate_weights_float_DEFINED
{"sig_net_gru2_glu_gate_weights_float", WEIGHTS_sig_net_gru2_glu_gate_weights_float_TYPE,sizeof(sig_net_gru2_glu_gate_weights_float),sig_net_gru2_glu_gate_weights_float}, {"sig_net_gru2_glu_gate_weights_float",WEIGHTS_sig_net_gru2_glu_gate_weights_float_TYPE,sizeof(sig_net_gru2_glu_gate_weights_float),sig_net_gru2_glu_gate_weights_float},
#endif #endif
#ifdef WEIGHTS_sig_net_gru2_glu_gate_subias_DEFINED #ifdef WEIGHTS_sig_net_gru2_glu_gate_subias_DEFINED
{"sig_net_gru2_glu_gate_subias", WEIGHTS_sig_net_gru2_glu_gate_subias_TYPE,sizeof(sig_net_gru2_glu_gate_subias),sig_net_gru2_glu_gate_subias}, {"sig_net_gru2_glu_gate_subias",WEIGHTS_sig_net_gru2_glu_gate_subias_TYPE,sizeof(sig_net_gru2_glu_gate_subias),sig_net_gru2_glu_gate_subias},
#endif #endif
#ifdef WEIGHTS_sig_net_gru2_glu_gate_scale_DEFINED #ifdef WEIGHTS_sig_net_gru2_glu_gate_scale_DEFINED
{"sig_net_gru2_glu_gate_scale", WEIGHTS_sig_net_gru2_glu_gate_scale_TYPE,sizeof(sig_net_gru2_glu_gate_scale),sig_net_gru2_glu_gate_scale}, {"sig_net_gru2_glu_gate_scale",WEIGHTS_sig_net_gru2_glu_gate_scale_TYPE,sizeof(sig_net_gru2_glu_gate_scale),sig_net_gru2_glu_gate_scale},
#endif #endif
#ifdef WEIGHTS_sig_net_gru2_glu_gate_bias_DEFINED #ifdef WEIGHTS_sig_net_gru2_glu_gate_bias_DEFINED
{"sig_net_gru2_glu_gate_bias", WEIGHTS_sig_net_gru2_glu_gate_bias_TYPE,sizeof(sig_net_gru2_glu_gate_bias),sig_net_gru2_glu_gate_bias}, {"sig_net_gru2_glu_gate_bias",WEIGHTS_sig_net_gru2_glu_gate_bias_TYPE,sizeof(sig_net_gru2_glu_gate_bias),sig_net_gru2_glu_gate_bias},
#endif #endif
#ifdef WEIGHTS_sig_net_gru3_glu_gate_weights_int8_DEFINED #ifdef WEIGHTS_sig_net_gru3_glu_gate_weights_int8_DEFINED
{"sig_net_gru3_glu_gate_weights_int8", WEIGHTS_sig_net_gru3_glu_gate_weights_int8_TYPE,sizeof(sig_net_gru3_glu_gate_weights_int8),sig_net_gru3_glu_gate_weights_int8}, {"sig_net_gru3_glu_gate_weights_int8",WEIGHTS_sig_net_gru3_glu_gate_weights_int8_TYPE,sizeof(sig_net_gru3_glu_gate_weights_int8),sig_net_gru3_glu_gate_weights_int8},
#endif #endif
#ifdef WEIGHTS_sig_net_gru3_glu_gate_weights_float_DEFINED #ifdef WEIGHTS_sig_net_gru3_glu_gate_weights_float_DEFINED
{"sig_net_gru3_glu_gate_weights_float", WEIGHTS_sig_net_gru3_glu_gate_weights_float_TYPE,sizeof(sig_net_gru3_glu_gate_weights_float),sig_net_gru3_glu_gate_weights_float}, {"sig_net_gru3_glu_gate_weights_float",WEIGHTS_sig_net_gru3_glu_gate_weights_float_TYPE,sizeof(sig_net_gru3_glu_gate_weights_float),sig_net_gru3_glu_gate_weights_float},
#endif #endif
#ifdef WEIGHTS_sig_net_gru3_glu_gate_subias_DEFINED #ifdef WEIGHTS_sig_net_gru3_glu_gate_subias_DEFINED
{"sig_net_gru3_glu_gate_subias", WEIGHTS_sig_net_gru3_glu_gate_subias_TYPE,sizeof(sig_net_gru3_glu_gate_subias),sig_net_gru3_glu_gate_subias}, {"sig_net_gru3_glu_gate_subias",WEIGHTS_sig_net_gru3_glu_gate_subias_TYPE,sizeof(sig_net_gru3_glu_gate_subias),sig_net_gru3_glu_gate_subias},
#endif #endif
#ifdef WEIGHTS_sig_net_gru3_glu_gate_scale_DEFINED #ifdef WEIGHTS_sig_net_gru3_glu_gate_scale_DEFINED
{"sig_net_gru3_glu_gate_scale", WEIGHTS_sig_net_gru3_glu_gate_scale_TYPE,sizeof(sig_net_gru3_glu_gate_scale),sig_net_gru3_glu_gate_scale}, {"sig_net_gru3_glu_gate_scale",WEIGHTS_sig_net_gru3_glu_gate_scale_TYPE,sizeof(sig_net_gru3_glu_gate_scale),sig_net_gru3_glu_gate_scale},
#endif #endif
#ifdef WEIGHTS_sig_net_gru3_glu_gate_bias_DEFINED #ifdef WEIGHTS_sig_net_gru3_glu_gate_bias_DEFINED
{"sig_net_gru3_glu_gate_bias", WEIGHTS_sig_net_gru3_glu_gate_bias_TYPE,sizeof(sig_net_gru3_glu_gate_bias),sig_net_gru3_glu_gate_bias}, {"sig_net_gru3_glu_gate_bias",WEIGHTS_sig_net_gru3_glu_gate_bias_TYPE,sizeof(sig_net_gru3_glu_gate_bias),sig_net_gru3_glu_gate_bias},
#endif #endif
#ifdef WEIGHTS_sig_net_skip_glu_gate_weights_int8_DEFINED #ifdef WEIGHTS_sig_net_skip_glu_gate_weights_int8_DEFINED
{"sig_net_skip_glu_gate_weights_int8", WEIGHTS_sig_net_skip_glu_gate_weights_int8_TYPE,sizeof(sig_net_skip_glu_gate_weights_int8),sig_net_skip_glu_gate_weights_int8}, {"sig_net_skip_glu_gate_weights_int8",WEIGHTS_sig_net_skip_glu_gate_weights_int8_TYPE,sizeof(sig_net_skip_glu_gate_weights_int8),sig_net_skip_glu_gate_weights_int8},
#endif #endif
#ifdef WEIGHTS_sig_net_skip_glu_gate_weights_float_DEFINED #ifdef WEIGHTS_sig_net_skip_glu_gate_weights_float_DEFINED
{"sig_net_skip_glu_gate_weights_float", WEIGHTS_sig_net_skip_glu_gate_weights_float_TYPE,sizeof(sig_net_skip_glu_gate_weights_float),sig_net_skip_glu_gate_weights_float}, {"sig_net_skip_glu_gate_weights_float",WEIGHTS_sig_net_skip_glu_gate_weights_float_TYPE,sizeof(sig_net_skip_glu_gate_weights_float),sig_net_skip_glu_gate_weights_float},
#endif #endif
#ifdef WEIGHTS_sig_net_skip_glu_gate_subias_DEFINED #ifdef WEIGHTS_sig_net_skip_glu_gate_subias_DEFINED
{"sig_net_skip_glu_gate_subias", WEIGHTS_sig_net_skip_glu_gate_subias_TYPE,sizeof(sig_net_skip_glu_gate_subias),sig_net_skip_glu_gate_subias}, {"sig_net_skip_glu_gate_subias",WEIGHTS_sig_net_skip_glu_gate_subias_TYPE,sizeof(sig_net_skip_glu_gate_subias),sig_net_skip_glu_gate_subias},
#endif #endif
#ifdef WEIGHTS_sig_net_skip_glu_gate_scale_DEFINED #ifdef WEIGHTS_sig_net_skip_glu_gate_scale_DEFINED
{"sig_net_skip_glu_gate_scale", WEIGHTS_sig_net_skip_glu_gate_scale_TYPE,sizeof(sig_net_skip_glu_gate_scale),sig_net_skip_glu_gate_scale}, {"sig_net_skip_glu_gate_scale",WEIGHTS_sig_net_skip_glu_gate_scale_TYPE,sizeof(sig_net_skip_glu_gate_scale),sig_net_skip_glu_gate_scale},
#endif #endif
#ifdef WEIGHTS_sig_net_skip_glu_gate_bias_DEFINED #ifdef WEIGHTS_sig_net_skip_glu_gate_bias_DEFINED
{"sig_net_skip_glu_gate_bias", WEIGHTS_sig_net_skip_glu_gate_bias_TYPE,sizeof(sig_net_skip_glu_gate_bias),sig_net_skip_glu_gate_bias}, {"sig_net_skip_glu_gate_bias",WEIGHTS_sig_net_skip_glu_gate_bias_TYPE,sizeof(sig_net_skip_glu_gate_bias),sig_net_skip_glu_gate_bias},
#endif #endif
#ifdef WEIGHTS_sig_net_skip_dense_weights_int8_DEFINED #ifdef WEIGHTS_sig_net_skip_dense_weights_int8_DEFINED
{"sig_net_skip_dense_weights_int8", WEIGHTS_sig_net_skip_dense_weights_int8_TYPE,sizeof(sig_net_skip_dense_weights_int8),sig_net_skip_dense_weights_int8}, {"sig_net_skip_dense_weights_int8",WEIGHTS_sig_net_skip_dense_weights_int8_TYPE,sizeof(sig_net_skip_dense_weights_int8),sig_net_skip_dense_weights_int8},
#endif #endif
#ifdef WEIGHTS_sig_net_skip_dense_weights_float_DEFINED #ifdef WEIGHTS_sig_net_skip_dense_weights_float_DEFINED
{"sig_net_skip_dense_weights_float", WEIGHTS_sig_net_skip_dense_weights_float_TYPE,sizeof(sig_net_skip_dense_weights_float),sig_net_skip_dense_weights_float}, {"sig_net_skip_dense_weights_float",WEIGHTS_sig_net_skip_dense_weights_float_TYPE,sizeof(sig_net_skip_dense_weights_float),sig_net_skip_dense_weights_float},
#endif #endif
#ifdef WEIGHTS_sig_net_skip_dense_subias_DEFINED #ifdef WEIGHTS_sig_net_skip_dense_subias_DEFINED
{"sig_net_skip_dense_subias", WEIGHTS_sig_net_skip_dense_subias_TYPE,sizeof(sig_net_skip_dense_subias),sig_net_skip_dense_subias}, {"sig_net_skip_dense_subias",WEIGHTS_sig_net_skip_dense_subias_TYPE,sizeof(sig_net_skip_dense_subias),sig_net_skip_dense_subias},
#endif #endif
#ifdef WEIGHTS_sig_net_skip_dense_scale_DEFINED #ifdef WEIGHTS_sig_net_skip_dense_scale_DEFINED
{"sig_net_skip_dense_scale", WEIGHTS_sig_net_skip_dense_scale_TYPE,sizeof(sig_net_skip_dense_scale),sig_net_skip_dense_scale}, {"sig_net_skip_dense_scale",WEIGHTS_sig_net_skip_dense_scale_TYPE,sizeof(sig_net_skip_dense_scale),sig_net_skip_dense_scale},
#endif #endif
#ifdef WEIGHTS_sig_net_skip_dense_bias_DEFINED #ifdef WEIGHTS_sig_net_skip_dense_bias_DEFINED
{"sig_net_skip_dense_bias", WEIGHTS_sig_net_skip_dense_bias_TYPE,sizeof(sig_net_skip_dense_bias),sig_net_skip_dense_bias}, {"sig_net_skip_dense_bias",WEIGHTS_sig_net_skip_dense_bias_TYPE,sizeof(sig_net_skip_dense_bias),sig_net_skip_dense_bias},
#endif #endif
#ifdef WEIGHTS_sig_net_sig_dense_out_weights_int8_DEFINED #ifdef WEIGHTS_sig_net_sig_dense_out_weights_int8_DEFINED
{"sig_net_sig_dense_out_weights_int8", WEIGHTS_sig_net_sig_dense_out_weights_int8_TYPE,sizeof(sig_net_sig_dense_out_weights_int8),sig_net_sig_dense_out_weights_int8}, {"sig_net_sig_dense_out_weights_int8",WEIGHTS_sig_net_sig_dense_out_weights_int8_TYPE,sizeof(sig_net_sig_dense_out_weights_int8),sig_net_sig_dense_out_weights_int8},
#endif #endif
#ifdef WEIGHTS_sig_net_sig_dense_out_weights_float_DEFINED #ifdef WEIGHTS_sig_net_sig_dense_out_weights_float_DEFINED
{"sig_net_sig_dense_out_weights_float", WEIGHTS_sig_net_sig_dense_out_weights_float_TYPE,sizeof(sig_net_sig_dense_out_weights_float),sig_net_sig_dense_out_weights_float}, {"sig_net_sig_dense_out_weights_float",WEIGHTS_sig_net_sig_dense_out_weights_float_TYPE,sizeof(sig_net_sig_dense_out_weights_float),sig_net_sig_dense_out_weights_float},
#endif #endif
#ifdef WEIGHTS_sig_net_sig_dense_out_subias_DEFINED #ifdef WEIGHTS_sig_net_sig_dense_out_subias_DEFINED
{"sig_net_sig_dense_out_subias", WEIGHTS_sig_net_sig_dense_out_subias_TYPE,sizeof(sig_net_sig_dense_out_subias),sig_net_sig_dense_out_subias}, {"sig_net_sig_dense_out_subias",WEIGHTS_sig_net_sig_dense_out_subias_TYPE,sizeof(sig_net_sig_dense_out_subias),sig_net_sig_dense_out_subias},
#endif #endif
#ifdef WEIGHTS_sig_net_sig_dense_out_scale_DEFINED #ifdef WEIGHTS_sig_net_sig_dense_out_scale_DEFINED
{"sig_net_sig_dense_out_scale", WEIGHTS_sig_net_sig_dense_out_scale_TYPE,sizeof(sig_net_sig_dense_out_scale),sig_net_sig_dense_out_scale}, {"sig_net_sig_dense_out_scale",WEIGHTS_sig_net_sig_dense_out_scale_TYPE,sizeof(sig_net_sig_dense_out_scale),sig_net_sig_dense_out_scale},
#endif #endif
#ifdef WEIGHTS_sig_net_sig_dense_out_bias_DEFINED #ifdef WEIGHTS_sig_net_sig_dense_out_bias_DEFINED
{"sig_net_sig_dense_out_bias", WEIGHTS_sig_net_sig_dense_out_bias_TYPE,sizeof(sig_net_sig_dense_out_bias),sig_net_sig_dense_out_bias}, {"sig_net_sig_dense_out_bias",WEIGHTS_sig_net_sig_dense_out_bias_TYPE,sizeof(sig_net_sig_dense_out_bias),sig_net_sig_dense_out_bias},
#endif #endif
#ifdef WEIGHTS_sig_net_gain_dense_out_weights_float_DEFINED #ifdef WEIGHTS_sig_net_gain_dense_out_weights_float_DEFINED
{"sig_net_gain_dense_out_weights_float", WEIGHTS_sig_net_gain_dense_out_weights_float_TYPE,sizeof(sig_net_gain_dense_out_weights_float),sig_net_gain_dense_out_weights_float}, {"sig_net_gain_dense_out_weights_float",WEIGHTS_sig_net_gain_dense_out_weights_float_TYPE,sizeof(sig_net_gain_dense_out_weights_float),sig_net_gain_dense_out_weights_float},
#endif #endif
#ifdef WEIGHTS_sig_net_gain_dense_out_bias_DEFINED #ifdef WEIGHTS_sig_net_gain_dense_out_bias_DEFINED
{"sig_net_gain_dense_out_bias", WEIGHTS_sig_net_gain_dense_out_bias_TYPE,sizeof(sig_net_gain_dense_out_bias),sig_net_gain_dense_out_bias}, {"sig_net_gain_dense_out_bias",WEIGHTS_sig_net_gain_dense_out_bias_TYPE,sizeof(sig_net_gain_dense_out_bias),sig_net_gain_dense_out_bias},
#endif #endif
{NULL,0,0,NULL} {NULL,0,0,NULL}
}; };

View File

@ -39130,151 +39130,151 @@ static const float lace_af1_gain_bias[1] = {
#ifndef USE_WEIGHTS_FILE #ifndef USE_WEIGHTS_FILE
const WeightArray lacelayers_arrays[] = { const WeightArray lacelayers_arrays[] = {
#ifdef WEIGHTS_lace_pitch_embedding_weights_float_DEFINED #ifdef WEIGHTS_lace_pitch_embedding_weights_float_DEFINED
{"lace_pitch_embedding_weights_float", WEIGHTS_lace_pitch_embedding_weights_float_TYPE,sizeof(lace_pitch_embedding_weights_float),lace_pitch_embedding_weights_float}, {"lace_pitch_embedding_weights_float",WEIGHTS_lace_pitch_embedding_weights_float_TYPE,sizeof(lace_pitch_embedding_weights_float),lace_pitch_embedding_weights_float},
#endif #endif
#ifdef WEIGHTS_lace_pitch_embedding_bias_DEFINED #ifdef WEIGHTS_lace_pitch_embedding_bias_DEFINED
{"lace_pitch_embedding_bias", WEIGHTS_lace_pitch_embedding_bias_TYPE,sizeof(lace_pitch_embedding_bias),lace_pitch_embedding_bias}, {"lace_pitch_embedding_bias",WEIGHTS_lace_pitch_embedding_bias_TYPE,sizeof(lace_pitch_embedding_bias),lace_pitch_embedding_bias},
#endif #endif
#ifdef WEIGHTS_lace_fnet_conv1_weights_float_DEFINED #ifdef WEIGHTS_lace_fnet_conv1_weights_float_DEFINED
{"lace_fnet_conv1_weights_float", WEIGHTS_lace_fnet_conv1_weights_float_TYPE,sizeof(lace_fnet_conv1_weights_float),lace_fnet_conv1_weights_float}, {"lace_fnet_conv1_weights_float",WEIGHTS_lace_fnet_conv1_weights_float_TYPE,sizeof(lace_fnet_conv1_weights_float),lace_fnet_conv1_weights_float},
#endif #endif
#ifdef WEIGHTS_lace_fnet_conv1_bias_DEFINED #ifdef WEIGHTS_lace_fnet_conv1_bias_DEFINED
{"lace_fnet_conv1_bias", WEIGHTS_lace_fnet_conv1_bias_TYPE,sizeof(lace_fnet_conv1_bias),lace_fnet_conv1_bias}, {"lace_fnet_conv1_bias",WEIGHTS_lace_fnet_conv1_bias_TYPE,sizeof(lace_fnet_conv1_bias),lace_fnet_conv1_bias},
#endif #endif
#ifdef WEIGHTS_lace_fnet_conv2_weights_int8_DEFINED #ifdef WEIGHTS_lace_fnet_conv2_weights_int8_DEFINED
{"lace_fnet_conv2_weights_int8", WEIGHTS_lace_fnet_conv2_weights_int8_TYPE,sizeof(lace_fnet_conv2_weights_int8),lace_fnet_conv2_weights_int8}, {"lace_fnet_conv2_weights_int8",WEIGHTS_lace_fnet_conv2_weights_int8_TYPE,sizeof(lace_fnet_conv2_weights_int8),lace_fnet_conv2_weights_int8},
#endif #endif
#ifdef WEIGHTS_lace_fnet_conv2_weights_float_DEFINED #ifdef WEIGHTS_lace_fnet_conv2_weights_float_DEFINED
{"lace_fnet_conv2_weights_float", WEIGHTS_lace_fnet_conv2_weights_float_TYPE,sizeof(lace_fnet_conv2_weights_float),lace_fnet_conv2_weights_float}, {"lace_fnet_conv2_weights_float",WEIGHTS_lace_fnet_conv2_weights_float_TYPE,sizeof(lace_fnet_conv2_weights_float),lace_fnet_conv2_weights_float},
#endif #endif
#ifdef WEIGHTS_lace_fnet_conv2_subias_DEFINED #ifdef WEIGHTS_lace_fnet_conv2_subias_DEFINED
{"lace_fnet_conv2_subias", WEIGHTS_lace_fnet_conv2_subias_TYPE,sizeof(lace_fnet_conv2_subias),lace_fnet_conv2_subias}, {"lace_fnet_conv2_subias",WEIGHTS_lace_fnet_conv2_subias_TYPE,sizeof(lace_fnet_conv2_subias),lace_fnet_conv2_subias},
#endif #endif
#ifdef WEIGHTS_lace_fnet_conv2_scale_DEFINED #ifdef WEIGHTS_lace_fnet_conv2_scale_DEFINED
{"lace_fnet_conv2_scale", WEIGHTS_lace_fnet_conv2_scale_TYPE,sizeof(lace_fnet_conv2_scale),lace_fnet_conv2_scale}, {"lace_fnet_conv2_scale",WEIGHTS_lace_fnet_conv2_scale_TYPE,sizeof(lace_fnet_conv2_scale),lace_fnet_conv2_scale},
#endif #endif
#ifdef WEIGHTS_lace_fnet_conv2_bias_DEFINED #ifdef WEIGHTS_lace_fnet_conv2_bias_DEFINED
{"lace_fnet_conv2_bias", WEIGHTS_lace_fnet_conv2_bias_TYPE,sizeof(lace_fnet_conv2_bias),lace_fnet_conv2_bias}, {"lace_fnet_conv2_bias",WEIGHTS_lace_fnet_conv2_bias_TYPE,sizeof(lace_fnet_conv2_bias),lace_fnet_conv2_bias},
#endif #endif
#ifdef WEIGHTS_lace_fnet_tconv_weights_int8_DEFINED #ifdef WEIGHTS_lace_fnet_tconv_weights_int8_DEFINED
{"lace_fnet_tconv_weights_int8", WEIGHTS_lace_fnet_tconv_weights_int8_TYPE,sizeof(lace_fnet_tconv_weights_int8),lace_fnet_tconv_weights_int8}, {"lace_fnet_tconv_weights_int8",WEIGHTS_lace_fnet_tconv_weights_int8_TYPE,sizeof(lace_fnet_tconv_weights_int8),lace_fnet_tconv_weights_int8},
#endif #endif
#ifdef WEIGHTS_lace_fnet_tconv_weights_float_DEFINED #ifdef WEIGHTS_lace_fnet_tconv_weights_float_DEFINED
{"lace_fnet_tconv_weights_float", WEIGHTS_lace_fnet_tconv_weights_float_TYPE,sizeof(lace_fnet_tconv_weights_float),lace_fnet_tconv_weights_float}, {"lace_fnet_tconv_weights_float",WEIGHTS_lace_fnet_tconv_weights_float_TYPE,sizeof(lace_fnet_tconv_weights_float),lace_fnet_tconv_weights_float},
#endif #endif
#ifdef WEIGHTS_lace_fnet_tconv_subias_DEFINED #ifdef WEIGHTS_lace_fnet_tconv_subias_DEFINED
{"lace_fnet_tconv_subias", WEIGHTS_lace_fnet_tconv_subias_TYPE,sizeof(lace_fnet_tconv_subias),lace_fnet_tconv_subias}, {"lace_fnet_tconv_subias",WEIGHTS_lace_fnet_tconv_subias_TYPE,sizeof(lace_fnet_tconv_subias),lace_fnet_tconv_subias},
#endif #endif
#ifdef WEIGHTS_lace_fnet_tconv_scale_DEFINED #ifdef WEIGHTS_lace_fnet_tconv_scale_DEFINED
{"lace_fnet_tconv_scale", WEIGHTS_lace_fnet_tconv_scale_TYPE,sizeof(lace_fnet_tconv_scale),lace_fnet_tconv_scale}, {"lace_fnet_tconv_scale",WEIGHTS_lace_fnet_tconv_scale_TYPE,sizeof(lace_fnet_tconv_scale),lace_fnet_tconv_scale},
#endif #endif
#ifdef WEIGHTS_lace_fnet_tconv_bias_DEFINED #ifdef WEIGHTS_lace_fnet_tconv_bias_DEFINED
{"lace_fnet_tconv_bias", WEIGHTS_lace_fnet_tconv_bias_TYPE,sizeof(lace_fnet_tconv_bias),lace_fnet_tconv_bias}, {"lace_fnet_tconv_bias",WEIGHTS_lace_fnet_tconv_bias_TYPE,sizeof(lace_fnet_tconv_bias),lace_fnet_tconv_bias},
#endif #endif
#ifdef WEIGHTS_lace_fnet_gru_input_weights_int8_DEFINED #ifdef WEIGHTS_lace_fnet_gru_input_weights_int8_DEFINED
{"lace_fnet_gru_input_weights_int8", WEIGHTS_lace_fnet_gru_input_weights_int8_TYPE,sizeof(lace_fnet_gru_input_weights_int8),lace_fnet_gru_input_weights_int8}, {"lace_fnet_gru_input_weights_int8",WEIGHTS_lace_fnet_gru_input_weights_int8_TYPE,sizeof(lace_fnet_gru_input_weights_int8),lace_fnet_gru_input_weights_int8},
#endif #endif
#ifdef WEIGHTS_lace_fnet_gru_input_weights_float_DEFINED #ifdef WEIGHTS_lace_fnet_gru_input_weights_float_DEFINED
{"lace_fnet_gru_input_weights_float", WEIGHTS_lace_fnet_gru_input_weights_float_TYPE,sizeof(lace_fnet_gru_input_weights_float),lace_fnet_gru_input_weights_float}, {"lace_fnet_gru_input_weights_float",WEIGHTS_lace_fnet_gru_input_weights_float_TYPE,sizeof(lace_fnet_gru_input_weights_float),lace_fnet_gru_input_weights_float},
#endif #endif
#ifdef WEIGHTS_lace_fnet_gru_input_subias_DEFINED #ifdef WEIGHTS_lace_fnet_gru_input_subias_DEFINED
{"lace_fnet_gru_input_subias", WEIGHTS_lace_fnet_gru_input_subias_TYPE,sizeof(lace_fnet_gru_input_subias),lace_fnet_gru_input_subias}, {"lace_fnet_gru_input_subias",WEIGHTS_lace_fnet_gru_input_subias_TYPE,sizeof(lace_fnet_gru_input_subias),lace_fnet_gru_input_subias},
#endif #endif
#ifdef WEIGHTS_lace_fnet_gru_input_scale_DEFINED #ifdef WEIGHTS_lace_fnet_gru_input_scale_DEFINED
{"lace_fnet_gru_input_scale", WEIGHTS_lace_fnet_gru_input_scale_TYPE,sizeof(lace_fnet_gru_input_scale),lace_fnet_gru_input_scale}, {"lace_fnet_gru_input_scale",WEIGHTS_lace_fnet_gru_input_scale_TYPE,sizeof(lace_fnet_gru_input_scale),lace_fnet_gru_input_scale},
#endif #endif
#ifdef WEIGHTS_lace_fnet_gru_input_bias_DEFINED #ifdef WEIGHTS_lace_fnet_gru_input_bias_DEFINED
{"lace_fnet_gru_input_bias", WEIGHTS_lace_fnet_gru_input_bias_TYPE,sizeof(lace_fnet_gru_input_bias),lace_fnet_gru_input_bias}, {"lace_fnet_gru_input_bias",WEIGHTS_lace_fnet_gru_input_bias_TYPE,sizeof(lace_fnet_gru_input_bias),lace_fnet_gru_input_bias},
#endif #endif
#ifdef WEIGHTS_lace_fnet_gru_recurrent_weights_int8_DEFINED #ifdef WEIGHTS_lace_fnet_gru_recurrent_weights_int8_DEFINED
{"lace_fnet_gru_recurrent_weights_int8", WEIGHTS_lace_fnet_gru_recurrent_weights_int8_TYPE,sizeof(lace_fnet_gru_recurrent_weights_int8),lace_fnet_gru_recurrent_weights_int8}, {"lace_fnet_gru_recurrent_weights_int8",WEIGHTS_lace_fnet_gru_recurrent_weights_int8_TYPE,sizeof(lace_fnet_gru_recurrent_weights_int8),lace_fnet_gru_recurrent_weights_int8},
#endif #endif
#ifdef WEIGHTS_lace_fnet_gru_recurrent_weights_float_DEFINED #ifdef WEIGHTS_lace_fnet_gru_recurrent_weights_float_DEFINED
{"lace_fnet_gru_recurrent_weights_float", WEIGHTS_lace_fnet_gru_recurrent_weights_float_TYPE,sizeof(lace_fnet_gru_recurrent_weights_float),lace_fnet_gru_recurrent_weights_float}, {"lace_fnet_gru_recurrent_weights_float",WEIGHTS_lace_fnet_gru_recurrent_weights_float_TYPE,sizeof(lace_fnet_gru_recurrent_weights_float),lace_fnet_gru_recurrent_weights_float},
#endif #endif
#ifdef WEIGHTS_lace_fnet_gru_recurrent_subias_DEFINED #ifdef WEIGHTS_lace_fnet_gru_recurrent_subias_DEFINED
{"lace_fnet_gru_recurrent_subias", WEIGHTS_lace_fnet_gru_recurrent_subias_TYPE,sizeof(lace_fnet_gru_recurrent_subias),lace_fnet_gru_recurrent_subias}, {"lace_fnet_gru_recurrent_subias",WEIGHTS_lace_fnet_gru_recurrent_subias_TYPE,sizeof(lace_fnet_gru_recurrent_subias),lace_fnet_gru_recurrent_subias},
#endif #endif
#ifdef WEIGHTS_lace_fnet_gru_recurrent_scale_DEFINED #ifdef WEIGHTS_lace_fnet_gru_recurrent_scale_DEFINED
{"lace_fnet_gru_recurrent_scale", WEIGHTS_lace_fnet_gru_recurrent_scale_TYPE,sizeof(lace_fnet_gru_recurrent_scale),lace_fnet_gru_recurrent_scale}, {"lace_fnet_gru_recurrent_scale",WEIGHTS_lace_fnet_gru_recurrent_scale_TYPE,sizeof(lace_fnet_gru_recurrent_scale),lace_fnet_gru_recurrent_scale},
#endif #endif
#ifdef WEIGHTS_lace_fnet_gru_recurrent_bias_DEFINED #ifdef WEIGHTS_lace_fnet_gru_recurrent_bias_DEFINED
{"lace_fnet_gru_recurrent_bias", WEIGHTS_lace_fnet_gru_recurrent_bias_TYPE,sizeof(lace_fnet_gru_recurrent_bias),lace_fnet_gru_recurrent_bias}, {"lace_fnet_gru_recurrent_bias",WEIGHTS_lace_fnet_gru_recurrent_bias_TYPE,sizeof(lace_fnet_gru_recurrent_bias),lace_fnet_gru_recurrent_bias},
#endif #endif
#ifdef WEIGHTS_lace_cf1_kernel_weights_int8_DEFINED #ifdef WEIGHTS_lace_cf1_kernel_weights_int8_DEFINED
{"lace_cf1_kernel_weights_int8", WEIGHTS_lace_cf1_kernel_weights_int8_TYPE,sizeof(lace_cf1_kernel_weights_int8),lace_cf1_kernel_weights_int8}, {"lace_cf1_kernel_weights_int8",WEIGHTS_lace_cf1_kernel_weights_int8_TYPE,sizeof(lace_cf1_kernel_weights_int8),lace_cf1_kernel_weights_int8},
#endif #endif
#ifdef WEIGHTS_lace_cf1_kernel_weights_float_DEFINED #ifdef WEIGHTS_lace_cf1_kernel_weights_float_DEFINED
{"lace_cf1_kernel_weights_float", WEIGHTS_lace_cf1_kernel_weights_float_TYPE,sizeof(lace_cf1_kernel_weights_float),lace_cf1_kernel_weights_float}, {"lace_cf1_kernel_weights_float",WEIGHTS_lace_cf1_kernel_weights_float_TYPE,sizeof(lace_cf1_kernel_weights_float),lace_cf1_kernel_weights_float},
#endif #endif
#ifdef WEIGHTS_lace_cf1_kernel_subias_DEFINED #ifdef WEIGHTS_lace_cf1_kernel_subias_DEFINED
{"lace_cf1_kernel_subias", WEIGHTS_lace_cf1_kernel_subias_TYPE,sizeof(lace_cf1_kernel_subias),lace_cf1_kernel_subias}, {"lace_cf1_kernel_subias",WEIGHTS_lace_cf1_kernel_subias_TYPE,sizeof(lace_cf1_kernel_subias),lace_cf1_kernel_subias},
#endif #endif
#ifdef WEIGHTS_lace_cf1_kernel_scale_DEFINED #ifdef WEIGHTS_lace_cf1_kernel_scale_DEFINED
{"lace_cf1_kernel_scale", WEIGHTS_lace_cf1_kernel_scale_TYPE,sizeof(lace_cf1_kernel_scale),lace_cf1_kernel_scale}, {"lace_cf1_kernel_scale",WEIGHTS_lace_cf1_kernel_scale_TYPE,sizeof(lace_cf1_kernel_scale),lace_cf1_kernel_scale},
#endif #endif
#ifdef WEIGHTS_lace_cf1_kernel_bias_DEFINED #ifdef WEIGHTS_lace_cf1_kernel_bias_DEFINED
{"lace_cf1_kernel_bias", WEIGHTS_lace_cf1_kernel_bias_TYPE,sizeof(lace_cf1_kernel_bias),lace_cf1_kernel_bias}, {"lace_cf1_kernel_bias",WEIGHTS_lace_cf1_kernel_bias_TYPE,sizeof(lace_cf1_kernel_bias),lace_cf1_kernel_bias},
#endif #endif
#ifdef WEIGHTS_lace_cf1_gain_weights_float_DEFINED #ifdef WEIGHTS_lace_cf1_gain_weights_float_DEFINED
{"lace_cf1_gain_weights_float", WEIGHTS_lace_cf1_gain_weights_float_TYPE,sizeof(lace_cf1_gain_weights_float),lace_cf1_gain_weights_float}, {"lace_cf1_gain_weights_float",WEIGHTS_lace_cf1_gain_weights_float_TYPE,sizeof(lace_cf1_gain_weights_float),lace_cf1_gain_weights_float},
#endif #endif
#ifdef WEIGHTS_lace_cf1_gain_bias_DEFINED #ifdef WEIGHTS_lace_cf1_gain_bias_DEFINED
{"lace_cf1_gain_bias", WEIGHTS_lace_cf1_gain_bias_TYPE,sizeof(lace_cf1_gain_bias),lace_cf1_gain_bias}, {"lace_cf1_gain_bias",WEIGHTS_lace_cf1_gain_bias_TYPE,sizeof(lace_cf1_gain_bias),lace_cf1_gain_bias},
#endif #endif
#ifdef WEIGHTS_lace_cf1_global_gain_weights_float_DEFINED #ifdef WEIGHTS_lace_cf1_global_gain_weights_float_DEFINED
{"lace_cf1_global_gain_weights_float", WEIGHTS_lace_cf1_global_gain_weights_float_TYPE,sizeof(lace_cf1_global_gain_weights_float),lace_cf1_global_gain_weights_float}, {"lace_cf1_global_gain_weights_float",WEIGHTS_lace_cf1_global_gain_weights_float_TYPE,sizeof(lace_cf1_global_gain_weights_float),lace_cf1_global_gain_weights_float},
#endif #endif
#ifdef WEIGHTS_lace_cf1_global_gain_bias_DEFINED #ifdef WEIGHTS_lace_cf1_global_gain_bias_DEFINED
{"lace_cf1_global_gain_bias", WEIGHTS_lace_cf1_global_gain_bias_TYPE,sizeof(lace_cf1_global_gain_bias),lace_cf1_global_gain_bias}, {"lace_cf1_global_gain_bias",WEIGHTS_lace_cf1_global_gain_bias_TYPE,sizeof(lace_cf1_global_gain_bias),lace_cf1_global_gain_bias},
#endif #endif
#ifdef WEIGHTS_lace_cf2_kernel_weights_int8_DEFINED #ifdef WEIGHTS_lace_cf2_kernel_weights_int8_DEFINED
{"lace_cf2_kernel_weights_int8", WEIGHTS_lace_cf2_kernel_weights_int8_TYPE,sizeof(lace_cf2_kernel_weights_int8),lace_cf2_kernel_weights_int8}, {"lace_cf2_kernel_weights_int8",WEIGHTS_lace_cf2_kernel_weights_int8_TYPE,sizeof(lace_cf2_kernel_weights_int8),lace_cf2_kernel_weights_int8},
#endif #endif
#ifdef WEIGHTS_lace_cf2_kernel_weights_float_DEFINED #ifdef WEIGHTS_lace_cf2_kernel_weights_float_DEFINED
{"lace_cf2_kernel_weights_float", WEIGHTS_lace_cf2_kernel_weights_float_TYPE,sizeof(lace_cf2_kernel_weights_float),lace_cf2_kernel_weights_float}, {"lace_cf2_kernel_weights_float",WEIGHTS_lace_cf2_kernel_weights_float_TYPE,sizeof(lace_cf2_kernel_weights_float),lace_cf2_kernel_weights_float},
#endif #endif
#ifdef WEIGHTS_lace_cf2_kernel_subias_DEFINED #ifdef WEIGHTS_lace_cf2_kernel_subias_DEFINED
{"lace_cf2_kernel_subias", WEIGHTS_lace_cf2_kernel_subias_TYPE,sizeof(lace_cf2_kernel_subias),lace_cf2_kernel_subias}, {"lace_cf2_kernel_subias",WEIGHTS_lace_cf2_kernel_subias_TYPE,sizeof(lace_cf2_kernel_subias),lace_cf2_kernel_subias},
#endif #endif
#ifdef WEIGHTS_lace_cf2_kernel_scale_DEFINED #ifdef WEIGHTS_lace_cf2_kernel_scale_DEFINED
{"lace_cf2_kernel_scale", WEIGHTS_lace_cf2_kernel_scale_TYPE,sizeof(lace_cf2_kernel_scale),lace_cf2_kernel_scale}, {"lace_cf2_kernel_scale",WEIGHTS_lace_cf2_kernel_scale_TYPE,sizeof(lace_cf2_kernel_scale),lace_cf2_kernel_scale},
#endif #endif
#ifdef WEIGHTS_lace_cf2_kernel_bias_DEFINED #ifdef WEIGHTS_lace_cf2_kernel_bias_DEFINED
{"lace_cf2_kernel_bias", WEIGHTS_lace_cf2_kernel_bias_TYPE,sizeof(lace_cf2_kernel_bias),lace_cf2_kernel_bias}, {"lace_cf2_kernel_bias",WEIGHTS_lace_cf2_kernel_bias_TYPE,sizeof(lace_cf2_kernel_bias),lace_cf2_kernel_bias},
#endif #endif
#ifdef WEIGHTS_lace_cf2_gain_weights_float_DEFINED #ifdef WEIGHTS_lace_cf2_gain_weights_float_DEFINED
{"lace_cf2_gain_weights_float", WEIGHTS_lace_cf2_gain_weights_float_TYPE,sizeof(lace_cf2_gain_weights_float),lace_cf2_gain_weights_float}, {"lace_cf2_gain_weights_float",WEIGHTS_lace_cf2_gain_weights_float_TYPE,sizeof(lace_cf2_gain_weights_float),lace_cf2_gain_weights_float},
#endif #endif
#ifdef WEIGHTS_lace_cf2_gain_bias_DEFINED #ifdef WEIGHTS_lace_cf2_gain_bias_DEFINED
{"lace_cf2_gain_bias", WEIGHTS_lace_cf2_gain_bias_TYPE,sizeof(lace_cf2_gain_bias),lace_cf2_gain_bias}, {"lace_cf2_gain_bias",WEIGHTS_lace_cf2_gain_bias_TYPE,sizeof(lace_cf2_gain_bias),lace_cf2_gain_bias},
#endif #endif
#ifdef WEIGHTS_lace_cf2_global_gain_weights_float_DEFINED #ifdef WEIGHTS_lace_cf2_global_gain_weights_float_DEFINED
{"lace_cf2_global_gain_weights_float", WEIGHTS_lace_cf2_global_gain_weights_float_TYPE,sizeof(lace_cf2_global_gain_weights_float),lace_cf2_global_gain_weights_float}, {"lace_cf2_global_gain_weights_float",WEIGHTS_lace_cf2_global_gain_weights_float_TYPE,sizeof(lace_cf2_global_gain_weights_float),lace_cf2_global_gain_weights_float},
#endif #endif
#ifdef WEIGHTS_lace_cf2_global_gain_bias_DEFINED #ifdef WEIGHTS_lace_cf2_global_gain_bias_DEFINED
{"lace_cf2_global_gain_bias", WEIGHTS_lace_cf2_global_gain_bias_TYPE,sizeof(lace_cf2_global_gain_bias),lace_cf2_global_gain_bias}, {"lace_cf2_global_gain_bias",WEIGHTS_lace_cf2_global_gain_bias_TYPE,sizeof(lace_cf2_global_gain_bias),lace_cf2_global_gain_bias},
#endif #endif
#ifdef WEIGHTS_lace_af1_kernel_weights_int8_DEFINED #ifdef WEIGHTS_lace_af1_kernel_weights_int8_DEFINED
{"lace_af1_kernel_weights_int8", WEIGHTS_lace_af1_kernel_weights_int8_TYPE,sizeof(lace_af1_kernel_weights_int8),lace_af1_kernel_weights_int8}, {"lace_af1_kernel_weights_int8",WEIGHTS_lace_af1_kernel_weights_int8_TYPE,sizeof(lace_af1_kernel_weights_int8),lace_af1_kernel_weights_int8},
#endif #endif
#ifdef WEIGHTS_lace_af1_kernel_weights_float_DEFINED #ifdef WEIGHTS_lace_af1_kernel_weights_float_DEFINED
{"lace_af1_kernel_weights_float", WEIGHTS_lace_af1_kernel_weights_float_TYPE,sizeof(lace_af1_kernel_weights_float),lace_af1_kernel_weights_float}, {"lace_af1_kernel_weights_float",WEIGHTS_lace_af1_kernel_weights_float_TYPE,sizeof(lace_af1_kernel_weights_float),lace_af1_kernel_weights_float},
#endif #endif
#ifdef WEIGHTS_lace_af1_kernel_subias_DEFINED #ifdef WEIGHTS_lace_af1_kernel_subias_DEFINED
{"lace_af1_kernel_subias", WEIGHTS_lace_af1_kernel_subias_TYPE,sizeof(lace_af1_kernel_subias),lace_af1_kernel_subias}, {"lace_af1_kernel_subias",WEIGHTS_lace_af1_kernel_subias_TYPE,sizeof(lace_af1_kernel_subias),lace_af1_kernel_subias},
#endif #endif
#ifdef WEIGHTS_lace_af1_kernel_scale_DEFINED #ifdef WEIGHTS_lace_af1_kernel_scale_DEFINED
{"lace_af1_kernel_scale", WEIGHTS_lace_af1_kernel_scale_TYPE,sizeof(lace_af1_kernel_scale),lace_af1_kernel_scale}, {"lace_af1_kernel_scale",WEIGHTS_lace_af1_kernel_scale_TYPE,sizeof(lace_af1_kernel_scale),lace_af1_kernel_scale},
#endif #endif
#ifdef WEIGHTS_lace_af1_kernel_bias_DEFINED #ifdef WEIGHTS_lace_af1_kernel_bias_DEFINED
{"lace_af1_kernel_bias", WEIGHTS_lace_af1_kernel_bias_TYPE,sizeof(lace_af1_kernel_bias),lace_af1_kernel_bias}, {"lace_af1_kernel_bias",WEIGHTS_lace_af1_kernel_bias_TYPE,sizeof(lace_af1_kernel_bias),lace_af1_kernel_bias},
#endif #endif
#ifdef WEIGHTS_lace_af1_gain_weights_float_DEFINED #ifdef WEIGHTS_lace_af1_gain_weights_float_DEFINED
{"lace_af1_gain_weights_float", WEIGHTS_lace_af1_gain_weights_float_TYPE,sizeof(lace_af1_gain_weights_float),lace_af1_gain_weights_float}, {"lace_af1_gain_weights_float",WEIGHTS_lace_af1_gain_weights_float_TYPE,sizeof(lace_af1_gain_weights_float),lace_af1_gain_weights_float},
#endif #endif
#ifdef WEIGHTS_lace_af1_gain_bias_DEFINED #ifdef WEIGHTS_lace_af1_gain_bias_DEFINED
{"lace_af1_gain_bias", WEIGHTS_lace_af1_gain_bias_TYPE,sizeof(lace_af1_gain_bias),lace_af1_gain_bias}, {"lace_af1_gain_bias",WEIGHTS_lace_af1_gain_bias_TYPE,sizeof(lace_af1_gain_bias),lace_af1_gain_bias},
#endif #endif
{NULL,0,0,NULL} {NULL,0,0,NULL}
}; };

View File

@ -46,7 +46,7 @@ typedef struct {
float gru2_state[PLC_GRU2_STATE_SIZE]; float gru2_state[PLC_GRU2_STATE_SIZE];
} PLCNetState; } PLCNetState;
#define PLC_BUF_SIZE ((CONT_VECTORS+5)*FRAME_SIZE) #define PLC_BUF_SIZE ((CONT_VECTORS+10)*FRAME_SIZE)
struct LPCNetPLCState { struct LPCNetPLCState {
PLCModel model; PLCModel model;
FARGANState fargan; FARGANState fargan;

View File

@ -1,12 +1,12 @@
dnn_sources = sources['DEEP_PLC_SOURCES'] dnn_sources = sources['DEEP_PLC_SOURCES']
dred_sources = sources['DRED_SOURCES'] dred_sources = sources['DRED_SOURCES']
if opt_enable_dred if opt_dred.enabled()
dnn_sources += dred_sources dnn_sources += dred_sources
endif endif
osce_sources = sources['OSCE_SOURCES'] osce_sources = sources['OSCE_SOURCES']
if opt_enable_osce if opt_osce.enabled()
dnn_sources += osce_sources dnn_sources += osce_sources
endif endif
@ -51,7 +51,7 @@ if host_machine.system() == 'windows'
endif endif
if opt_enable_deep_plc if opt_deep_plc.enabled()
dnn_lib = static_library('opus-dnn', dnn_lib = static_library('opus-dnn',
dnn_sources, dnn_sources,
c_args: dnn_c_args, c_args: dnn_c_args,

View File

@ -106549,370 +106549,370 @@ static const float nolace_post_af3_bias[160] = {
#ifndef USE_WEIGHTS_FILE #ifndef USE_WEIGHTS_FILE
const WeightArray nolacelayers_arrays[] = { const WeightArray nolacelayers_arrays[] = {
#ifdef WEIGHTS_nolace_pitch_embedding_weights_float_DEFINED #ifdef WEIGHTS_nolace_pitch_embedding_weights_float_DEFINED
{"nolace_pitch_embedding_weights_float", WEIGHTS_nolace_pitch_embedding_weights_float_TYPE,sizeof(nolace_pitch_embedding_weights_float),nolace_pitch_embedding_weights_float}, {"nolace_pitch_embedding_weights_float",WEIGHTS_nolace_pitch_embedding_weights_float_TYPE,sizeof(nolace_pitch_embedding_weights_float),nolace_pitch_embedding_weights_float},
#endif #endif
#ifdef WEIGHTS_nolace_pitch_embedding_bias_DEFINED #ifdef WEIGHTS_nolace_pitch_embedding_bias_DEFINED
{"nolace_pitch_embedding_bias", WEIGHTS_nolace_pitch_embedding_bias_TYPE,sizeof(nolace_pitch_embedding_bias),nolace_pitch_embedding_bias}, {"nolace_pitch_embedding_bias",WEIGHTS_nolace_pitch_embedding_bias_TYPE,sizeof(nolace_pitch_embedding_bias),nolace_pitch_embedding_bias},
#endif #endif
#ifdef WEIGHTS_nolace_fnet_conv1_weights_float_DEFINED #ifdef WEIGHTS_nolace_fnet_conv1_weights_float_DEFINED
{"nolace_fnet_conv1_weights_float", WEIGHTS_nolace_fnet_conv1_weights_float_TYPE,sizeof(nolace_fnet_conv1_weights_float),nolace_fnet_conv1_weights_float}, {"nolace_fnet_conv1_weights_float",WEIGHTS_nolace_fnet_conv1_weights_float_TYPE,sizeof(nolace_fnet_conv1_weights_float),nolace_fnet_conv1_weights_float},
#endif #endif
#ifdef WEIGHTS_nolace_fnet_conv1_bias_DEFINED #ifdef WEIGHTS_nolace_fnet_conv1_bias_DEFINED
{"nolace_fnet_conv1_bias", WEIGHTS_nolace_fnet_conv1_bias_TYPE,sizeof(nolace_fnet_conv1_bias),nolace_fnet_conv1_bias}, {"nolace_fnet_conv1_bias",WEIGHTS_nolace_fnet_conv1_bias_TYPE,sizeof(nolace_fnet_conv1_bias),nolace_fnet_conv1_bias},
#endif #endif
#ifdef WEIGHTS_nolace_fnet_conv2_weights_int8_DEFINED #ifdef WEIGHTS_nolace_fnet_conv2_weights_int8_DEFINED
{"nolace_fnet_conv2_weights_int8", WEIGHTS_nolace_fnet_conv2_weights_int8_TYPE,sizeof(nolace_fnet_conv2_weights_int8),nolace_fnet_conv2_weights_int8}, {"nolace_fnet_conv2_weights_int8",WEIGHTS_nolace_fnet_conv2_weights_int8_TYPE,sizeof(nolace_fnet_conv2_weights_int8),nolace_fnet_conv2_weights_int8},
#endif #endif
#ifdef WEIGHTS_nolace_fnet_conv2_weights_float_DEFINED #ifdef WEIGHTS_nolace_fnet_conv2_weights_float_DEFINED
{"nolace_fnet_conv2_weights_float", WEIGHTS_nolace_fnet_conv2_weights_float_TYPE,sizeof(nolace_fnet_conv2_weights_float),nolace_fnet_conv2_weights_float}, {"nolace_fnet_conv2_weights_float",WEIGHTS_nolace_fnet_conv2_weights_float_TYPE,sizeof(nolace_fnet_conv2_weights_float),nolace_fnet_conv2_weights_float},
#endif #endif
#ifdef WEIGHTS_nolace_fnet_conv2_subias_DEFINED #ifdef WEIGHTS_nolace_fnet_conv2_subias_DEFINED
{"nolace_fnet_conv2_subias", WEIGHTS_nolace_fnet_conv2_subias_TYPE,sizeof(nolace_fnet_conv2_subias),nolace_fnet_conv2_subias}, {"nolace_fnet_conv2_subias",WEIGHTS_nolace_fnet_conv2_subias_TYPE,sizeof(nolace_fnet_conv2_subias),nolace_fnet_conv2_subias},
#endif #endif
#ifdef WEIGHTS_nolace_fnet_conv2_scale_DEFINED #ifdef WEIGHTS_nolace_fnet_conv2_scale_DEFINED
{"nolace_fnet_conv2_scale", WEIGHTS_nolace_fnet_conv2_scale_TYPE,sizeof(nolace_fnet_conv2_scale),nolace_fnet_conv2_scale}, {"nolace_fnet_conv2_scale",WEIGHTS_nolace_fnet_conv2_scale_TYPE,sizeof(nolace_fnet_conv2_scale),nolace_fnet_conv2_scale},
#endif #endif
#ifdef WEIGHTS_nolace_fnet_conv2_bias_DEFINED #ifdef WEIGHTS_nolace_fnet_conv2_bias_DEFINED
{"nolace_fnet_conv2_bias", WEIGHTS_nolace_fnet_conv2_bias_TYPE,sizeof(nolace_fnet_conv2_bias),nolace_fnet_conv2_bias}, {"nolace_fnet_conv2_bias",WEIGHTS_nolace_fnet_conv2_bias_TYPE,sizeof(nolace_fnet_conv2_bias),nolace_fnet_conv2_bias},
#endif #endif
#ifdef WEIGHTS_nolace_fnet_tconv_weights_int8_DEFINED #ifdef WEIGHTS_nolace_fnet_tconv_weights_int8_DEFINED
{"nolace_fnet_tconv_weights_int8", WEIGHTS_nolace_fnet_tconv_weights_int8_TYPE,sizeof(nolace_fnet_tconv_weights_int8),nolace_fnet_tconv_weights_int8}, {"nolace_fnet_tconv_weights_int8",WEIGHTS_nolace_fnet_tconv_weights_int8_TYPE,sizeof(nolace_fnet_tconv_weights_int8),nolace_fnet_tconv_weights_int8},
#endif #endif
#ifdef WEIGHTS_nolace_fnet_tconv_weights_float_DEFINED #ifdef WEIGHTS_nolace_fnet_tconv_weights_float_DEFINED
{"nolace_fnet_tconv_weights_float", WEIGHTS_nolace_fnet_tconv_weights_float_TYPE,sizeof(nolace_fnet_tconv_weights_float),nolace_fnet_tconv_weights_float}, {"nolace_fnet_tconv_weights_float",WEIGHTS_nolace_fnet_tconv_weights_float_TYPE,sizeof(nolace_fnet_tconv_weights_float),nolace_fnet_tconv_weights_float},
#endif #endif
#ifdef WEIGHTS_nolace_fnet_tconv_subias_DEFINED #ifdef WEIGHTS_nolace_fnet_tconv_subias_DEFINED
{"nolace_fnet_tconv_subias", WEIGHTS_nolace_fnet_tconv_subias_TYPE,sizeof(nolace_fnet_tconv_subias),nolace_fnet_tconv_subias}, {"nolace_fnet_tconv_subias",WEIGHTS_nolace_fnet_tconv_subias_TYPE,sizeof(nolace_fnet_tconv_subias),nolace_fnet_tconv_subias},
#endif #endif
#ifdef WEIGHTS_nolace_fnet_tconv_scale_DEFINED #ifdef WEIGHTS_nolace_fnet_tconv_scale_DEFINED
{"nolace_fnet_tconv_scale", WEIGHTS_nolace_fnet_tconv_scale_TYPE,sizeof(nolace_fnet_tconv_scale),nolace_fnet_tconv_scale}, {"nolace_fnet_tconv_scale",WEIGHTS_nolace_fnet_tconv_scale_TYPE,sizeof(nolace_fnet_tconv_scale),nolace_fnet_tconv_scale},
#endif #endif
#ifdef WEIGHTS_nolace_fnet_tconv_bias_DEFINED #ifdef WEIGHTS_nolace_fnet_tconv_bias_DEFINED
{"nolace_fnet_tconv_bias", WEIGHTS_nolace_fnet_tconv_bias_TYPE,sizeof(nolace_fnet_tconv_bias),nolace_fnet_tconv_bias}, {"nolace_fnet_tconv_bias",WEIGHTS_nolace_fnet_tconv_bias_TYPE,sizeof(nolace_fnet_tconv_bias),nolace_fnet_tconv_bias},
#endif #endif
#ifdef WEIGHTS_nolace_fnet_gru_input_weights_int8_DEFINED #ifdef WEIGHTS_nolace_fnet_gru_input_weights_int8_DEFINED
{"nolace_fnet_gru_input_weights_int8", WEIGHTS_nolace_fnet_gru_input_weights_int8_TYPE,sizeof(nolace_fnet_gru_input_weights_int8),nolace_fnet_gru_input_weights_int8}, {"nolace_fnet_gru_input_weights_int8",WEIGHTS_nolace_fnet_gru_input_weights_int8_TYPE,sizeof(nolace_fnet_gru_input_weights_int8),nolace_fnet_gru_input_weights_int8},
#endif #endif
#ifdef WEIGHTS_nolace_fnet_gru_input_weights_float_DEFINED #ifdef WEIGHTS_nolace_fnet_gru_input_weights_float_DEFINED
{"nolace_fnet_gru_input_weights_float", WEIGHTS_nolace_fnet_gru_input_weights_float_TYPE,sizeof(nolace_fnet_gru_input_weights_float),nolace_fnet_gru_input_weights_float}, {"nolace_fnet_gru_input_weights_float",WEIGHTS_nolace_fnet_gru_input_weights_float_TYPE,sizeof(nolace_fnet_gru_input_weights_float),nolace_fnet_gru_input_weights_float},
#endif #endif
#ifdef WEIGHTS_nolace_fnet_gru_input_subias_DEFINED #ifdef WEIGHTS_nolace_fnet_gru_input_subias_DEFINED
{"nolace_fnet_gru_input_subias", WEIGHTS_nolace_fnet_gru_input_subias_TYPE,sizeof(nolace_fnet_gru_input_subias),nolace_fnet_gru_input_subias}, {"nolace_fnet_gru_input_subias",WEIGHTS_nolace_fnet_gru_input_subias_TYPE,sizeof(nolace_fnet_gru_input_subias),nolace_fnet_gru_input_subias},
#endif #endif
#ifdef WEIGHTS_nolace_fnet_gru_input_scale_DEFINED #ifdef WEIGHTS_nolace_fnet_gru_input_scale_DEFINED
{"nolace_fnet_gru_input_scale", WEIGHTS_nolace_fnet_gru_input_scale_TYPE,sizeof(nolace_fnet_gru_input_scale),nolace_fnet_gru_input_scale}, {"nolace_fnet_gru_input_scale",WEIGHTS_nolace_fnet_gru_input_scale_TYPE,sizeof(nolace_fnet_gru_input_scale),nolace_fnet_gru_input_scale},
#endif #endif
#ifdef WEIGHTS_nolace_fnet_gru_input_bias_DEFINED #ifdef WEIGHTS_nolace_fnet_gru_input_bias_DEFINED
{"nolace_fnet_gru_input_bias", WEIGHTS_nolace_fnet_gru_input_bias_TYPE,sizeof(nolace_fnet_gru_input_bias),nolace_fnet_gru_input_bias}, {"nolace_fnet_gru_input_bias",WEIGHTS_nolace_fnet_gru_input_bias_TYPE,sizeof(nolace_fnet_gru_input_bias),nolace_fnet_gru_input_bias},
#endif #endif
#ifdef WEIGHTS_nolace_fnet_gru_recurrent_weights_int8_DEFINED #ifdef WEIGHTS_nolace_fnet_gru_recurrent_weights_int8_DEFINED
{"nolace_fnet_gru_recurrent_weights_int8", WEIGHTS_nolace_fnet_gru_recurrent_weights_int8_TYPE,sizeof(nolace_fnet_gru_recurrent_weights_int8),nolace_fnet_gru_recurrent_weights_int8}, {"nolace_fnet_gru_recurrent_weights_int8",WEIGHTS_nolace_fnet_gru_recurrent_weights_int8_TYPE,sizeof(nolace_fnet_gru_recurrent_weights_int8),nolace_fnet_gru_recurrent_weights_int8},
#endif #endif
#ifdef WEIGHTS_nolace_fnet_gru_recurrent_weights_float_DEFINED #ifdef WEIGHTS_nolace_fnet_gru_recurrent_weights_float_DEFINED
{"nolace_fnet_gru_recurrent_weights_float", WEIGHTS_nolace_fnet_gru_recurrent_weights_float_TYPE,sizeof(nolace_fnet_gru_recurrent_weights_float),nolace_fnet_gru_recurrent_weights_float}, {"nolace_fnet_gru_recurrent_weights_float",WEIGHTS_nolace_fnet_gru_recurrent_weights_float_TYPE,sizeof(nolace_fnet_gru_recurrent_weights_float),nolace_fnet_gru_recurrent_weights_float},
#endif #endif
#ifdef WEIGHTS_nolace_fnet_gru_recurrent_subias_DEFINED #ifdef WEIGHTS_nolace_fnet_gru_recurrent_subias_DEFINED
{"nolace_fnet_gru_recurrent_subias", WEIGHTS_nolace_fnet_gru_recurrent_subias_TYPE,sizeof(nolace_fnet_gru_recurrent_subias),nolace_fnet_gru_recurrent_subias}, {"nolace_fnet_gru_recurrent_subias",WEIGHTS_nolace_fnet_gru_recurrent_subias_TYPE,sizeof(nolace_fnet_gru_recurrent_subias),nolace_fnet_gru_recurrent_subias},
#endif #endif
#ifdef WEIGHTS_nolace_fnet_gru_recurrent_scale_DEFINED #ifdef WEIGHTS_nolace_fnet_gru_recurrent_scale_DEFINED
{"nolace_fnet_gru_recurrent_scale", WEIGHTS_nolace_fnet_gru_recurrent_scale_TYPE,sizeof(nolace_fnet_gru_recurrent_scale),nolace_fnet_gru_recurrent_scale}, {"nolace_fnet_gru_recurrent_scale",WEIGHTS_nolace_fnet_gru_recurrent_scale_TYPE,sizeof(nolace_fnet_gru_recurrent_scale),nolace_fnet_gru_recurrent_scale},
#endif #endif
#ifdef WEIGHTS_nolace_fnet_gru_recurrent_bias_DEFINED #ifdef WEIGHTS_nolace_fnet_gru_recurrent_bias_DEFINED
{"nolace_fnet_gru_recurrent_bias", WEIGHTS_nolace_fnet_gru_recurrent_bias_TYPE,sizeof(nolace_fnet_gru_recurrent_bias),nolace_fnet_gru_recurrent_bias}, {"nolace_fnet_gru_recurrent_bias",WEIGHTS_nolace_fnet_gru_recurrent_bias_TYPE,sizeof(nolace_fnet_gru_recurrent_bias),nolace_fnet_gru_recurrent_bias},
#endif #endif
#ifdef WEIGHTS_nolace_cf1_kernel_weights_int8_DEFINED #ifdef WEIGHTS_nolace_cf1_kernel_weights_int8_DEFINED
{"nolace_cf1_kernel_weights_int8", WEIGHTS_nolace_cf1_kernel_weights_int8_TYPE,sizeof(nolace_cf1_kernel_weights_int8),nolace_cf1_kernel_weights_int8}, {"nolace_cf1_kernel_weights_int8",WEIGHTS_nolace_cf1_kernel_weights_int8_TYPE,sizeof(nolace_cf1_kernel_weights_int8),nolace_cf1_kernel_weights_int8},
#endif #endif
#ifdef WEIGHTS_nolace_cf1_kernel_weights_float_DEFINED #ifdef WEIGHTS_nolace_cf1_kernel_weights_float_DEFINED
{"nolace_cf1_kernel_weights_float", WEIGHTS_nolace_cf1_kernel_weights_float_TYPE,sizeof(nolace_cf1_kernel_weights_float),nolace_cf1_kernel_weights_float}, {"nolace_cf1_kernel_weights_float",WEIGHTS_nolace_cf1_kernel_weights_float_TYPE,sizeof(nolace_cf1_kernel_weights_float),nolace_cf1_kernel_weights_float},
#endif #endif
#ifdef WEIGHTS_nolace_cf1_kernel_subias_DEFINED #ifdef WEIGHTS_nolace_cf1_kernel_subias_DEFINED
{"nolace_cf1_kernel_subias", WEIGHTS_nolace_cf1_kernel_subias_TYPE,sizeof(nolace_cf1_kernel_subias),nolace_cf1_kernel_subias}, {"nolace_cf1_kernel_subias",WEIGHTS_nolace_cf1_kernel_subias_TYPE,sizeof(nolace_cf1_kernel_subias),nolace_cf1_kernel_subias},
#endif #endif
#ifdef WEIGHTS_nolace_cf1_kernel_scale_DEFINED #ifdef WEIGHTS_nolace_cf1_kernel_scale_DEFINED
{"nolace_cf1_kernel_scale", WEIGHTS_nolace_cf1_kernel_scale_TYPE,sizeof(nolace_cf1_kernel_scale),nolace_cf1_kernel_scale}, {"nolace_cf1_kernel_scale",WEIGHTS_nolace_cf1_kernel_scale_TYPE,sizeof(nolace_cf1_kernel_scale),nolace_cf1_kernel_scale},
#endif #endif
#ifdef WEIGHTS_nolace_cf1_kernel_bias_DEFINED #ifdef WEIGHTS_nolace_cf1_kernel_bias_DEFINED
{"nolace_cf1_kernel_bias", WEIGHTS_nolace_cf1_kernel_bias_TYPE,sizeof(nolace_cf1_kernel_bias),nolace_cf1_kernel_bias}, {"nolace_cf1_kernel_bias",WEIGHTS_nolace_cf1_kernel_bias_TYPE,sizeof(nolace_cf1_kernel_bias),nolace_cf1_kernel_bias},
#endif #endif
#ifdef WEIGHTS_nolace_cf1_gain_weights_float_DEFINED #ifdef WEIGHTS_nolace_cf1_gain_weights_float_DEFINED
{"nolace_cf1_gain_weights_float", WEIGHTS_nolace_cf1_gain_weights_float_TYPE,sizeof(nolace_cf1_gain_weights_float),nolace_cf1_gain_weights_float}, {"nolace_cf1_gain_weights_float",WEIGHTS_nolace_cf1_gain_weights_float_TYPE,sizeof(nolace_cf1_gain_weights_float),nolace_cf1_gain_weights_float},
#endif #endif
#ifdef WEIGHTS_nolace_cf1_gain_bias_DEFINED #ifdef WEIGHTS_nolace_cf1_gain_bias_DEFINED
{"nolace_cf1_gain_bias", WEIGHTS_nolace_cf1_gain_bias_TYPE,sizeof(nolace_cf1_gain_bias),nolace_cf1_gain_bias}, {"nolace_cf1_gain_bias",WEIGHTS_nolace_cf1_gain_bias_TYPE,sizeof(nolace_cf1_gain_bias),nolace_cf1_gain_bias},
#endif #endif
#ifdef WEIGHTS_nolace_cf1_global_gain_weights_float_DEFINED #ifdef WEIGHTS_nolace_cf1_global_gain_weights_float_DEFINED
{"nolace_cf1_global_gain_weights_float", WEIGHTS_nolace_cf1_global_gain_weights_float_TYPE,sizeof(nolace_cf1_global_gain_weights_float),nolace_cf1_global_gain_weights_float}, {"nolace_cf1_global_gain_weights_float",WEIGHTS_nolace_cf1_global_gain_weights_float_TYPE,sizeof(nolace_cf1_global_gain_weights_float),nolace_cf1_global_gain_weights_float},
#endif #endif
#ifdef WEIGHTS_nolace_cf1_global_gain_bias_DEFINED #ifdef WEIGHTS_nolace_cf1_global_gain_bias_DEFINED
{"nolace_cf1_global_gain_bias", WEIGHTS_nolace_cf1_global_gain_bias_TYPE,sizeof(nolace_cf1_global_gain_bias),nolace_cf1_global_gain_bias}, {"nolace_cf1_global_gain_bias",WEIGHTS_nolace_cf1_global_gain_bias_TYPE,sizeof(nolace_cf1_global_gain_bias),nolace_cf1_global_gain_bias},
#endif #endif
#ifdef WEIGHTS_nolace_cf2_kernel_weights_int8_DEFINED #ifdef WEIGHTS_nolace_cf2_kernel_weights_int8_DEFINED
{"nolace_cf2_kernel_weights_int8", WEIGHTS_nolace_cf2_kernel_weights_int8_TYPE,sizeof(nolace_cf2_kernel_weights_int8),nolace_cf2_kernel_weights_int8}, {"nolace_cf2_kernel_weights_int8",WEIGHTS_nolace_cf2_kernel_weights_int8_TYPE,sizeof(nolace_cf2_kernel_weights_int8),nolace_cf2_kernel_weights_int8},
#endif #endif
#ifdef WEIGHTS_nolace_cf2_kernel_weights_float_DEFINED #ifdef WEIGHTS_nolace_cf2_kernel_weights_float_DEFINED
{"nolace_cf2_kernel_weights_float", WEIGHTS_nolace_cf2_kernel_weights_float_TYPE,sizeof(nolace_cf2_kernel_weights_float),nolace_cf2_kernel_weights_float}, {"nolace_cf2_kernel_weights_float",WEIGHTS_nolace_cf2_kernel_weights_float_TYPE,sizeof(nolace_cf2_kernel_weights_float),nolace_cf2_kernel_weights_float},
#endif #endif
#ifdef WEIGHTS_nolace_cf2_kernel_subias_DEFINED #ifdef WEIGHTS_nolace_cf2_kernel_subias_DEFINED
{"nolace_cf2_kernel_subias", WEIGHTS_nolace_cf2_kernel_subias_TYPE,sizeof(nolace_cf2_kernel_subias),nolace_cf2_kernel_subias}, {"nolace_cf2_kernel_subias",WEIGHTS_nolace_cf2_kernel_subias_TYPE,sizeof(nolace_cf2_kernel_subias),nolace_cf2_kernel_subias},
#endif #endif
#ifdef WEIGHTS_nolace_cf2_kernel_scale_DEFINED #ifdef WEIGHTS_nolace_cf2_kernel_scale_DEFINED
{"nolace_cf2_kernel_scale", WEIGHTS_nolace_cf2_kernel_scale_TYPE,sizeof(nolace_cf2_kernel_scale),nolace_cf2_kernel_scale}, {"nolace_cf2_kernel_scale",WEIGHTS_nolace_cf2_kernel_scale_TYPE,sizeof(nolace_cf2_kernel_scale),nolace_cf2_kernel_scale},
#endif #endif
#ifdef WEIGHTS_nolace_cf2_kernel_bias_DEFINED #ifdef WEIGHTS_nolace_cf2_kernel_bias_DEFINED
{"nolace_cf2_kernel_bias", WEIGHTS_nolace_cf2_kernel_bias_TYPE,sizeof(nolace_cf2_kernel_bias),nolace_cf2_kernel_bias}, {"nolace_cf2_kernel_bias",WEIGHTS_nolace_cf2_kernel_bias_TYPE,sizeof(nolace_cf2_kernel_bias),nolace_cf2_kernel_bias},
#endif #endif
#ifdef WEIGHTS_nolace_cf2_gain_weights_float_DEFINED #ifdef WEIGHTS_nolace_cf2_gain_weights_float_DEFINED
{"nolace_cf2_gain_weights_float", WEIGHTS_nolace_cf2_gain_weights_float_TYPE,sizeof(nolace_cf2_gain_weights_float),nolace_cf2_gain_weights_float}, {"nolace_cf2_gain_weights_float",WEIGHTS_nolace_cf2_gain_weights_float_TYPE,sizeof(nolace_cf2_gain_weights_float),nolace_cf2_gain_weights_float},
#endif #endif
#ifdef WEIGHTS_nolace_cf2_gain_bias_DEFINED #ifdef WEIGHTS_nolace_cf2_gain_bias_DEFINED
{"nolace_cf2_gain_bias", WEIGHTS_nolace_cf2_gain_bias_TYPE,sizeof(nolace_cf2_gain_bias),nolace_cf2_gain_bias}, {"nolace_cf2_gain_bias",WEIGHTS_nolace_cf2_gain_bias_TYPE,sizeof(nolace_cf2_gain_bias),nolace_cf2_gain_bias},
#endif #endif
#ifdef WEIGHTS_nolace_cf2_global_gain_weights_float_DEFINED #ifdef WEIGHTS_nolace_cf2_global_gain_weights_float_DEFINED
{"nolace_cf2_global_gain_weights_float", WEIGHTS_nolace_cf2_global_gain_weights_float_TYPE,sizeof(nolace_cf2_global_gain_weights_float),nolace_cf2_global_gain_weights_float}, {"nolace_cf2_global_gain_weights_float",WEIGHTS_nolace_cf2_global_gain_weights_float_TYPE,sizeof(nolace_cf2_global_gain_weights_float),nolace_cf2_global_gain_weights_float},
#endif #endif
#ifdef WEIGHTS_nolace_cf2_global_gain_bias_DEFINED #ifdef WEIGHTS_nolace_cf2_global_gain_bias_DEFINED
{"nolace_cf2_global_gain_bias", WEIGHTS_nolace_cf2_global_gain_bias_TYPE,sizeof(nolace_cf2_global_gain_bias),nolace_cf2_global_gain_bias}, {"nolace_cf2_global_gain_bias",WEIGHTS_nolace_cf2_global_gain_bias_TYPE,sizeof(nolace_cf2_global_gain_bias),nolace_cf2_global_gain_bias},
#endif #endif
#ifdef WEIGHTS_nolace_af1_kernel_weights_int8_DEFINED #ifdef WEIGHTS_nolace_af1_kernel_weights_int8_DEFINED
{"nolace_af1_kernel_weights_int8", WEIGHTS_nolace_af1_kernel_weights_int8_TYPE,sizeof(nolace_af1_kernel_weights_int8),nolace_af1_kernel_weights_int8}, {"nolace_af1_kernel_weights_int8",WEIGHTS_nolace_af1_kernel_weights_int8_TYPE,sizeof(nolace_af1_kernel_weights_int8),nolace_af1_kernel_weights_int8},
#endif #endif
#ifdef WEIGHTS_nolace_af1_kernel_weights_float_DEFINED #ifdef WEIGHTS_nolace_af1_kernel_weights_float_DEFINED
{"nolace_af1_kernel_weights_float", WEIGHTS_nolace_af1_kernel_weights_float_TYPE,sizeof(nolace_af1_kernel_weights_float),nolace_af1_kernel_weights_float}, {"nolace_af1_kernel_weights_float",WEIGHTS_nolace_af1_kernel_weights_float_TYPE,sizeof(nolace_af1_kernel_weights_float),nolace_af1_kernel_weights_float},
#endif #endif
#ifdef WEIGHTS_nolace_af1_kernel_subias_DEFINED #ifdef WEIGHTS_nolace_af1_kernel_subias_DEFINED
{"nolace_af1_kernel_subias", WEIGHTS_nolace_af1_kernel_subias_TYPE,sizeof(nolace_af1_kernel_subias),nolace_af1_kernel_subias}, {"nolace_af1_kernel_subias",WEIGHTS_nolace_af1_kernel_subias_TYPE,sizeof(nolace_af1_kernel_subias),nolace_af1_kernel_subias},
#endif #endif
#ifdef WEIGHTS_nolace_af1_kernel_scale_DEFINED #ifdef WEIGHTS_nolace_af1_kernel_scale_DEFINED
{"nolace_af1_kernel_scale", WEIGHTS_nolace_af1_kernel_scale_TYPE,sizeof(nolace_af1_kernel_scale),nolace_af1_kernel_scale}, {"nolace_af1_kernel_scale",WEIGHTS_nolace_af1_kernel_scale_TYPE,sizeof(nolace_af1_kernel_scale),nolace_af1_kernel_scale},
#endif #endif
#ifdef WEIGHTS_nolace_af1_kernel_bias_DEFINED #ifdef WEIGHTS_nolace_af1_kernel_bias_DEFINED
{"nolace_af1_kernel_bias", WEIGHTS_nolace_af1_kernel_bias_TYPE,sizeof(nolace_af1_kernel_bias),nolace_af1_kernel_bias}, {"nolace_af1_kernel_bias",WEIGHTS_nolace_af1_kernel_bias_TYPE,sizeof(nolace_af1_kernel_bias),nolace_af1_kernel_bias},
#endif #endif
#ifdef WEIGHTS_nolace_af1_gain_weights_float_DEFINED #ifdef WEIGHTS_nolace_af1_gain_weights_float_DEFINED
{"nolace_af1_gain_weights_float", WEIGHTS_nolace_af1_gain_weights_float_TYPE,sizeof(nolace_af1_gain_weights_float),nolace_af1_gain_weights_float}, {"nolace_af1_gain_weights_float",WEIGHTS_nolace_af1_gain_weights_float_TYPE,sizeof(nolace_af1_gain_weights_float),nolace_af1_gain_weights_float},
#endif #endif
#ifdef WEIGHTS_nolace_af1_gain_bias_DEFINED #ifdef WEIGHTS_nolace_af1_gain_bias_DEFINED
{"nolace_af1_gain_bias", WEIGHTS_nolace_af1_gain_bias_TYPE,sizeof(nolace_af1_gain_bias),nolace_af1_gain_bias}, {"nolace_af1_gain_bias",WEIGHTS_nolace_af1_gain_bias_TYPE,sizeof(nolace_af1_gain_bias),nolace_af1_gain_bias},
#endif #endif
#ifdef WEIGHTS_nolace_tdshape1_alpha1_f_weights_int8_DEFINED #ifdef WEIGHTS_nolace_tdshape1_alpha1_f_weights_int8_DEFINED
{"nolace_tdshape1_alpha1_f_weights_int8", WEIGHTS_nolace_tdshape1_alpha1_f_weights_int8_TYPE,sizeof(nolace_tdshape1_alpha1_f_weights_int8),nolace_tdshape1_alpha1_f_weights_int8}, {"nolace_tdshape1_alpha1_f_weights_int8",WEIGHTS_nolace_tdshape1_alpha1_f_weights_int8_TYPE,sizeof(nolace_tdshape1_alpha1_f_weights_int8),nolace_tdshape1_alpha1_f_weights_int8},
#endif #endif
#ifdef WEIGHTS_nolace_tdshape1_alpha1_f_weights_float_DEFINED #ifdef WEIGHTS_nolace_tdshape1_alpha1_f_weights_float_DEFINED
{"nolace_tdshape1_alpha1_f_weights_float", WEIGHTS_nolace_tdshape1_alpha1_f_weights_float_TYPE,sizeof(nolace_tdshape1_alpha1_f_weights_float),nolace_tdshape1_alpha1_f_weights_float}, {"nolace_tdshape1_alpha1_f_weights_float",WEIGHTS_nolace_tdshape1_alpha1_f_weights_float_TYPE,sizeof(nolace_tdshape1_alpha1_f_weights_float),nolace_tdshape1_alpha1_f_weights_float},
#endif #endif
#ifdef WEIGHTS_nolace_tdshape1_alpha1_f_subias_DEFINED #ifdef WEIGHTS_nolace_tdshape1_alpha1_f_subias_DEFINED
{"nolace_tdshape1_alpha1_f_subias", WEIGHTS_nolace_tdshape1_alpha1_f_subias_TYPE,sizeof(nolace_tdshape1_alpha1_f_subias),nolace_tdshape1_alpha1_f_subias}, {"nolace_tdshape1_alpha1_f_subias",WEIGHTS_nolace_tdshape1_alpha1_f_subias_TYPE,sizeof(nolace_tdshape1_alpha1_f_subias),nolace_tdshape1_alpha1_f_subias},
#endif #endif
#ifdef WEIGHTS_nolace_tdshape1_alpha1_f_scale_DEFINED #ifdef WEIGHTS_nolace_tdshape1_alpha1_f_scale_DEFINED
{"nolace_tdshape1_alpha1_f_scale", WEIGHTS_nolace_tdshape1_alpha1_f_scale_TYPE,sizeof(nolace_tdshape1_alpha1_f_scale),nolace_tdshape1_alpha1_f_scale}, {"nolace_tdshape1_alpha1_f_scale",WEIGHTS_nolace_tdshape1_alpha1_f_scale_TYPE,sizeof(nolace_tdshape1_alpha1_f_scale),nolace_tdshape1_alpha1_f_scale},
#endif #endif
#ifdef WEIGHTS_nolace_tdshape1_alpha1_f_bias_DEFINED #ifdef WEIGHTS_nolace_tdshape1_alpha1_f_bias_DEFINED
{"nolace_tdshape1_alpha1_f_bias", WEIGHTS_nolace_tdshape1_alpha1_f_bias_TYPE,sizeof(nolace_tdshape1_alpha1_f_bias),nolace_tdshape1_alpha1_f_bias}, {"nolace_tdshape1_alpha1_f_bias",WEIGHTS_nolace_tdshape1_alpha1_f_bias_TYPE,sizeof(nolace_tdshape1_alpha1_f_bias),nolace_tdshape1_alpha1_f_bias},
#endif #endif
#ifdef WEIGHTS_nolace_tdshape1_alpha1_t_weights_float_DEFINED #ifdef WEIGHTS_nolace_tdshape1_alpha1_t_weights_float_DEFINED
{"nolace_tdshape1_alpha1_t_weights_float", WEIGHTS_nolace_tdshape1_alpha1_t_weights_float_TYPE,sizeof(nolace_tdshape1_alpha1_t_weights_float),nolace_tdshape1_alpha1_t_weights_float}, {"nolace_tdshape1_alpha1_t_weights_float",WEIGHTS_nolace_tdshape1_alpha1_t_weights_float_TYPE,sizeof(nolace_tdshape1_alpha1_t_weights_float),nolace_tdshape1_alpha1_t_weights_float},
#endif #endif
#ifdef WEIGHTS_nolace_tdshape1_alpha1_t_bias_DEFINED #ifdef WEIGHTS_nolace_tdshape1_alpha1_t_bias_DEFINED
{"nolace_tdshape1_alpha1_t_bias", WEIGHTS_nolace_tdshape1_alpha1_t_bias_TYPE,sizeof(nolace_tdshape1_alpha1_t_bias),nolace_tdshape1_alpha1_t_bias}, {"nolace_tdshape1_alpha1_t_bias",WEIGHTS_nolace_tdshape1_alpha1_t_bias_TYPE,sizeof(nolace_tdshape1_alpha1_t_bias),nolace_tdshape1_alpha1_t_bias},
#endif #endif
#ifdef WEIGHTS_nolace_tdshape1_alpha2_weights_float_DEFINED #ifdef WEIGHTS_nolace_tdshape1_alpha2_weights_float_DEFINED
{"nolace_tdshape1_alpha2_weights_float", WEIGHTS_nolace_tdshape1_alpha2_weights_float_TYPE,sizeof(nolace_tdshape1_alpha2_weights_float),nolace_tdshape1_alpha2_weights_float}, {"nolace_tdshape1_alpha2_weights_float",WEIGHTS_nolace_tdshape1_alpha2_weights_float_TYPE,sizeof(nolace_tdshape1_alpha2_weights_float),nolace_tdshape1_alpha2_weights_float},
#endif #endif
#ifdef WEIGHTS_nolace_tdshape1_alpha2_bias_DEFINED #ifdef WEIGHTS_nolace_tdshape1_alpha2_bias_DEFINED
{"nolace_tdshape1_alpha2_bias", WEIGHTS_nolace_tdshape1_alpha2_bias_TYPE,sizeof(nolace_tdshape1_alpha2_bias),nolace_tdshape1_alpha2_bias}, {"nolace_tdshape1_alpha2_bias",WEIGHTS_nolace_tdshape1_alpha2_bias_TYPE,sizeof(nolace_tdshape1_alpha2_bias),nolace_tdshape1_alpha2_bias},
#endif #endif
#ifdef WEIGHTS_nolace_tdshape2_alpha1_f_weights_int8_DEFINED #ifdef WEIGHTS_nolace_tdshape2_alpha1_f_weights_int8_DEFINED
{"nolace_tdshape2_alpha1_f_weights_int8", WEIGHTS_nolace_tdshape2_alpha1_f_weights_int8_TYPE,sizeof(nolace_tdshape2_alpha1_f_weights_int8),nolace_tdshape2_alpha1_f_weights_int8}, {"nolace_tdshape2_alpha1_f_weights_int8",WEIGHTS_nolace_tdshape2_alpha1_f_weights_int8_TYPE,sizeof(nolace_tdshape2_alpha1_f_weights_int8),nolace_tdshape2_alpha1_f_weights_int8},
#endif #endif
#ifdef WEIGHTS_nolace_tdshape2_alpha1_f_weights_float_DEFINED #ifdef WEIGHTS_nolace_tdshape2_alpha1_f_weights_float_DEFINED
{"nolace_tdshape2_alpha1_f_weights_float", WEIGHTS_nolace_tdshape2_alpha1_f_weights_float_TYPE,sizeof(nolace_tdshape2_alpha1_f_weights_float),nolace_tdshape2_alpha1_f_weights_float}, {"nolace_tdshape2_alpha1_f_weights_float",WEIGHTS_nolace_tdshape2_alpha1_f_weights_float_TYPE,sizeof(nolace_tdshape2_alpha1_f_weights_float),nolace_tdshape2_alpha1_f_weights_float},
#endif #endif
#ifdef WEIGHTS_nolace_tdshape2_alpha1_f_subias_DEFINED #ifdef WEIGHTS_nolace_tdshape2_alpha1_f_subias_DEFINED
{"nolace_tdshape2_alpha1_f_subias", WEIGHTS_nolace_tdshape2_alpha1_f_subias_TYPE,sizeof(nolace_tdshape2_alpha1_f_subias),nolace_tdshape2_alpha1_f_subias}, {"nolace_tdshape2_alpha1_f_subias",WEIGHTS_nolace_tdshape2_alpha1_f_subias_TYPE,sizeof(nolace_tdshape2_alpha1_f_subias),nolace_tdshape2_alpha1_f_subias},
#endif #endif
#ifdef WEIGHTS_nolace_tdshape2_alpha1_f_scale_DEFINED #ifdef WEIGHTS_nolace_tdshape2_alpha1_f_scale_DEFINED
{"nolace_tdshape2_alpha1_f_scale", WEIGHTS_nolace_tdshape2_alpha1_f_scale_TYPE,sizeof(nolace_tdshape2_alpha1_f_scale),nolace_tdshape2_alpha1_f_scale}, {"nolace_tdshape2_alpha1_f_scale",WEIGHTS_nolace_tdshape2_alpha1_f_scale_TYPE,sizeof(nolace_tdshape2_alpha1_f_scale),nolace_tdshape2_alpha1_f_scale},
#endif #endif
#ifdef WEIGHTS_nolace_tdshape2_alpha1_f_bias_DEFINED #ifdef WEIGHTS_nolace_tdshape2_alpha1_f_bias_DEFINED
{"nolace_tdshape2_alpha1_f_bias", WEIGHTS_nolace_tdshape2_alpha1_f_bias_TYPE,sizeof(nolace_tdshape2_alpha1_f_bias),nolace_tdshape2_alpha1_f_bias}, {"nolace_tdshape2_alpha1_f_bias",WEIGHTS_nolace_tdshape2_alpha1_f_bias_TYPE,sizeof(nolace_tdshape2_alpha1_f_bias),nolace_tdshape2_alpha1_f_bias},
#endif #endif
#ifdef WEIGHTS_nolace_tdshape2_alpha1_t_weights_float_DEFINED #ifdef WEIGHTS_nolace_tdshape2_alpha1_t_weights_float_DEFINED
{"nolace_tdshape2_alpha1_t_weights_float", WEIGHTS_nolace_tdshape2_alpha1_t_weights_float_TYPE,sizeof(nolace_tdshape2_alpha1_t_weights_float),nolace_tdshape2_alpha1_t_weights_float}, {"nolace_tdshape2_alpha1_t_weights_float",WEIGHTS_nolace_tdshape2_alpha1_t_weights_float_TYPE,sizeof(nolace_tdshape2_alpha1_t_weights_float),nolace_tdshape2_alpha1_t_weights_float},
#endif #endif
#ifdef WEIGHTS_nolace_tdshape2_alpha1_t_bias_DEFINED #ifdef WEIGHTS_nolace_tdshape2_alpha1_t_bias_DEFINED
{"nolace_tdshape2_alpha1_t_bias", WEIGHTS_nolace_tdshape2_alpha1_t_bias_TYPE,sizeof(nolace_tdshape2_alpha1_t_bias),nolace_tdshape2_alpha1_t_bias}, {"nolace_tdshape2_alpha1_t_bias",WEIGHTS_nolace_tdshape2_alpha1_t_bias_TYPE,sizeof(nolace_tdshape2_alpha1_t_bias),nolace_tdshape2_alpha1_t_bias},
#endif #endif
#ifdef WEIGHTS_nolace_tdshape2_alpha2_weights_float_DEFINED #ifdef WEIGHTS_nolace_tdshape2_alpha2_weights_float_DEFINED
{"nolace_tdshape2_alpha2_weights_float", WEIGHTS_nolace_tdshape2_alpha2_weights_float_TYPE,sizeof(nolace_tdshape2_alpha2_weights_float),nolace_tdshape2_alpha2_weights_float}, {"nolace_tdshape2_alpha2_weights_float",WEIGHTS_nolace_tdshape2_alpha2_weights_float_TYPE,sizeof(nolace_tdshape2_alpha2_weights_float),nolace_tdshape2_alpha2_weights_float},
#endif #endif
#ifdef WEIGHTS_nolace_tdshape2_alpha2_bias_DEFINED #ifdef WEIGHTS_nolace_tdshape2_alpha2_bias_DEFINED
{"nolace_tdshape2_alpha2_bias", WEIGHTS_nolace_tdshape2_alpha2_bias_TYPE,sizeof(nolace_tdshape2_alpha2_bias),nolace_tdshape2_alpha2_bias}, {"nolace_tdshape2_alpha2_bias",WEIGHTS_nolace_tdshape2_alpha2_bias_TYPE,sizeof(nolace_tdshape2_alpha2_bias),nolace_tdshape2_alpha2_bias},
#endif #endif
#ifdef WEIGHTS_nolace_tdshape3_alpha1_f_weights_int8_DEFINED #ifdef WEIGHTS_nolace_tdshape3_alpha1_f_weights_int8_DEFINED
{"nolace_tdshape3_alpha1_f_weights_int8", WEIGHTS_nolace_tdshape3_alpha1_f_weights_int8_TYPE,sizeof(nolace_tdshape3_alpha1_f_weights_int8),nolace_tdshape3_alpha1_f_weights_int8}, {"nolace_tdshape3_alpha1_f_weights_int8",WEIGHTS_nolace_tdshape3_alpha1_f_weights_int8_TYPE,sizeof(nolace_tdshape3_alpha1_f_weights_int8),nolace_tdshape3_alpha1_f_weights_int8},
#endif #endif
#ifdef WEIGHTS_nolace_tdshape3_alpha1_f_weights_float_DEFINED #ifdef WEIGHTS_nolace_tdshape3_alpha1_f_weights_float_DEFINED
{"nolace_tdshape3_alpha1_f_weights_float", WEIGHTS_nolace_tdshape3_alpha1_f_weights_float_TYPE,sizeof(nolace_tdshape3_alpha1_f_weights_float),nolace_tdshape3_alpha1_f_weights_float}, {"nolace_tdshape3_alpha1_f_weights_float",WEIGHTS_nolace_tdshape3_alpha1_f_weights_float_TYPE,sizeof(nolace_tdshape3_alpha1_f_weights_float),nolace_tdshape3_alpha1_f_weights_float},
#endif #endif
#ifdef WEIGHTS_nolace_tdshape3_alpha1_f_subias_DEFINED #ifdef WEIGHTS_nolace_tdshape3_alpha1_f_subias_DEFINED
{"nolace_tdshape3_alpha1_f_subias", WEIGHTS_nolace_tdshape3_alpha1_f_subias_TYPE,sizeof(nolace_tdshape3_alpha1_f_subias),nolace_tdshape3_alpha1_f_subias}, {"nolace_tdshape3_alpha1_f_subias",WEIGHTS_nolace_tdshape3_alpha1_f_subias_TYPE,sizeof(nolace_tdshape3_alpha1_f_subias),nolace_tdshape3_alpha1_f_subias},
#endif #endif
#ifdef WEIGHTS_nolace_tdshape3_alpha1_f_scale_DEFINED #ifdef WEIGHTS_nolace_tdshape3_alpha1_f_scale_DEFINED
{"nolace_tdshape3_alpha1_f_scale", WEIGHTS_nolace_tdshape3_alpha1_f_scale_TYPE,sizeof(nolace_tdshape3_alpha1_f_scale),nolace_tdshape3_alpha1_f_scale}, {"nolace_tdshape3_alpha1_f_scale",WEIGHTS_nolace_tdshape3_alpha1_f_scale_TYPE,sizeof(nolace_tdshape3_alpha1_f_scale),nolace_tdshape3_alpha1_f_scale},
#endif #endif
#ifdef WEIGHTS_nolace_tdshape3_alpha1_f_bias_DEFINED #ifdef WEIGHTS_nolace_tdshape3_alpha1_f_bias_DEFINED
{"nolace_tdshape3_alpha1_f_bias", WEIGHTS_nolace_tdshape3_alpha1_f_bias_TYPE,sizeof(nolace_tdshape3_alpha1_f_bias),nolace_tdshape3_alpha1_f_bias}, {"nolace_tdshape3_alpha1_f_bias",WEIGHTS_nolace_tdshape3_alpha1_f_bias_TYPE,sizeof(nolace_tdshape3_alpha1_f_bias),nolace_tdshape3_alpha1_f_bias},
#endif #endif
#ifdef WEIGHTS_nolace_tdshape3_alpha1_t_weights_float_DEFINED #ifdef WEIGHTS_nolace_tdshape3_alpha1_t_weights_float_DEFINED
{"nolace_tdshape3_alpha1_t_weights_float", WEIGHTS_nolace_tdshape3_alpha1_t_weights_float_TYPE,sizeof(nolace_tdshape3_alpha1_t_weights_float),nolace_tdshape3_alpha1_t_weights_float}, {"nolace_tdshape3_alpha1_t_weights_float",WEIGHTS_nolace_tdshape3_alpha1_t_weights_float_TYPE,sizeof(nolace_tdshape3_alpha1_t_weights_float),nolace_tdshape3_alpha1_t_weights_float},
#endif #endif
#ifdef WEIGHTS_nolace_tdshape3_alpha1_t_bias_DEFINED #ifdef WEIGHTS_nolace_tdshape3_alpha1_t_bias_DEFINED
{"nolace_tdshape3_alpha1_t_bias", WEIGHTS_nolace_tdshape3_alpha1_t_bias_TYPE,sizeof(nolace_tdshape3_alpha1_t_bias),nolace_tdshape3_alpha1_t_bias}, {"nolace_tdshape3_alpha1_t_bias",WEIGHTS_nolace_tdshape3_alpha1_t_bias_TYPE,sizeof(nolace_tdshape3_alpha1_t_bias),nolace_tdshape3_alpha1_t_bias},
#endif #endif
#ifdef WEIGHTS_nolace_tdshape3_alpha2_weights_float_DEFINED #ifdef WEIGHTS_nolace_tdshape3_alpha2_weights_float_DEFINED
{"nolace_tdshape3_alpha2_weights_float", WEIGHTS_nolace_tdshape3_alpha2_weights_float_TYPE,sizeof(nolace_tdshape3_alpha2_weights_float),nolace_tdshape3_alpha2_weights_float}, {"nolace_tdshape3_alpha2_weights_float",WEIGHTS_nolace_tdshape3_alpha2_weights_float_TYPE,sizeof(nolace_tdshape3_alpha2_weights_float),nolace_tdshape3_alpha2_weights_float},
#endif #endif
#ifdef WEIGHTS_nolace_tdshape3_alpha2_bias_DEFINED #ifdef WEIGHTS_nolace_tdshape3_alpha2_bias_DEFINED
{"nolace_tdshape3_alpha2_bias", WEIGHTS_nolace_tdshape3_alpha2_bias_TYPE,sizeof(nolace_tdshape3_alpha2_bias),nolace_tdshape3_alpha2_bias}, {"nolace_tdshape3_alpha2_bias",WEIGHTS_nolace_tdshape3_alpha2_bias_TYPE,sizeof(nolace_tdshape3_alpha2_bias),nolace_tdshape3_alpha2_bias},
#endif #endif
#ifdef WEIGHTS_nolace_af2_kernel_weights_int8_DEFINED #ifdef WEIGHTS_nolace_af2_kernel_weights_int8_DEFINED
{"nolace_af2_kernel_weights_int8", WEIGHTS_nolace_af2_kernel_weights_int8_TYPE,sizeof(nolace_af2_kernel_weights_int8),nolace_af2_kernel_weights_int8}, {"nolace_af2_kernel_weights_int8",WEIGHTS_nolace_af2_kernel_weights_int8_TYPE,sizeof(nolace_af2_kernel_weights_int8),nolace_af2_kernel_weights_int8},
#endif #endif
#ifdef WEIGHTS_nolace_af2_kernel_weights_float_DEFINED #ifdef WEIGHTS_nolace_af2_kernel_weights_float_DEFINED
{"nolace_af2_kernel_weights_float", WEIGHTS_nolace_af2_kernel_weights_float_TYPE,sizeof(nolace_af2_kernel_weights_float),nolace_af2_kernel_weights_float}, {"nolace_af2_kernel_weights_float",WEIGHTS_nolace_af2_kernel_weights_float_TYPE,sizeof(nolace_af2_kernel_weights_float),nolace_af2_kernel_weights_float},
#endif #endif
#ifdef WEIGHTS_nolace_af2_kernel_subias_DEFINED #ifdef WEIGHTS_nolace_af2_kernel_subias_DEFINED
{"nolace_af2_kernel_subias", WEIGHTS_nolace_af2_kernel_subias_TYPE,sizeof(nolace_af2_kernel_subias),nolace_af2_kernel_subias}, {"nolace_af2_kernel_subias",WEIGHTS_nolace_af2_kernel_subias_TYPE,sizeof(nolace_af2_kernel_subias),nolace_af2_kernel_subias},
#endif #endif
#ifdef WEIGHTS_nolace_af2_kernel_scale_DEFINED #ifdef WEIGHTS_nolace_af2_kernel_scale_DEFINED
{"nolace_af2_kernel_scale", WEIGHTS_nolace_af2_kernel_scale_TYPE,sizeof(nolace_af2_kernel_scale),nolace_af2_kernel_scale}, {"nolace_af2_kernel_scale",WEIGHTS_nolace_af2_kernel_scale_TYPE,sizeof(nolace_af2_kernel_scale),nolace_af2_kernel_scale},
#endif #endif
#ifdef WEIGHTS_nolace_af2_kernel_bias_DEFINED #ifdef WEIGHTS_nolace_af2_kernel_bias_DEFINED
{"nolace_af2_kernel_bias", WEIGHTS_nolace_af2_kernel_bias_TYPE,sizeof(nolace_af2_kernel_bias),nolace_af2_kernel_bias}, {"nolace_af2_kernel_bias",WEIGHTS_nolace_af2_kernel_bias_TYPE,sizeof(nolace_af2_kernel_bias),nolace_af2_kernel_bias},
#endif #endif
#ifdef WEIGHTS_nolace_af2_gain_weights_float_DEFINED #ifdef WEIGHTS_nolace_af2_gain_weights_float_DEFINED
{"nolace_af2_gain_weights_float", WEIGHTS_nolace_af2_gain_weights_float_TYPE,sizeof(nolace_af2_gain_weights_float),nolace_af2_gain_weights_float}, {"nolace_af2_gain_weights_float",WEIGHTS_nolace_af2_gain_weights_float_TYPE,sizeof(nolace_af2_gain_weights_float),nolace_af2_gain_weights_float},
#endif #endif
#ifdef WEIGHTS_nolace_af2_gain_bias_DEFINED #ifdef WEIGHTS_nolace_af2_gain_bias_DEFINED
{"nolace_af2_gain_bias", WEIGHTS_nolace_af2_gain_bias_TYPE,sizeof(nolace_af2_gain_bias),nolace_af2_gain_bias}, {"nolace_af2_gain_bias",WEIGHTS_nolace_af2_gain_bias_TYPE,sizeof(nolace_af2_gain_bias),nolace_af2_gain_bias},
#endif #endif
#ifdef WEIGHTS_nolace_af3_kernel_weights_int8_DEFINED #ifdef WEIGHTS_nolace_af3_kernel_weights_int8_DEFINED
{"nolace_af3_kernel_weights_int8", WEIGHTS_nolace_af3_kernel_weights_int8_TYPE,sizeof(nolace_af3_kernel_weights_int8),nolace_af3_kernel_weights_int8}, {"nolace_af3_kernel_weights_int8",WEIGHTS_nolace_af3_kernel_weights_int8_TYPE,sizeof(nolace_af3_kernel_weights_int8),nolace_af3_kernel_weights_int8},
#endif #endif
#ifdef WEIGHTS_nolace_af3_kernel_weights_float_DEFINED #ifdef WEIGHTS_nolace_af3_kernel_weights_float_DEFINED
{"nolace_af3_kernel_weights_float", WEIGHTS_nolace_af3_kernel_weights_float_TYPE,sizeof(nolace_af3_kernel_weights_float),nolace_af3_kernel_weights_float}, {"nolace_af3_kernel_weights_float",WEIGHTS_nolace_af3_kernel_weights_float_TYPE,sizeof(nolace_af3_kernel_weights_float),nolace_af3_kernel_weights_float},
#endif #endif
#ifdef WEIGHTS_nolace_af3_kernel_subias_DEFINED #ifdef WEIGHTS_nolace_af3_kernel_subias_DEFINED
{"nolace_af3_kernel_subias", WEIGHTS_nolace_af3_kernel_subias_TYPE,sizeof(nolace_af3_kernel_subias),nolace_af3_kernel_subias}, {"nolace_af3_kernel_subias",WEIGHTS_nolace_af3_kernel_subias_TYPE,sizeof(nolace_af3_kernel_subias),nolace_af3_kernel_subias},
#endif #endif
#ifdef WEIGHTS_nolace_af3_kernel_scale_DEFINED #ifdef WEIGHTS_nolace_af3_kernel_scale_DEFINED
{"nolace_af3_kernel_scale", WEIGHTS_nolace_af3_kernel_scale_TYPE,sizeof(nolace_af3_kernel_scale),nolace_af3_kernel_scale}, {"nolace_af3_kernel_scale",WEIGHTS_nolace_af3_kernel_scale_TYPE,sizeof(nolace_af3_kernel_scale),nolace_af3_kernel_scale},
#endif #endif
#ifdef WEIGHTS_nolace_af3_kernel_bias_DEFINED #ifdef WEIGHTS_nolace_af3_kernel_bias_DEFINED
{"nolace_af3_kernel_bias", WEIGHTS_nolace_af3_kernel_bias_TYPE,sizeof(nolace_af3_kernel_bias),nolace_af3_kernel_bias}, {"nolace_af3_kernel_bias",WEIGHTS_nolace_af3_kernel_bias_TYPE,sizeof(nolace_af3_kernel_bias),nolace_af3_kernel_bias},
#endif #endif
#ifdef WEIGHTS_nolace_af3_gain_weights_float_DEFINED #ifdef WEIGHTS_nolace_af3_gain_weights_float_DEFINED
{"nolace_af3_gain_weights_float", WEIGHTS_nolace_af3_gain_weights_float_TYPE,sizeof(nolace_af3_gain_weights_float),nolace_af3_gain_weights_float}, {"nolace_af3_gain_weights_float",WEIGHTS_nolace_af3_gain_weights_float_TYPE,sizeof(nolace_af3_gain_weights_float),nolace_af3_gain_weights_float},
#endif #endif
#ifdef WEIGHTS_nolace_af3_gain_bias_DEFINED #ifdef WEIGHTS_nolace_af3_gain_bias_DEFINED
{"nolace_af3_gain_bias", WEIGHTS_nolace_af3_gain_bias_TYPE,sizeof(nolace_af3_gain_bias),nolace_af3_gain_bias}, {"nolace_af3_gain_bias",WEIGHTS_nolace_af3_gain_bias_TYPE,sizeof(nolace_af3_gain_bias),nolace_af3_gain_bias},
#endif #endif
#ifdef WEIGHTS_nolace_af4_kernel_weights_int8_DEFINED #ifdef WEIGHTS_nolace_af4_kernel_weights_int8_DEFINED
{"nolace_af4_kernel_weights_int8", WEIGHTS_nolace_af4_kernel_weights_int8_TYPE,sizeof(nolace_af4_kernel_weights_int8),nolace_af4_kernel_weights_int8}, {"nolace_af4_kernel_weights_int8",WEIGHTS_nolace_af4_kernel_weights_int8_TYPE,sizeof(nolace_af4_kernel_weights_int8),nolace_af4_kernel_weights_int8},
#endif #endif
#ifdef WEIGHTS_nolace_af4_kernel_weights_float_DEFINED #ifdef WEIGHTS_nolace_af4_kernel_weights_float_DEFINED
{"nolace_af4_kernel_weights_float", WEIGHTS_nolace_af4_kernel_weights_float_TYPE,sizeof(nolace_af4_kernel_weights_float),nolace_af4_kernel_weights_float}, {"nolace_af4_kernel_weights_float",WEIGHTS_nolace_af4_kernel_weights_float_TYPE,sizeof(nolace_af4_kernel_weights_float),nolace_af4_kernel_weights_float},
#endif #endif
#ifdef WEIGHTS_nolace_af4_kernel_subias_DEFINED #ifdef WEIGHTS_nolace_af4_kernel_subias_DEFINED
{"nolace_af4_kernel_subias", WEIGHTS_nolace_af4_kernel_subias_TYPE,sizeof(nolace_af4_kernel_subias),nolace_af4_kernel_subias}, {"nolace_af4_kernel_subias",WEIGHTS_nolace_af4_kernel_subias_TYPE,sizeof(nolace_af4_kernel_subias),nolace_af4_kernel_subias},
#endif #endif
#ifdef WEIGHTS_nolace_af4_kernel_scale_DEFINED #ifdef WEIGHTS_nolace_af4_kernel_scale_DEFINED
{"nolace_af4_kernel_scale", WEIGHTS_nolace_af4_kernel_scale_TYPE,sizeof(nolace_af4_kernel_scale),nolace_af4_kernel_scale}, {"nolace_af4_kernel_scale",WEIGHTS_nolace_af4_kernel_scale_TYPE,sizeof(nolace_af4_kernel_scale),nolace_af4_kernel_scale},
#endif #endif
#ifdef WEIGHTS_nolace_af4_kernel_bias_DEFINED #ifdef WEIGHTS_nolace_af4_kernel_bias_DEFINED
{"nolace_af4_kernel_bias", WEIGHTS_nolace_af4_kernel_bias_TYPE,sizeof(nolace_af4_kernel_bias),nolace_af4_kernel_bias}, {"nolace_af4_kernel_bias",WEIGHTS_nolace_af4_kernel_bias_TYPE,sizeof(nolace_af4_kernel_bias),nolace_af4_kernel_bias},
#endif #endif
#ifdef WEIGHTS_nolace_af4_gain_weights_float_DEFINED #ifdef WEIGHTS_nolace_af4_gain_weights_float_DEFINED
{"nolace_af4_gain_weights_float", WEIGHTS_nolace_af4_gain_weights_float_TYPE,sizeof(nolace_af4_gain_weights_float),nolace_af4_gain_weights_float}, {"nolace_af4_gain_weights_float",WEIGHTS_nolace_af4_gain_weights_float_TYPE,sizeof(nolace_af4_gain_weights_float),nolace_af4_gain_weights_float},
#endif #endif
#ifdef WEIGHTS_nolace_af4_gain_bias_DEFINED #ifdef WEIGHTS_nolace_af4_gain_bias_DEFINED
{"nolace_af4_gain_bias", WEIGHTS_nolace_af4_gain_bias_TYPE,sizeof(nolace_af4_gain_bias),nolace_af4_gain_bias}, {"nolace_af4_gain_bias",WEIGHTS_nolace_af4_gain_bias_TYPE,sizeof(nolace_af4_gain_bias),nolace_af4_gain_bias},
#endif #endif
#ifdef WEIGHTS_nolace_post_cf1_weights_int8_DEFINED #ifdef WEIGHTS_nolace_post_cf1_weights_int8_DEFINED
{"nolace_post_cf1_weights_int8", WEIGHTS_nolace_post_cf1_weights_int8_TYPE,sizeof(nolace_post_cf1_weights_int8),nolace_post_cf1_weights_int8}, {"nolace_post_cf1_weights_int8",WEIGHTS_nolace_post_cf1_weights_int8_TYPE,sizeof(nolace_post_cf1_weights_int8),nolace_post_cf1_weights_int8},
#endif #endif
#ifdef WEIGHTS_nolace_post_cf1_weights_float_DEFINED #ifdef WEIGHTS_nolace_post_cf1_weights_float_DEFINED
{"nolace_post_cf1_weights_float", WEIGHTS_nolace_post_cf1_weights_float_TYPE,sizeof(nolace_post_cf1_weights_float),nolace_post_cf1_weights_float}, {"nolace_post_cf1_weights_float",WEIGHTS_nolace_post_cf1_weights_float_TYPE,sizeof(nolace_post_cf1_weights_float),nolace_post_cf1_weights_float},
#endif #endif
#ifdef WEIGHTS_nolace_post_cf1_subias_DEFINED #ifdef WEIGHTS_nolace_post_cf1_subias_DEFINED
{"nolace_post_cf1_subias", WEIGHTS_nolace_post_cf1_subias_TYPE,sizeof(nolace_post_cf1_subias),nolace_post_cf1_subias}, {"nolace_post_cf1_subias",WEIGHTS_nolace_post_cf1_subias_TYPE,sizeof(nolace_post_cf1_subias),nolace_post_cf1_subias},
#endif #endif
#ifdef WEIGHTS_nolace_post_cf1_scale_DEFINED #ifdef WEIGHTS_nolace_post_cf1_scale_DEFINED
{"nolace_post_cf1_scale", WEIGHTS_nolace_post_cf1_scale_TYPE,sizeof(nolace_post_cf1_scale),nolace_post_cf1_scale}, {"nolace_post_cf1_scale",WEIGHTS_nolace_post_cf1_scale_TYPE,sizeof(nolace_post_cf1_scale),nolace_post_cf1_scale},
#endif #endif
#ifdef WEIGHTS_nolace_post_cf1_bias_DEFINED #ifdef WEIGHTS_nolace_post_cf1_bias_DEFINED
{"nolace_post_cf1_bias", WEIGHTS_nolace_post_cf1_bias_TYPE,sizeof(nolace_post_cf1_bias),nolace_post_cf1_bias}, {"nolace_post_cf1_bias",WEIGHTS_nolace_post_cf1_bias_TYPE,sizeof(nolace_post_cf1_bias),nolace_post_cf1_bias},
#endif #endif
#ifdef WEIGHTS_nolace_post_cf2_weights_int8_DEFINED #ifdef WEIGHTS_nolace_post_cf2_weights_int8_DEFINED
{"nolace_post_cf2_weights_int8", WEIGHTS_nolace_post_cf2_weights_int8_TYPE,sizeof(nolace_post_cf2_weights_int8),nolace_post_cf2_weights_int8}, {"nolace_post_cf2_weights_int8",WEIGHTS_nolace_post_cf2_weights_int8_TYPE,sizeof(nolace_post_cf2_weights_int8),nolace_post_cf2_weights_int8},
#endif #endif
#ifdef WEIGHTS_nolace_post_cf2_weights_float_DEFINED #ifdef WEIGHTS_nolace_post_cf2_weights_float_DEFINED
{"nolace_post_cf2_weights_float", WEIGHTS_nolace_post_cf2_weights_float_TYPE,sizeof(nolace_post_cf2_weights_float),nolace_post_cf2_weights_float}, {"nolace_post_cf2_weights_float",WEIGHTS_nolace_post_cf2_weights_float_TYPE,sizeof(nolace_post_cf2_weights_float),nolace_post_cf2_weights_float},
#endif #endif
#ifdef WEIGHTS_nolace_post_cf2_subias_DEFINED #ifdef WEIGHTS_nolace_post_cf2_subias_DEFINED
{"nolace_post_cf2_subias", WEIGHTS_nolace_post_cf2_subias_TYPE,sizeof(nolace_post_cf2_subias),nolace_post_cf2_subias}, {"nolace_post_cf2_subias",WEIGHTS_nolace_post_cf2_subias_TYPE,sizeof(nolace_post_cf2_subias),nolace_post_cf2_subias},
#endif #endif
#ifdef WEIGHTS_nolace_post_cf2_scale_DEFINED #ifdef WEIGHTS_nolace_post_cf2_scale_DEFINED
{"nolace_post_cf2_scale", WEIGHTS_nolace_post_cf2_scale_TYPE,sizeof(nolace_post_cf2_scale),nolace_post_cf2_scale}, {"nolace_post_cf2_scale",WEIGHTS_nolace_post_cf2_scale_TYPE,sizeof(nolace_post_cf2_scale),nolace_post_cf2_scale},
#endif #endif
#ifdef WEIGHTS_nolace_post_cf2_bias_DEFINED #ifdef WEIGHTS_nolace_post_cf2_bias_DEFINED
{"nolace_post_cf2_bias", WEIGHTS_nolace_post_cf2_bias_TYPE,sizeof(nolace_post_cf2_bias),nolace_post_cf2_bias}, {"nolace_post_cf2_bias",WEIGHTS_nolace_post_cf2_bias_TYPE,sizeof(nolace_post_cf2_bias),nolace_post_cf2_bias},
#endif #endif
#ifdef WEIGHTS_nolace_post_af1_weights_int8_DEFINED #ifdef WEIGHTS_nolace_post_af1_weights_int8_DEFINED
{"nolace_post_af1_weights_int8", WEIGHTS_nolace_post_af1_weights_int8_TYPE,sizeof(nolace_post_af1_weights_int8),nolace_post_af1_weights_int8}, {"nolace_post_af1_weights_int8",WEIGHTS_nolace_post_af1_weights_int8_TYPE,sizeof(nolace_post_af1_weights_int8),nolace_post_af1_weights_int8},
#endif #endif
#ifdef WEIGHTS_nolace_post_af1_weights_float_DEFINED #ifdef WEIGHTS_nolace_post_af1_weights_float_DEFINED
{"nolace_post_af1_weights_float", WEIGHTS_nolace_post_af1_weights_float_TYPE,sizeof(nolace_post_af1_weights_float),nolace_post_af1_weights_float}, {"nolace_post_af1_weights_float",WEIGHTS_nolace_post_af1_weights_float_TYPE,sizeof(nolace_post_af1_weights_float),nolace_post_af1_weights_float},
#endif #endif
#ifdef WEIGHTS_nolace_post_af1_subias_DEFINED #ifdef WEIGHTS_nolace_post_af1_subias_DEFINED
{"nolace_post_af1_subias", WEIGHTS_nolace_post_af1_subias_TYPE,sizeof(nolace_post_af1_subias),nolace_post_af1_subias}, {"nolace_post_af1_subias",WEIGHTS_nolace_post_af1_subias_TYPE,sizeof(nolace_post_af1_subias),nolace_post_af1_subias},
#endif #endif
#ifdef WEIGHTS_nolace_post_af1_scale_DEFINED #ifdef WEIGHTS_nolace_post_af1_scale_DEFINED
{"nolace_post_af1_scale", WEIGHTS_nolace_post_af1_scale_TYPE,sizeof(nolace_post_af1_scale),nolace_post_af1_scale}, {"nolace_post_af1_scale",WEIGHTS_nolace_post_af1_scale_TYPE,sizeof(nolace_post_af1_scale),nolace_post_af1_scale},
#endif #endif
#ifdef WEIGHTS_nolace_post_af1_bias_DEFINED #ifdef WEIGHTS_nolace_post_af1_bias_DEFINED
{"nolace_post_af1_bias", WEIGHTS_nolace_post_af1_bias_TYPE,sizeof(nolace_post_af1_bias),nolace_post_af1_bias}, {"nolace_post_af1_bias",WEIGHTS_nolace_post_af1_bias_TYPE,sizeof(nolace_post_af1_bias),nolace_post_af1_bias},
#endif #endif
#ifdef WEIGHTS_nolace_post_af2_weights_int8_DEFINED #ifdef WEIGHTS_nolace_post_af2_weights_int8_DEFINED
{"nolace_post_af2_weights_int8", WEIGHTS_nolace_post_af2_weights_int8_TYPE,sizeof(nolace_post_af2_weights_int8),nolace_post_af2_weights_int8}, {"nolace_post_af2_weights_int8",WEIGHTS_nolace_post_af2_weights_int8_TYPE,sizeof(nolace_post_af2_weights_int8),nolace_post_af2_weights_int8},
#endif #endif
#ifdef WEIGHTS_nolace_post_af2_weights_float_DEFINED #ifdef WEIGHTS_nolace_post_af2_weights_float_DEFINED
{"nolace_post_af2_weights_float", WEIGHTS_nolace_post_af2_weights_float_TYPE,sizeof(nolace_post_af2_weights_float),nolace_post_af2_weights_float}, {"nolace_post_af2_weights_float",WEIGHTS_nolace_post_af2_weights_float_TYPE,sizeof(nolace_post_af2_weights_float),nolace_post_af2_weights_float},
#endif #endif
#ifdef WEIGHTS_nolace_post_af2_subias_DEFINED #ifdef WEIGHTS_nolace_post_af2_subias_DEFINED
{"nolace_post_af2_subias", WEIGHTS_nolace_post_af2_subias_TYPE,sizeof(nolace_post_af2_subias),nolace_post_af2_subias}, {"nolace_post_af2_subias",WEIGHTS_nolace_post_af2_subias_TYPE,sizeof(nolace_post_af2_subias),nolace_post_af2_subias},
#endif #endif
#ifdef WEIGHTS_nolace_post_af2_scale_DEFINED #ifdef WEIGHTS_nolace_post_af2_scale_DEFINED
{"nolace_post_af2_scale", WEIGHTS_nolace_post_af2_scale_TYPE,sizeof(nolace_post_af2_scale),nolace_post_af2_scale}, {"nolace_post_af2_scale",WEIGHTS_nolace_post_af2_scale_TYPE,sizeof(nolace_post_af2_scale),nolace_post_af2_scale},
#endif #endif
#ifdef WEIGHTS_nolace_post_af2_bias_DEFINED #ifdef WEIGHTS_nolace_post_af2_bias_DEFINED
{"nolace_post_af2_bias", WEIGHTS_nolace_post_af2_bias_TYPE,sizeof(nolace_post_af2_bias),nolace_post_af2_bias}, {"nolace_post_af2_bias",WEIGHTS_nolace_post_af2_bias_TYPE,sizeof(nolace_post_af2_bias),nolace_post_af2_bias},
#endif #endif
#ifdef WEIGHTS_nolace_post_af3_weights_int8_DEFINED #ifdef WEIGHTS_nolace_post_af3_weights_int8_DEFINED
{"nolace_post_af3_weights_int8", WEIGHTS_nolace_post_af3_weights_int8_TYPE,sizeof(nolace_post_af3_weights_int8),nolace_post_af3_weights_int8}, {"nolace_post_af3_weights_int8",WEIGHTS_nolace_post_af3_weights_int8_TYPE,sizeof(nolace_post_af3_weights_int8),nolace_post_af3_weights_int8},
#endif #endif
#ifdef WEIGHTS_nolace_post_af3_weights_float_DEFINED #ifdef WEIGHTS_nolace_post_af3_weights_float_DEFINED
{"nolace_post_af3_weights_float", WEIGHTS_nolace_post_af3_weights_float_TYPE,sizeof(nolace_post_af3_weights_float),nolace_post_af3_weights_float}, {"nolace_post_af3_weights_float",WEIGHTS_nolace_post_af3_weights_float_TYPE,sizeof(nolace_post_af3_weights_float),nolace_post_af3_weights_float},
#endif #endif
#ifdef WEIGHTS_nolace_post_af3_subias_DEFINED #ifdef WEIGHTS_nolace_post_af3_subias_DEFINED
{"nolace_post_af3_subias", WEIGHTS_nolace_post_af3_subias_TYPE,sizeof(nolace_post_af3_subias),nolace_post_af3_subias}, {"nolace_post_af3_subias",WEIGHTS_nolace_post_af3_subias_TYPE,sizeof(nolace_post_af3_subias),nolace_post_af3_subias},
#endif #endif
#ifdef WEIGHTS_nolace_post_af3_scale_DEFINED #ifdef WEIGHTS_nolace_post_af3_scale_DEFINED
{"nolace_post_af3_scale", WEIGHTS_nolace_post_af3_scale_TYPE,sizeof(nolace_post_af3_scale),nolace_post_af3_scale}, {"nolace_post_af3_scale",WEIGHTS_nolace_post_af3_scale_TYPE,sizeof(nolace_post_af3_scale),nolace_post_af3_scale},
#endif #endif
#ifdef WEIGHTS_nolace_post_af3_bias_DEFINED #ifdef WEIGHTS_nolace_post_af3_bias_DEFINED
{"nolace_post_af3_bias", WEIGHTS_nolace_post_af3_bias_TYPE,sizeof(nolace_post_af3_bias),nolace_post_af3_bias}, {"nolace_post_af3_bias",WEIGHTS_nolace_post_af3_bias_TYPE,sizeof(nolace_post_af3_bias),nolace_post_af3_bias},
#endif #endif
{NULL,0,0,NULL} {NULL,0,0,NULL}
}; };

View File

@ -8744,106 +8744,106 @@ static const float gru_1_recurrent_bias[192] = {
#ifndef USE_WEIGHTS_FILE #ifndef USE_WEIGHTS_FILE
const WeightArray pitchdnn_arrays[] = { const WeightArray pitchdnn_arrays[] = {
#ifdef WEIGHTS_dense_if_upsampler_1_weights_int8_DEFINED #ifdef WEIGHTS_dense_if_upsampler_1_weights_int8_DEFINED
{"dense_if_upsampler_1_weights_int8", WEIGHTS_dense_if_upsampler_1_weights_int8_TYPE,sizeof(dense_if_upsampler_1_weights_int8),dense_if_upsampler_1_weights_int8}, {"dense_if_upsampler_1_weights_int8",WEIGHTS_dense_if_upsampler_1_weights_int8_TYPE,sizeof(dense_if_upsampler_1_weights_int8),dense_if_upsampler_1_weights_int8},
#endif #endif
#ifdef WEIGHTS_dense_if_upsampler_1_weights_float_DEFINED #ifdef WEIGHTS_dense_if_upsampler_1_weights_float_DEFINED
{"dense_if_upsampler_1_weights_float", WEIGHTS_dense_if_upsampler_1_weights_float_TYPE,sizeof(dense_if_upsampler_1_weights_float),dense_if_upsampler_1_weights_float}, {"dense_if_upsampler_1_weights_float",WEIGHTS_dense_if_upsampler_1_weights_float_TYPE,sizeof(dense_if_upsampler_1_weights_float),dense_if_upsampler_1_weights_float},
#endif #endif
#ifdef WEIGHTS_dense_if_upsampler_1_subias_DEFINED #ifdef WEIGHTS_dense_if_upsampler_1_subias_DEFINED
{"dense_if_upsampler_1_subias", WEIGHTS_dense_if_upsampler_1_subias_TYPE,sizeof(dense_if_upsampler_1_subias),dense_if_upsampler_1_subias}, {"dense_if_upsampler_1_subias",WEIGHTS_dense_if_upsampler_1_subias_TYPE,sizeof(dense_if_upsampler_1_subias),dense_if_upsampler_1_subias},
#endif #endif
#ifdef WEIGHTS_dense_if_upsampler_1_scale_DEFINED #ifdef WEIGHTS_dense_if_upsampler_1_scale_DEFINED
{"dense_if_upsampler_1_scale", WEIGHTS_dense_if_upsampler_1_scale_TYPE,sizeof(dense_if_upsampler_1_scale),dense_if_upsampler_1_scale}, {"dense_if_upsampler_1_scale",WEIGHTS_dense_if_upsampler_1_scale_TYPE,sizeof(dense_if_upsampler_1_scale),dense_if_upsampler_1_scale},
#endif #endif
#ifdef WEIGHTS_dense_if_upsampler_1_bias_DEFINED #ifdef WEIGHTS_dense_if_upsampler_1_bias_DEFINED
{"dense_if_upsampler_1_bias", WEIGHTS_dense_if_upsampler_1_bias_TYPE,sizeof(dense_if_upsampler_1_bias),dense_if_upsampler_1_bias}, {"dense_if_upsampler_1_bias",WEIGHTS_dense_if_upsampler_1_bias_TYPE,sizeof(dense_if_upsampler_1_bias),dense_if_upsampler_1_bias},
#endif #endif
#ifdef WEIGHTS_dense_if_upsampler_2_weights_int8_DEFINED #ifdef WEIGHTS_dense_if_upsampler_2_weights_int8_DEFINED
{"dense_if_upsampler_2_weights_int8", WEIGHTS_dense_if_upsampler_2_weights_int8_TYPE,sizeof(dense_if_upsampler_2_weights_int8),dense_if_upsampler_2_weights_int8}, {"dense_if_upsampler_2_weights_int8",WEIGHTS_dense_if_upsampler_2_weights_int8_TYPE,sizeof(dense_if_upsampler_2_weights_int8),dense_if_upsampler_2_weights_int8},
#endif #endif
#ifdef WEIGHTS_dense_if_upsampler_2_weights_float_DEFINED #ifdef WEIGHTS_dense_if_upsampler_2_weights_float_DEFINED
{"dense_if_upsampler_2_weights_float", WEIGHTS_dense_if_upsampler_2_weights_float_TYPE,sizeof(dense_if_upsampler_2_weights_float),dense_if_upsampler_2_weights_float}, {"dense_if_upsampler_2_weights_float",WEIGHTS_dense_if_upsampler_2_weights_float_TYPE,sizeof(dense_if_upsampler_2_weights_float),dense_if_upsampler_2_weights_float},
#endif #endif
#ifdef WEIGHTS_dense_if_upsampler_2_subias_DEFINED #ifdef WEIGHTS_dense_if_upsampler_2_subias_DEFINED
{"dense_if_upsampler_2_subias", WEIGHTS_dense_if_upsampler_2_subias_TYPE,sizeof(dense_if_upsampler_2_subias),dense_if_upsampler_2_subias}, {"dense_if_upsampler_2_subias",WEIGHTS_dense_if_upsampler_2_subias_TYPE,sizeof(dense_if_upsampler_2_subias),dense_if_upsampler_2_subias},
#endif #endif
#ifdef WEIGHTS_dense_if_upsampler_2_scale_DEFINED #ifdef WEIGHTS_dense_if_upsampler_2_scale_DEFINED
{"dense_if_upsampler_2_scale", WEIGHTS_dense_if_upsampler_2_scale_TYPE,sizeof(dense_if_upsampler_2_scale),dense_if_upsampler_2_scale}, {"dense_if_upsampler_2_scale",WEIGHTS_dense_if_upsampler_2_scale_TYPE,sizeof(dense_if_upsampler_2_scale),dense_if_upsampler_2_scale},
#endif #endif
#ifdef WEIGHTS_dense_if_upsampler_2_bias_DEFINED #ifdef WEIGHTS_dense_if_upsampler_2_bias_DEFINED
{"dense_if_upsampler_2_bias", WEIGHTS_dense_if_upsampler_2_bias_TYPE,sizeof(dense_if_upsampler_2_bias),dense_if_upsampler_2_bias}, {"dense_if_upsampler_2_bias",WEIGHTS_dense_if_upsampler_2_bias_TYPE,sizeof(dense_if_upsampler_2_bias),dense_if_upsampler_2_bias},
#endif #endif
#ifdef WEIGHTS_dense_downsampler_weights_int8_DEFINED #ifdef WEIGHTS_dense_downsampler_weights_int8_DEFINED
{"dense_downsampler_weights_int8", WEIGHTS_dense_downsampler_weights_int8_TYPE,sizeof(dense_downsampler_weights_int8),dense_downsampler_weights_int8}, {"dense_downsampler_weights_int8",WEIGHTS_dense_downsampler_weights_int8_TYPE,sizeof(dense_downsampler_weights_int8),dense_downsampler_weights_int8},
#endif #endif
#ifdef WEIGHTS_dense_downsampler_weights_float_DEFINED #ifdef WEIGHTS_dense_downsampler_weights_float_DEFINED
{"dense_downsampler_weights_float", WEIGHTS_dense_downsampler_weights_float_TYPE,sizeof(dense_downsampler_weights_float),dense_downsampler_weights_float}, {"dense_downsampler_weights_float",WEIGHTS_dense_downsampler_weights_float_TYPE,sizeof(dense_downsampler_weights_float),dense_downsampler_weights_float},
#endif #endif
#ifdef WEIGHTS_dense_downsampler_subias_DEFINED #ifdef WEIGHTS_dense_downsampler_subias_DEFINED
{"dense_downsampler_subias", WEIGHTS_dense_downsampler_subias_TYPE,sizeof(dense_downsampler_subias),dense_downsampler_subias}, {"dense_downsampler_subias",WEIGHTS_dense_downsampler_subias_TYPE,sizeof(dense_downsampler_subias),dense_downsampler_subias},
#endif #endif
#ifdef WEIGHTS_dense_downsampler_scale_DEFINED #ifdef WEIGHTS_dense_downsampler_scale_DEFINED
{"dense_downsampler_scale", WEIGHTS_dense_downsampler_scale_TYPE,sizeof(dense_downsampler_scale),dense_downsampler_scale}, {"dense_downsampler_scale",WEIGHTS_dense_downsampler_scale_TYPE,sizeof(dense_downsampler_scale),dense_downsampler_scale},
#endif #endif
#ifdef WEIGHTS_dense_downsampler_bias_DEFINED #ifdef WEIGHTS_dense_downsampler_bias_DEFINED
{"dense_downsampler_bias", WEIGHTS_dense_downsampler_bias_TYPE,sizeof(dense_downsampler_bias),dense_downsampler_bias}, {"dense_downsampler_bias",WEIGHTS_dense_downsampler_bias_TYPE,sizeof(dense_downsampler_bias),dense_downsampler_bias},
#endif #endif
#ifdef WEIGHTS_dense_final_upsampler_weights_int8_DEFINED #ifdef WEIGHTS_dense_final_upsampler_weights_int8_DEFINED
{"dense_final_upsampler_weights_int8", WEIGHTS_dense_final_upsampler_weights_int8_TYPE,sizeof(dense_final_upsampler_weights_int8),dense_final_upsampler_weights_int8}, {"dense_final_upsampler_weights_int8",WEIGHTS_dense_final_upsampler_weights_int8_TYPE,sizeof(dense_final_upsampler_weights_int8),dense_final_upsampler_weights_int8},
#endif #endif
#ifdef WEIGHTS_dense_final_upsampler_weights_float_DEFINED #ifdef WEIGHTS_dense_final_upsampler_weights_float_DEFINED
{"dense_final_upsampler_weights_float", WEIGHTS_dense_final_upsampler_weights_float_TYPE,sizeof(dense_final_upsampler_weights_float),dense_final_upsampler_weights_float}, {"dense_final_upsampler_weights_float",WEIGHTS_dense_final_upsampler_weights_float_TYPE,sizeof(dense_final_upsampler_weights_float),dense_final_upsampler_weights_float},
#endif #endif
#ifdef WEIGHTS_dense_final_upsampler_subias_DEFINED #ifdef WEIGHTS_dense_final_upsampler_subias_DEFINED
{"dense_final_upsampler_subias", WEIGHTS_dense_final_upsampler_subias_TYPE,sizeof(dense_final_upsampler_subias),dense_final_upsampler_subias}, {"dense_final_upsampler_subias",WEIGHTS_dense_final_upsampler_subias_TYPE,sizeof(dense_final_upsampler_subias),dense_final_upsampler_subias},
#endif #endif
#ifdef WEIGHTS_dense_final_upsampler_scale_DEFINED #ifdef WEIGHTS_dense_final_upsampler_scale_DEFINED
{"dense_final_upsampler_scale", WEIGHTS_dense_final_upsampler_scale_TYPE,sizeof(dense_final_upsampler_scale),dense_final_upsampler_scale}, {"dense_final_upsampler_scale",WEIGHTS_dense_final_upsampler_scale_TYPE,sizeof(dense_final_upsampler_scale),dense_final_upsampler_scale},
#endif #endif
#ifdef WEIGHTS_dense_final_upsampler_bias_DEFINED #ifdef WEIGHTS_dense_final_upsampler_bias_DEFINED
{"dense_final_upsampler_bias", WEIGHTS_dense_final_upsampler_bias_TYPE,sizeof(dense_final_upsampler_bias),dense_final_upsampler_bias}, {"dense_final_upsampler_bias",WEIGHTS_dense_final_upsampler_bias_TYPE,sizeof(dense_final_upsampler_bias),dense_final_upsampler_bias},
#endif #endif
#ifdef WEIGHTS_conv2d_1_weight_float_DEFINED #ifdef WEIGHTS_conv2d_1_weight_float_DEFINED
{"conv2d_1_weight_float", WEIGHTS_conv2d_1_weight_float_TYPE,sizeof(conv2d_1_weight_float),conv2d_1_weight_float}, {"conv2d_1_weight_float",WEIGHTS_conv2d_1_weight_float_TYPE,sizeof(conv2d_1_weight_float),conv2d_1_weight_float},
#endif #endif
#ifdef WEIGHTS_conv2d_1_bias_DEFINED #ifdef WEIGHTS_conv2d_1_bias_DEFINED
{"conv2d_1_bias", WEIGHTS_conv2d_1_bias_TYPE,sizeof(conv2d_1_bias),conv2d_1_bias}, {"conv2d_1_bias",WEIGHTS_conv2d_1_bias_TYPE,sizeof(conv2d_1_bias),conv2d_1_bias},
#endif #endif
#ifdef WEIGHTS_conv2d_2_weight_float_DEFINED #ifdef WEIGHTS_conv2d_2_weight_float_DEFINED
{"conv2d_2_weight_float", WEIGHTS_conv2d_2_weight_float_TYPE,sizeof(conv2d_2_weight_float),conv2d_2_weight_float}, {"conv2d_2_weight_float",WEIGHTS_conv2d_2_weight_float_TYPE,sizeof(conv2d_2_weight_float),conv2d_2_weight_float},
#endif #endif
#ifdef WEIGHTS_conv2d_2_bias_DEFINED #ifdef WEIGHTS_conv2d_2_bias_DEFINED
{"conv2d_2_bias", WEIGHTS_conv2d_2_bias_TYPE,sizeof(conv2d_2_bias),conv2d_2_bias}, {"conv2d_2_bias",WEIGHTS_conv2d_2_bias_TYPE,sizeof(conv2d_2_bias),conv2d_2_bias},
#endif #endif
#ifdef WEIGHTS_gru_1_input_weights_int8_DEFINED #ifdef WEIGHTS_gru_1_input_weights_int8_DEFINED
{"gru_1_input_weights_int8", WEIGHTS_gru_1_input_weights_int8_TYPE,sizeof(gru_1_input_weights_int8),gru_1_input_weights_int8}, {"gru_1_input_weights_int8",WEIGHTS_gru_1_input_weights_int8_TYPE,sizeof(gru_1_input_weights_int8),gru_1_input_weights_int8},
#endif #endif
#ifdef WEIGHTS_gru_1_input_weights_float_DEFINED #ifdef WEIGHTS_gru_1_input_weights_float_DEFINED
{"gru_1_input_weights_float", WEIGHTS_gru_1_input_weights_float_TYPE,sizeof(gru_1_input_weights_float),gru_1_input_weights_float}, {"gru_1_input_weights_float",WEIGHTS_gru_1_input_weights_float_TYPE,sizeof(gru_1_input_weights_float),gru_1_input_weights_float},
#endif #endif
#ifdef WEIGHTS_gru_1_input_subias_DEFINED #ifdef WEIGHTS_gru_1_input_subias_DEFINED
{"gru_1_input_subias", WEIGHTS_gru_1_input_subias_TYPE,sizeof(gru_1_input_subias),gru_1_input_subias}, {"gru_1_input_subias",WEIGHTS_gru_1_input_subias_TYPE,sizeof(gru_1_input_subias),gru_1_input_subias},
#endif #endif
#ifdef WEIGHTS_gru_1_input_scale_DEFINED #ifdef WEIGHTS_gru_1_input_scale_DEFINED
{"gru_1_input_scale", WEIGHTS_gru_1_input_scale_TYPE,sizeof(gru_1_input_scale),gru_1_input_scale}, {"gru_1_input_scale",WEIGHTS_gru_1_input_scale_TYPE,sizeof(gru_1_input_scale),gru_1_input_scale},
#endif #endif
#ifdef WEIGHTS_gru_1_input_bias_DEFINED #ifdef WEIGHTS_gru_1_input_bias_DEFINED
{"gru_1_input_bias", WEIGHTS_gru_1_input_bias_TYPE,sizeof(gru_1_input_bias),gru_1_input_bias}, {"gru_1_input_bias",WEIGHTS_gru_1_input_bias_TYPE,sizeof(gru_1_input_bias),gru_1_input_bias},
#endif #endif
#ifdef WEIGHTS_gru_1_recurrent_weights_int8_DEFINED #ifdef WEIGHTS_gru_1_recurrent_weights_int8_DEFINED
{"gru_1_recurrent_weights_int8", WEIGHTS_gru_1_recurrent_weights_int8_TYPE,sizeof(gru_1_recurrent_weights_int8),gru_1_recurrent_weights_int8}, {"gru_1_recurrent_weights_int8",WEIGHTS_gru_1_recurrent_weights_int8_TYPE,sizeof(gru_1_recurrent_weights_int8),gru_1_recurrent_weights_int8},
#endif #endif
#ifdef WEIGHTS_gru_1_recurrent_weights_float_DEFINED #ifdef WEIGHTS_gru_1_recurrent_weights_float_DEFINED
{"gru_1_recurrent_weights_float", WEIGHTS_gru_1_recurrent_weights_float_TYPE,sizeof(gru_1_recurrent_weights_float),gru_1_recurrent_weights_float}, {"gru_1_recurrent_weights_float",WEIGHTS_gru_1_recurrent_weights_float_TYPE,sizeof(gru_1_recurrent_weights_float),gru_1_recurrent_weights_float},
#endif #endif
#ifdef WEIGHTS_gru_1_recurrent_subias_DEFINED #ifdef WEIGHTS_gru_1_recurrent_subias_DEFINED
{"gru_1_recurrent_subias", WEIGHTS_gru_1_recurrent_subias_TYPE,sizeof(gru_1_recurrent_subias),gru_1_recurrent_subias}, {"gru_1_recurrent_subias",WEIGHTS_gru_1_recurrent_subias_TYPE,sizeof(gru_1_recurrent_subias),gru_1_recurrent_subias},
#endif #endif
#ifdef WEIGHTS_gru_1_recurrent_scale_DEFINED #ifdef WEIGHTS_gru_1_recurrent_scale_DEFINED
{"gru_1_recurrent_scale", WEIGHTS_gru_1_recurrent_scale_TYPE,sizeof(gru_1_recurrent_scale),gru_1_recurrent_scale}, {"gru_1_recurrent_scale",WEIGHTS_gru_1_recurrent_scale_TYPE,sizeof(gru_1_recurrent_scale),gru_1_recurrent_scale},
#endif #endif
#ifdef WEIGHTS_gru_1_recurrent_bias_DEFINED #ifdef WEIGHTS_gru_1_recurrent_bias_DEFINED
{"gru_1_recurrent_bias", WEIGHTS_gru_1_recurrent_bias_TYPE,sizeof(gru_1_recurrent_bias),gru_1_recurrent_bias}, {"gru_1_recurrent_bias",WEIGHTS_gru_1_recurrent_bias_TYPE,sizeof(gru_1_recurrent_bias),gru_1_recurrent_bias},
#endif #endif
{NULL,0,0,NULL} {NULL,0,0,NULL}
}; };

View File

@ -53190,76 +53190,76 @@ static const float plc_gru2_recurrent_bias[576] = {
#ifndef USE_WEIGHTS_FILE #ifndef USE_WEIGHTS_FILE
const WeightArray plcmodel_arrays[] = { const WeightArray plcmodel_arrays[] = {
#ifdef WEIGHTS_plc_dense_in_weights_float_DEFINED #ifdef WEIGHTS_plc_dense_in_weights_float_DEFINED
{"plc_dense_in_weights_float", WEIGHTS_plc_dense_in_weights_float_TYPE,sizeof(plc_dense_in_weights_float),plc_dense_in_weights_float}, {"plc_dense_in_weights_float",WEIGHTS_plc_dense_in_weights_float_TYPE,sizeof(plc_dense_in_weights_float),plc_dense_in_weights_float},
#endif #endif
#ifdef WEIGHTS_plc_dense_in_bias_DEFINED #ifdef WEIGHTS_plc_dense_in_bias_DEFINED
{"plc_dense_in_bias", WEIGHTS_plc_dense_in_bias_TYPE,sizeof(plc_dense_in_bias),plc_dense_in_bias}, {"plc_dense_in_bias",WEIGHTS_plc_dense_in_bias_TYPE,sizeof(plc_dense_in_bias),plc_dense_in_bias},
#endif #endif
#ifdef WEIGHTS_plc_dense_out_weights_float_DEFINED #ifdef WEIGHTS_plc_dense_out_weights_float_DEFINED
{"plc_dense_out_weights_float", WEIGHTS_plc_dense_out_weights_float_TYPE,sizeof(plc_dense_out_weights_float),plc_dense_out_weights_float}, {"plc_dense_out_weights_float",WEIGHTS_plc_dense_out_weights_float_TYPE,sizeof(plc_dense_out_weights_float),plc_dense_out_weights_float},
#endif #endif
#ifdef WEIGHTS_plc_dense_out_bias_DEFINED #ifdef WEIGHTS_plc_dense_out_bias_DEFINED
{"plc_dense_out_bias", WEIGHTS_plc_dense_out_bias_TYPE,sizeof(plc_dense_out_bias),plc_dense_out_bias}, {"plc_dense_out_bias",WEIGHTS_plc_dense_out_bias_TYPE,sizeof(plc_dense_out_bias),plc_dense_out_bias},
#endif #endif
#ifdef WEIGHTS_plc_gru1_input_weights_int8_DEFINED #ifdef WEIGHTS_plc_gru1_input_weights_int8_DEFINED
{"plc_gru1_input_weights_int8", WEIGHTS_plc_gru1_input_weights_int8_TYPE,sizeof(plc_gru1_input_weights_int8),plc_gru1_input_weights_int8}, {"plc_gru1_input_weights_int8",WEIGHTS_plc_gru1_input_weights_int8_TYPE,sizeof(plc_gru1_input_weights_int8),plc_gru1_input_weights_int8},
#endif #endif
#ifdef WEIGHTS_plc_gru1_input_weights_float_DEFINED #ifdef WEIGHTS_plc_gru1_input_weights_float_DEFINED
{"plc_gru1_input_weights_float", WEIGHTS_plc_gru1_input_weights_float_TYPE,sizeof(plc_gru1_input_weights_float),plc_gru1_input_weights_float}, {"plc_gru1_input_weights_float",WEIGHTS_plc_gru1_input_weights_float_TYPE,sizeof(plc_gru1_input_weights_float),plc_gru1_input_weights_float},
#endif #endif
#ifdef WEIGHTS_plc_gru1_input_subias_DEFINED #ifdef WEIGHTS_plc_gru1_input_subias_DEFINED
{"plc_gru1_input_subias", WEIGHTS_plc_gru1_input_subias_TYPE,sizeof(plc_gru1_input_subias),plc_gru1_input_subias}, {"plc_gru1_input_subias",WEIGHTS_plc_gru1_input_subias_TYPE,sizeof(plc_gru1_input_subias),plc_gru1_input_subias},
#endif #endif
#ifdef WEIGHTS_plc_gru1_input_scale_DEFINED #ifdef WEIGHTS_plc_gru1_input_scale_DEFINED
{"plc_gru1_input_scale", WEIGHTS_plc_gru1_input_scale_TYPE,sizeof(plc_gru1_input_scale),plc_gru1_input_scale}, {"plc_gru1_input_scale",WEIGHTS_plc_gru1_input_scale_TYPE,sizeof(plc_gru1_input_scale),plc_gru1_input_scale},
#endif #endif
#ifdef WEIGHTS_plc_gru1_input_bias_DEFINED #ifdef WEIGHTS_plc_gru1_input_bias_DEFINED
{"plc_gru1_input_bias", WEIGHTS_plc_gru1_input_bias_TYPE,sizeof(plc_gru1_input_bias),plc_gru1_input_bias}, {"plc_gru1_input_bias",WEIGHTS_plc_gru1_input_bias_TYPE,sizeof(plc_gru1_input_bias),plc_gru1_input_bias},
#endif #endif
#ifdef WEIGHTS_plc_gru1_recurrent_weights_int8_DEFINED #ifdef WEIGHTS_plc_gru1_recurrent_weights_int8_DEFINED
{"plc_gru1_recurrent_weights_int8", WEIGHTS_plc_gru1_recurrent_weights_int8_TYPE,sizeof(plc_gru1_recurrent_weights_int8),plc_gru1_recurrent_weights_int8}, {"plc_gru1_recurrent_weights_int8",WEIGHTS_plc_gru1_recurrent_weights_int8_TYPE,sizeof(plc_gru1_recurrent_weights_int8),plc_gru1_recurrent_weights_int8},
#endif #endif
#ifdef WEIGHTS_plc_gru1_recurrent_weights_float_DEFINED #ifdef WEIGHTS_plc_gru1_recurrent_weights_float_DEFINED
{"plc_gru1_recurrent_weights_float", WEIGHTS_plc_gru1_recurrent_weights_float_TYPE,sizeof(plc_gru1_recurrent_weights_float),plc_gru1_recurrent_weights_float}, {"plc_gru1_recurrent_weights_float",WEIGHTS_plc_gru1_recurrent_weights_float_TYPE,sizeof(plc_gru1_recurrent_weights_float),plc_gru1_recurrent_weights_float},
#endif #endif
#ifdef WEIGHTS_plc_gru1_recurrent_subias_DEFINED #ifdef WEIGHTS_plc_gru1_recurrent_subias_DEFINED
{"plc_gru1_recurrent_subias", WEIGHTS_plc_gru1_recurrent_subias_TYPE,sizeof(plc_gru1_recurrent_subias),plc_gru1_recurrent_subias}, {"plc_gru1_recurrent_subias",WEIGHTS_plc_gru1_recurrent_subias_TYPE,sizeof(plc_gru1_recurrent_subias),plc_gru1_recurrent_subias},
#endif #endif
#ifdef WEIGHTS_plc_gru1_recurrent_scale_DEFINED #ifdef WEIGHTS_plc_gru1_recurrent_scale_DEFINED
{"plc_gru1_recurrent_scale", WEIGHTS_plc_gru1_recurrent_scale_TYPE,sizeof(plc_gru1_recurrent_scale),plc_gru1_recurrent_scale}, {"plc_gru1_recurrent_scale",WEIGHTS_plc_gru1_recurrent_scale_TYPE,sizeof(plc_gru1_recurrent_scale),plc_gru1_recurrent_scale},
#endif #endif
#ifdef WEIGHTS_plc_gru1_recurrent_bias_DEFINED #ifdef WEIGHTS_plc_gru1_recurrent_bias_DEFINED
{"plc_gru1_recurrent_bias", WEIGHTS_plc_gru1_recurrent_bias_TYPE,sizeof(plc_gru1_recurrent_bias),plc_gru1_recurrent_bias}, {"plc_gru1_recurrent_bias",WEIGHTS_plc_gru1_recurrent_bias_TYPE,sizeof(plc_gru1_recurrent_bias),plc_gru1_recurrent_bias},
#endif #endif
#ifdef WEIGHTS_plc_gru2_input_weights_int8_DEFINED #ifdef WEIGHTS_plc_gru2_input_weights_int8_DEFINED
{"plc_gru2_input_weights_int8", WEIGHTS_plc_gru2_input_weights_int8_TYPE,sizeof(plc_gru2_input_weights_int8),plc_gru2_input_weights_int8}, {"plc_gru2_input_weights_int8",WEIGHTS_plc_gru2_input_weights_int8_TYPE,sizeof(plc_gru2_input_weights_int8),plc_gru2_input_weights_int8},
#endif #endif
#ifdef WEIGHTS_plc_gru2_input_weights_float_DEFINED #ifdef WEIGHTS_plc_gru2_input_weights_float_DEFINED
{"plc_gru2_input_weights_float", WEIGHTS_plc_gru2_input_weights_float_TYPE,sizeof(plc_gru2_input_weights_float),plc_gru2_input_weights_float}, {"plc_gru2_input_weights_float",WEIGHTS_plc_gru2_input_weights_float_TYPE,sizeof(plc_gru2_input_weights_float),plc_gru2_input_weights_float},
#endif #endif
#ifdef WEIGHTS_plc_gru2_input_subias_DEFINED #ifdef WEIGHTS_plc_gru2_input_subias_DEFINED
{"plc_gru2_input_subias", WEIGHTS_plc_gru2_input_subias_TYPE,sizeof(plc_gru2_input_subias),plc_gru2_input_subias}, {"plc_gru2_input_subias",WEIGHTS_plc_gru2_input_subias_TYPE,sizeof(plc_gru2_input_subias),plc_gru2_input_subias},
#endif #endif
#ifdef WEIGHTS_plc_gru2_input_scale_DEFINED #ifdef WEIGHTS_plc_gru2_input_scale_DEFINED
{"plc_gru2_input_scale", WEIGHTS_plc_gru2_input_scale_TYPE,sizeof(plc_gru2_input_scale),plc_gru2_input_scale}, {"plc_gru2_input_scale",WEIGHTS_plc_gru2_input_scale_TYPE,sizeof(plc_gru2_input_scale),plc_gru2_input_scale},
#endif #endif
#ifdef WEIGHTS_plc_gru2_input_bias_DEFINED #ifdef WEIGHTS_plc_gru2_input_bias_DEFINED
{"plc_gru2_input_bias", WEIGHTS_plc_gru2_input_bias_TYPE,sizeof(plc_gru2_input_bias),plc_gru2_input_bias}, {"plc_gru2_input_bias",WEIGHTS_plc_gru2_input_bias_TYPE,sizeof(plc_gru2_input_bias),plc_gru2_input_bias},
#endif #endif
#ifdef WEIGHTS_plc_gru2_recurrent_weights_int8_DEFINED #ifdef WEIGHTS_plc_gru2_recurrent_weights_int8_DEFINED
{"plc_gru2_recurrent_weights_int8", WEIGHTS_plc_gru2_recurrent_weights_int8_TYPE,sizeof(plc_gru2_recurrent_weights_int8),plc_gru2_recurrent_weights_int8}, {"plc_gru2_recurrent_weights_int8",WEIGHTS_plc_gru2_recurrent_weights_int8_TYPE,sizeof(plc_gru2_recurrent_weights_int8),plc_gru2_recurrent_weights_int8},
#endif #endif
#ifdef WEIGHTS_plc_gru2_recurrent_weights_float_DEFINED #ifdef WEIGHTS_plc_gru2_recurrent_weights_float_DEFINED
{"plc_gru2_recurrent_weights_float", WEIGHTS_plc_gru2_recurrent_weights_float_TYPE,sizeof(plc_gru2_recurrent_weights_float),plc_gru2_recurrent_weights_float}, {"plc_gru2_recurrent_weights_float",WEIGHTS_plc_gru2_recurrent_weights_float_TYPE,sizeof(plc_gru2_recurrent_weights_float),plc_gru2_recurrent_weights_float},
#endif #endif
#ifdef WEIGHTS_plc_gru2_recurrent_subias_DEFINED #ifdef WEIGHTS_plc_gru2_recurrent_subias_DEFINED
{"plc_gru2_recurrent_subias", WEIGHTS_plc_gru2_recurrent_subias_TYPE,sizeof(plc_gru2_recurrent_subias),plc_gru2_recurrent_subias}, {"plc_gru2_recurrent_subias",WEIGHTS_plc_gru2_recurrent_subias_TYPE,sizeof(plc_gru2_recurrent_subias),plc_gru2_recurrent_subias},
#endif #endif
#ifdef WEIGHTS_plc_gru2_recurrent_scale_DEFINED #ifdef WEIGHTS_plc_gru2_recurrent_scale_DEFINED
{"plc_gru2_recurrent_scale", WEIGHTS_plc_gru2_recurrent_scale_TYPE,sizeof(plc_gru2_recurrent_scale),plc_gru2_recurrent_scale}, {"plc_gru2_recurrent_scale",WEIGHTS_plc_gru2_recurrent_scale_TYPE,sizeof(plc_gru2_recurrent_scale),plc_gru2_recurrent_scale},
#endif #endif
#ifdef WEIGHTS_plc_gru2_recurrent_bias_DEFINED #ifdef WEIGHTS_plc_gru2_recurrent_bias_DEFINED
{"plc_gru2_recurrent_bias", WEIGHTS_plc_gru2_recurrent_bias_TYPE,sizeof(plc_gru2_recurrent_bias),plc_gru2_recurrent_bias}, {"plc_gru2_recurrent_bias",WEIGHTS_plc_gru2_recurrent_bias_TYPE,sizeof(plc_gru2_recurrent_bias),plc_gru2_recurrent_bias},
#endif #endif
{NULL,0,0,NULL} {NULL,0,0,NULL}
}; };

View File

@ -34,7 +34,7 @@
#include <arm_neon.h> #include <arm_neon.h>
#include "os_support.h" #include "os_support.h"
#if defined(__arm__) && !defined(__aarch64__) #if defined(__arm__) && !defined(__aarch64__) && (__ARM_ARCH < 8 || !defined(__clang__))
/* Emulate vcvtnq_s32_f32() for ARMv7 Neon. */ /* Emulate vcvtnq_s32_f32() for ARMv7 Neon. */
static OPUS_INLINE int32x4_t vcvtnq_s32_f32(float32x4_t x) { static OPUS_INLINE int32x4_t vcvtnq_s32_f32(float32x4_t x) {
return vrshrq_n_s32(vcvtq_n_s32_f32(x, 8), 8); return vrshrq_n_s32(vcvtq_n_s32_f32(x, 8), 8);

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.16.1 from Makefile.am. # Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2018 Free Software Foundation, Inc. # Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -129,6 +129,7 @@ AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@ AR = @AR@
ARM2GNU_PARAMS = @ARM2GNU_PARAMS@ ARM2GNU_PARAMS = @ARM2GNU_PARAMS@
ARM_DOTPROD_INTR_CFLAGS = @ARM_DOTPROD_INTR_CFLAGS@
ARM_NEON_INTR_CFLAGS = @ARM_NEON_INTR_CFLAGS@ ARM_NEON_INTR_CFLAGS = @ARM_NEON_INTR_CFLAGS@
AUTOCONF = @AUTOCONF@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@ AUTOHEADER = @AUTOHEADER@
@ -142,6 +143,8 @@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
CPP = @CPP@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@ CPPFLAGS = @CPPFLAGS@
CSCOPE = @CSCOPE@
CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@ DEFS = @DEFS@
DEPDIR = @DEPDIR@ DEPDIR = @DEPDIR@
@ -152,6 +155,7 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
EGREP = @EGREP@ EGREP = @EGREP@
ETAGS = @ETAGS@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
FGREP = @FGREP@ FGREP = @FGREP@
GREP = @GREP@ GREP = @GREP@
@ -184,6 +188,8 @@ NM = @NM@
NMEDIT = @NMEDIT@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@ OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
OPUS_ARM_DOTPROD_INTR_CFLAGS = @OPUS_ARM_DOTPROD_INTR_CFLAGS@
OPUS_ARM_MAY_HAVE_DOTPROD = @OPUS_ARM_MAY_HAVE_DOTPROD@
OPUS_ARM_MAY_HAVE_EDSP = @OPUS_ARM_MAY_HAVE_EDSP@ OPUS_ARM_MAY_HAVE_EDSP = @OPUS_ARM_MAY_HAVE_EDSP@
OPUS_ARM_MAY_HAVE_MEDIA = @OPUS_ARM_MAY_HAVE_MEDIA@ OPUS_ARM_MAY_HAVE_MEDIA = @OPUS_ARM_MAY_HAVE_MEDIA@
OPUS_ARM_MAY_HAVE_NEON = @OPUS_ARM_MAY_HAVE_NEON@ OPUS_ARM_MAY_HAVE_NEON = @OPUS_ARM_MAY_HAVE_NEON@
@ -192,7 +198,7 @@ OPUS_HAVE_RTCD = @OPUS_HAVE_RTCD@
OPUS_LT_AGE = @OPUS_LT_AGE@ OPUS_LT_AGE = @OPUS_LT_AGE@
OPUS_LT_CURRENT = @OPUS_LT_CURRENT@ OPUS_LT_CURRENT = @OPUS_LT_CURRENT@
OPUS_LT_REVISION = @OPUS_LT_REVISION@ OPUS_LT_REVISION = @OPUS_LT_REVISION@
OPUS_X86_AVX_CFLAGS = @OPUS_X86_AVX_CFLAGS@ OPUS_X86_AVX2_CFLAGS = @OPUS_X86_AVX2_CFLAGS@
OPUS_X86_SSE2_CFLAGS = @OPUS_X86_SSE2_CFLAGS@ OPUS_X86_SSE2_CFLAGS = @OPUS_X86_SSE2_CFLAGS@
OPUS_X86_SSE4_1_CFLAGS = @OPUS_X86_SSE4_1_CFLAGS@ OPUS_X86_SSE4_1_CFLAGS = @OPUS_X86_SSE4_1_CFLAGS@
OPUS_X86_SSE_CFLAGS = @OPUS_X86_SSE_CFLAGS@ OPUS_X86_SSE_CFLAGS = @OPUS_X86_SSE_CFLAGS@
@ -213,7 +219,7 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@ SHELL = @SHELL@
STRIP = @STRIP@ STRIP = @STRIP@
VERSION = @VERSION@ VERSION = @VERSION@
X86_AVX_CFLAGS = @X86_AVX_CFLAGS@ X86_AVX2_CFLAGS = @X86_AVX2_CFLAGS@
X86_SSE2_CFLAGS = @X86_SSE2_CFLAGS@ X86_SSE2_CFLAGS = @X86_SSE2_CFLAGS@
X86_SSE4_1_CFLAGS = @X86_SSE4_1_CFLAGS@ X86_SSE4_1_CFLAGS = @X86_SSE4_1_CFLAGS@
X86_SSE_CFLAGS = @X86_SSE_CFLAGS@ X86_SSE_CFLAGS = @X86_SSE_CFLAGS@
@ -328,7 +334,6 @@ ctags CTAGS:
cscope cscopelist: cscope cscopelist:
distdir: $(BUILT_SOURCES) distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am $(MAKE) $(AM_MAKEFLAGS) distdir-am
@ -397,9 +402,9 @@ distclean-generic:
maintainer-clean-generic: maintainer-clean-generic:
@echo "This command is intended for maintainers to use" @echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild." @echo "it deletes files that may require special tools to rebuild."
@HAVE_DOXYGEN_FALSE@uninstall-local:
@HAVE_DOXYGEN_FALSE@clean-local: @HAVE_DOXYGEN_FALSE@clean-local:
@HAVE_DOXYGEN_FALSE@install-data-local: @HAVE_DOXYGEN_FALSE@install-data-local:
@HAVE_DOXYGEN_FALSE@uninstall-local:
clean: clean-am clean: clean-am
clean-am: clean-generic clean-libtool clean-local mostlyclean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am

View File

@ -103,7 +103,7 @@ extern "C" {
* @endcode * @endcode
* *
* where opus_encoder_get_size() returns the required size for the encoder state. Note that * where opus_encoder_get_size() returns the required size for the encoder state. Note that
* future versions of this code may change the size, so no assuptions should be made about it. * future versions of this code may change the size, so no assumptions should be made about it.
* *
* The encoder state is always continuous in memory and only a shallow copy is sufficient * The encoder state is always continuous in memory and only a shallow copy is sufficient
* to copy it (e.g. memcpy()) * to copy it (e.g. memcpy())
@ -357,7 +357,7 @@ OPUS_EXPORT int opus_encoder_ctl(OpusEncoder *st, int request, ...) OPUS_ARG_NON
* error = opus_decoder_init(dec, Fs, channels); * error = opus_decoder_init(dec, Fs, channels);
* @endcode * @endcode
* where opus_decoder_get_size() returns the required size for the decoder state. Note that * where opus_decoder_get_size() returns the required size for the decoder state. Note that
* future versions of this code may change the size, so no assuptions should be made about it. * future versions of this code may change the size, so no assumptions should be made about it.
* *
* The decoder state is always continuous in memory and only a shallow copy is sufficient * The decoder state is always continuous in memory and only a shallow copy is sufficient
* to copy it (e.g. memcpy()) * to copy it (e.g. memcpy())
@ -398,6 +398,21 @@ OPUS_EXPORT int opus_encoder_ctl(OpusEncoder *st, int request, ...) OPUS_ARG_NON
*/ */
typedef struct OpusDecoder OpusDecoder; typedef struct OpusDecoder OpusDecoder;
/** Opus DRED decoder.
* This contains the complete state of an Opus DRED decoder.
* It is position independent and can be freely copied.
* @see opus_dred_decoder_create,opus_dred_decoder_init
*/
typedef struct OpusDREDDecoder OpusDREDDecoder;
/** Opus DRED state.
* This contains the complete state of an Opus DRED packet.
* It is position independent and can be freely copied.
* @see opus_dred_create,opus_dred_init
*/
typedef struct OpusDRED OpusDRED;
/** Gets the size of an <code>OpusDecoder</code> structure. /** Gets the size of an <code>OpusDecoder</code> structure.
* @param [in] channels <tt>int</tt>: Number of channels. * @param [in] channels <tt>int</tt>: Number of channels.
* This must be 1 or 2. * This must be 1 or 2.
@ -511,6 +526,101 @@ OPUS_EXPORT int opus_decoder_ctl(OpusDecoder *st, int request, ...) OPUS_ARG_NON
*/ */
OPUS_EXPORT void opus_decoder_destroy(OpusDecoder *st); OPUS_EXPORT void opus_decoder_destroy(OpusDecoder *st);
/** Gets the size of an <code>OpusDREDDecoder</code> structure.
* @returns The size in bytes.
*/
OPUS_EXPORT int opus_dred_decoder_get_size(void);
/** Allocates and initializes an OpusDREDDecoder state.
* @param [out] error <tt>int*</tt>: #OPUS_OK Success or @ref opus_errorcodes
*/
OPUS_EXPORT OpusDREDDecoder *opus_dred_decoder_create(int *error);
/** Initializes an <code>OpusDREDDecoder</code> state.
* @param[in] dec <tt>OpusDREDDecoder*</tt>: State to be initialized.
*/
OPUS_EXPORT int opus_dred_decoder_init(OpusDREDDecoder *dec);
/** Frees an <code>OpusDREDDecoder</code> allocated by opus_dred_decoder_create().
* @param[in] dec <tt>OpusDREDDecoder*</tt>: State to be freed.
*/
OPUS_EXPORT void opus_dred_decoder_destroy(OpusDREDDecoder *dec);
/** Perform a CTL function on an Opus DRED decoder.
*
* Generally the request and subsequent arguments are generated
* by a convenience macro.
* @param dred_dec <tt>OpusDREDDecoder*</tt>: DRED Decoder state.
* @param request This and all remaining parameters should be replaced by one
* of the convenience macros in @ref opus_genericctls or
* @ref opus_decoderctls.
* @see opus_genericctls
* @see opus_decoderctls
*/
OPUS_EXPORT int opus_dred_decoder_ctl(OpusDREDDecoder *dred_dec, int request, ...);
/** Gets the size of an <code>OpusDRED</code> structure.
* @returns The size in bytes.
*/
OPUS_EXPORT int opus_dred_get_size(void);
/** Allocates and initializes a DRED state.
* @param [out] error <tt>int*</tt>: #OPUS_OK Success or @ref opus_errorcodes
*/
OPUS_EXPORT OpusDRED *opus_dred_alloc(int *error);
/** Frees an <code>OpusDRED</code> allocated by opus_dred_create().
* @param[in] dec <tt>OpusDRED*</tt>: State to be freed.
*/
OPUS_EXPORT void opus_dred_free(OpusDRED *dec);
/** Decode an Opus DRED packet.
* @param [in] dred_dec <tt>OpusDRED*</tt>: DRED Decoder state
* @param [in] dred <tt>OpusDRED*</tt>: DRED state
* @param [in] data <tt>char*</tt>: Input payload
* @param [in] len <tt>opus_int32</tt>: Number of bytes in payload
* @param [in] max_dred_samples <tt>opus_int32</tt>: Maximum number of DRED samples that may be needed (if available in the packet).
* @param [in] sampling_rate <tt>opus_int32</tt>: Sampling rate used for max_dred_samples argument. Needs not match the actual sampling rate of the decoder.
* @param [out] dred_end <tt>opus_int32*</tt>: Number of non-encoded (silence) samples between the DRED timestamp and the last DRED sample.
* @param [in] defer_processing <tt>int</tt>: Flag (0 or 1). If set to one, the CPU-intensive part of the DRED decoding is deferred until opus_dred_process() is called.
* @returns Offset (positive) of the first decoded DRED samples, zero if no DRED is present, or @ref opus_errorcodes
*/
OPUS_EXPORT int opus_dred_parse(OpusDREDDecoder *dred_dec, OpusDRED *dred, const unsigned char *data, opus_int32 len, opus_int32 max_dred_samples, opus_int32 sampling_rate, int *dred_end, int defer_processing) OPUS_ARG_NONNULL(1);
/** Finish decoding an Opus DRED packet. The function only needs to be called if opus_dred_parse() was called with defer_processing=1.
* The source and destination will often be the same DRED state.
* @param [in] dred_dec <tt>OpusDRED*</tt>: DRED Decoder state
* @param [in] src <tt>OpusDRED*</tt>: Source DRED state to start the processing from.
* @param [out] dst <tt>OpusDRED*</tt>: Destination DRED state to store the updated state after processing.
* @returns @ref opus_errorcodes
*/
OPUS_EXPORT int opus_dred_process(OpusDREDDecoder *dred_dec, const OpusDRED *src, OpusDRED *dst);
/** Decode audio from an Opus DRED packet with floating point output.
* @param [in] st <tt>OpusDecoder*</tt>: Decoder state
* @param [in] dred <tt>OpusDRED*</tt>: DRED state
* @param [in] dred_offset <tt>opus_int32</tt>: position of the redundancy to decode (in samples before the beginning of the real audio data in the packet).
* @param [out] pcm <tt>opus_int16*</tt>: Output signal (interleaved if 2 channels). length
* is frame_size*channels*sizeof(opus_int16)
* @param [in] frame_size Number of samples per channel to decode in \a pcm.
* frame_size <b>must</b> be a multiple of 2.5 ms.
* @returns Number of decoded samples or @ref opus_errorcodes
*/
OPUS_EXPORT int opus_decoder_dred_decode(OpusDecoder *st, const OpusDRED *dred, opus_int32 dred_offset, opus_int16 *pcm, opus_int32 frame_size);
/** Decode audio from an Opus DRED packet with floating point output.
* @param [in] st <tt>OpusDecoder*</tt>: Decoder state
* @param [in] dred <tt>OpusDRED*</tt>: DRED state
* @param [in] dred_offset <tt>opus_int32</tt>: position of the redundancy to decode (in samples before the beginning of the real audio data in the packet).
* @param [out] pcm <tt>float*</tt>: Output signal (interleaved if 2 channels). length
* is frame_size*channels*sizeof(float)
* @param [in] frame_size Number of samples per channel to decode in \a pcm.
* frame_size <b>must</b> be a multiple of 2.5 ms.
* @returns Number of decoded samples or @ref opus_errorcodes
*/
OPUS_EXPORT int opus_decoder_dred_decode_float(OpusDecoder *st, const OpusDRED *dred, opus_int32 dred_offset, float *pcm, opus_int32 frame_size);
/** Parse an opus packet into one or more frames. /** Parse an opus packet into one or more frames.
* Opus_decode will perform this operation internally so most applications do * Opus_decode will perform this operation internally so most applications do
* not need to use this function. * not need to use this function.
@ -583,6 +693,14 @@ OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_nb_frames(const unsigned
*/ */
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_nb_samples(const unsigned char packet[], opus_int32 len, opus_int32 Fs) OPUS_ARG_NONNULL(1); OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_nb_samples(const unsigned char packet[], opus_int32 len, opus_int32 Fs) OPUS_ARG_NONNULL(1);
/** Checks whether an Opus packet has LBRR.
* @param [in] packet <tt>char*</tt>: Opus packet
* @param [in] len <tt>opus_int32</tt>: Length of packet
* @returns 1 is LBRR is present, 0 otherwise
* @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or of an unsupported type
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_has_lbrr(const unsigned char packet[], opus_int32 len);
/** Gets the number of samples of an Opus packet. /** Gets the number of samples of an Opus packet.
* @param [in] dec <tt>OpusDecoder*</tt>: Decoder state * @param [in] dec <tt>OpusDecoder*</tt>: Decoder state
* @param [in] packet <tt>char*</tt>: Opus packet * @param [in] packet <tt>char*</tt>: Opus packet

View File

@ -169,15 +169,32 @@ extern "C" {
#define OPUS_SET_PHASE_INVERSION_DISABLED_REQUEST 4046 #define OPUS_SET_PHASE_INVERSION_DISABLED_REQUEST 4046
#define OPUS_GET_PHASE_INVERSION_DISABLED_REQUEST 4047 #define OPUS_GET_PHASE_INVERSION_DISABLED_REQUEST 4047
#define OPUS_GET_IN_DTX_REQUEST 4049 #define OPUS_GET_IN_DTX_REQUEST 4049
#define OPUS_SET_DRED_DURATION_REQUEST 4050
#define OPUS_GET_DRED_DURATION_REQUEST 4051
#define OPUS_SET_DNN_BLOB_REQUEST 4052
/*#define OPUS_GET_DNN_BLOB_REQUEST 4053 */
/** Defines for the presence of extended APIs. */ /** Defines for the presence of extended APIs. */
#define OPUS_HAVE_OPUS_PROJECTION_H #define OPUS_HAVE_OPUS_PROJECTION_H
/* Macros to trigger compilation errors when the wrong types are provided to a CTL */ /* Macros to trigger compilation errors when the wrong types are provided to a CTL */
#define __opus_check_int(x) (((void)((x) == (opus_int32)0)), (opus_int32)(x)) #define __opus_check_int(x) (((void)((x) == (opus_int32)0)), (opus_int32)(x))
#ifdef DISABLE_PTR_CHECK
/* Disable checks to prevent ubsan from complaining about NULL checks
in test_opus_api. */
#define __opus_check_int_ptr(ptr) (ptr)
#define __opus_check_uint_ptr(ptr) (ptr)
#define __opus_check_uint8_ptr(ptr) (ptr)
#define __opus_check_val16_ptr(ptr) (ptr)
#define __opus_check_void_ptr(ptr) (ptr)
#else
#define __opus_check_int_ptr(ptr) ((ptr) + ((ptr) - (opus_int32*)(ptr))) #define __opus_check_int_ptr(ptr) ((ptr) + ((ptr) - (opus_int32*)(ptr)))
#define __opus_check_uint_ptr(ptr) ((ptr) + ((ptr) - (opus_uint32*)(ptr))) #define __opus_check_uint_ptr(ptr) ((ptr) + ((ptr) - (opus_uint32*)(ptr)))
#define __opus_check_uint8_ptr(ptr) ((ptr) + ((ptr) - (opus_uint8*)(ptr)))
#define __opus_check_val16_ptr(ptr) ((ptr) + ((ptr) - (opus_val16*)(ptr))) #define __opus_check_val16_ptr(ptr) ((ptr) + ((ptr) - (opus_val16*)(ptr)))
#define __opus_check_void_ptr(x) ((void)((void *)0 == (x)), (x))
#endif
/** @endcond */ /** @endcond */
/** @defgroup opus_ctlvalues Pre-defined values for CTL interface /** @defgroup opus_ctlvalues Pre-defined values for CTL interface
@ -620,6 +637,18 @@ extern "C" {
* @hideinitializer */ * @hideinitializer */
#define OPUS_GET_PREDICTION_DISABLED(x) OPUS_GET_PREDICTION_DISABLED_REQUEST, __opus_check_int_ptr(x) #define OPUS_GET_PREDICTION_DISABLED(x) OPUS_GET_PREDICTION_DISABLED_REQUEST, __opus_check_int_ptr(x)
/** If non-zero, enables Deep Redundancy (DRED) and use the specified maximum number of 10-ms redundant frames
* @hideinitializer */
#define OPUS_SET_DRED_DURATION(x) OPUS_SET_DRED_DURATION_REQUEST, __opus_check_int(x)
/** Gets the encoder's configured Deep Redundancy (DRED) maximum number of frames.
* @hideinitializer */
#define OPUS_GET_DRED_DURATION(x) OPUS_GET_DRED_DURATION_REQUEST, __opus_check_int_ptr(x)
/** Provide external DNN weights from binary object (only when explicitly built without the weights)
* @hideinitializer */
#define OPUS_SET_DNN_BLOB(data, len) OPUS_SET_DNN_BLOB_REQUEST, __opus_check_void_ptr(data), __opus_check_int(len)
/**@}*/ /**@}*/
/** @defgroup opus_genericctls Generic CTLs /** @defgroup opus_genericctls Generic CTLs

View File

@ -143,7 +143,7 @@ extern "C" {
* <a href="https://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-810004.3.9">Vorbis * <a href="https://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-810004.3.9">Vorbis
* channel ordering</a>. A decoder may wish to apply an additional permutation * channel ordering</a>. A decoder may wish to apply an additional permutation
* to the mapping the encoder used to achieve a different output channel * to the mapping the encoder used to achieve a different output channel
* order (e.g. for outputing in WAV order). * order (e.g. for outputting in WAV order).
* *
* Each multistream packet contains an Opus packet for each stream, and all of * Each multistream packet contains an Opus packet for each stream, and all of
* the Opus packets in a single multistream packet must have the same * the Opus packets in a single multistream packet must have the same

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# install - install a program, script, or datafile # install - install a program, script, or datafile
scriptversion=2018-03-11.20; # UTC scriptversion=2020-11-14.01; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was # This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the # later released in X11R6 (xc/config/util/install.sh) with the
@ -69,6 +69,11 @@ posix_mkdir=
# Desired mode of installed file. # Desired mode of installed file.
mode=0755 mode=0755
# Create dirs (including intermediate dirs) using mode 755.
# This is like GNU 'install' as of coreutils 8.32 (2020).
mkdir_umask=22
backupsuffix=
chgrpcmd= chgrpcmd=
chmodcmd=$chmodprog chmodcmd=$chmodprog
chowncmd= chowncmd=
@ -99,18 +104,28 @@ Options:
--version display version info and exit. --version display version info and exit.
-c (ignored) -c (ignored)
-C install only if different (preserve the last data modification time) -C install only if different (preserve data modification time)
-d create directories instead of installing files. -d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP. -g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE. -m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER. -o USER $chownprog installed files to USER.
-p pass -p to $cpprog.
-s $stripprog installed files. -s $stripprog installed files.
-S SUFFIX attempt to back up existing files, with suffix SUFFIX.
-t DIRECTORY install into DIRECTORY. -t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory. -T report an error if DSTFILE is a directory.
Environment variables override the default commands: Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG RMPROG STRIPPROG
By default, rm is invoked with -f; when overridden with RMPROG,
it's up to you to specify -f if you want it.
If -S is not specified, no backups are attempted.
Email bug reports to bug-automake@gnu.org.
Automake home page: https://www.gnu.org/software/automake/
" "
while test $# -ne 0; do while test $# -ne 0; do
@ -137,8 +152,13 @@ while test $# -ne 0; do
-o) chowncmd="$chownprog $2" -o) chowncmd="$chownprog $2"
shift;; shift;;
-p) cpprog="$cpprog -p";;
-s) stripcmd=$stripprog;; -s) stripcmd=$stripprog;;
-S) backupsuffix="$2"
shift;;
-t) -t)
is_target_a_directory=always is_target_a_directory=always
dst_arg=$2 dst_arg=$2
@ -255,6 +275,10 @@ do
dstdir=$dst dstdir=$dst
test -d "$dstdir" test -d "$dstdir"
dstdir_status=$? dstdir_status=$?
# Don't chown directories that already exist.
if test $dstdir_status = 0; then
chowncmd=""
fi
else else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
@ -301,22 +325,6 @@ do
if test $dstdir_status != 0; then if test $dstdir_status != 0; then
case $posix_mkdir in case $posix_mkdir in
'') '')
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
*[0-7])
mkdir_umask=`expr $umask + 22 \
- $umask % 100 % 40 + $umask % 20 \
- $umask % 10 % 4 + $umask % 2
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode. # With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask. # Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then if test -n "$dir_arg"; then
@ -326,52 +334,49 @@ do
fi fi
posix_mkdir=false posix_mkdir=false
case $umask in # The $RANDOM variable is not portable (e.g., dash). Use it
*[123567][0-7][0-7]) # here however when possible just to lower collision chance.
# POSIX mkdir -p sets u+wx bits regardless of umask, which tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
# Note that $RANDOM variable is not portable (e.g. dash); Use it
# here however when possible just to lower collision chance.
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 trap '
ret=$?
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
exit $ret
' 0
# Because "mkdir -p" follows existing symlinks and we likely work # Because "mkdir -p" follows existing symlinks and we likely work
# directly in world-writeable /tmp, make sure that the '$tmpdir' # directly in world-writeable /tmp, make sure that the '$tmpdir'
# directory is successfully created first before we actually test # directory is successfully created first before we actually test
# 'mkdir -p' feature. # 'mkdir -p'.
if (umask $mkdir_umask && if (umask $mkdir_umask &&
$mkdirprog $mkdir_mode "$tmpdir" && $mkdirprog $mkdir_mode "$tmpdir" &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
then then
if test -z "$dir_arg" || { if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m. # Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't. # other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
test_tmpdir="$tmpdir/a" test_tmpdir="$tmpdir/a"
ls_ld_tmpdir=`ls -ld "$test_tmpdir"` ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
case $ls_ld_tmpdir in case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;; d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;; d????-?--*) different_mode=755;;
*) false;; *) false;;
esac && esac &&
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && { $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
} }
} }
then posix_mkdir=: then posix_mkdir=:
fi fi
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
else else
# Remove any dirs left behind by ancient mkdir implementations. # Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
fi fi
trap '' 0;; trap '' 0;;
esac;;
esac esac
if if
@ -382,7 +387,7 @@ do
then : then :
else else
# The umask is ridiculous, or mkdir does not conform to POSIX, # mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the # or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go. # directory the slow way, step by step, checking for races as we go.
@ -411,7 +416,7 @@ do
prefixes= prefixes=
else else
if $posix_mkdir; then if $posix_mkdir; then
(umask=$mkdir_umask && (umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently. # Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1 test -d "$prefix" || exit 1
@ -451,7 +456,18 @@ do
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name. # Copy the file name to the temp name.
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && (umask $cp_umask &&
{ test -z "$stripcmd" || {
# Create $dsttmp read-write so that cp doesn't create it read-only,
# which would cause strip to fail.
if test -z "$doit"; then
: >"$dsttmp" # No need to fork-exec 'touch'.
else
$doit touch "$dsttmp"
fi
}
} &&
$doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits. # and set any options; do chmod last to preserve setuid bits.
# #
@ -477,6 +493,13 @@ do
then then
rm -f "$dsttmp" rm -f "$dsttmp"
else else
# If $backupsuffix is set, and the file being installed
# already exists, attempt a backup. Don't worry if it fails,
# e.g., if mv doesn't support -f.
if test -n "$backupsuffix" && test -f "$dst"; then
$doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
fi
# Rename the file to the real destination. # Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
@ -491,9 +514,9 @@ do
# file should still install successfully. # file should still install successfully.
{ {
test ! -f "$dst" || test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null || $doit $rmcmd "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } { $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
} || } ||
{ echo "$0: cannot unlink or rename $dst" >&2 { echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1 (exit 1); exit 1

4
src/libs/opus/ltmain.sh Normal file → Executable file
View File

@ -31,7 +31,7 @@
PROGRAM=libtool PROGRAM=libtool
PACKAGE=libtool PACKAGE=libtool
VERSION="2.4.6 Debian-2.4.6-14" VERSION="2.4.6 Debian-2.4.6-15build2"
package_revision=2.4.6 package_revision=2.4.6
@ -2141,7 +2141,7 @@ include the following information:
compiler: $LTCC compiler: $LTCC
compiler flags: $LTCFLAGS compiler flags: $LTCFLAGS
linker: $LD (gnu? $with_gnu_ld) linker: $LD (gnu? $with_gnu_ld)
version: $progname $scriptversion Debian-2.4.6-14 version: $progname $scriptversion Debian-2.4.6-15build2
automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`

View File

@ -1071,11 +1071,11 @@ _LT_EOF
# to the OS version, if on x86, and 10.4, the deployment # to the OS version, if on x86, and 10.4, the deployment
# target defaults to 10.4. Don't you love it? # target defaults to 10.4. Don't you love it?
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 10.0,*86*-darwin8*|10.0,*-darwin[[912]]*)
_lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10.[[012]][[,.]]*) 10.[[012]][[,.]]*)
_lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10.*) 10.*|11.*)
_lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
esac esac
;; ;;

View File

@ -14,7 +14,7 @@ host_cpu_family = host_machine.cpu_family()
top_srcdir = meson.current_source_dir() top_srcdir = meson.current_source_dir()
top_builddir = meson.current_build_dir() top_builddir = meson.current_build_dir()
opus_includes = include_directories('.', 'include', 'celt', 'silk') opus_includes = include_directories('.', 'include', 'celt', 'silk', 'dnn')
opus_public_includes = include_directories('include') opus_public_includes = include_directories('include')
add_project_arguments('-DOPUS_BUILD', language: 'c') add_project_arguments('-DOPUS_BUILD', language: 'c')
@ -161,6 +161,21 @@ foreach opt : opts
set_variable('opt_' + opt[0].underscorify(), opt_foo) set_variable('opt_' + opt[0].underscorify(), opt_foo)
endforeach endforeach
feat = [
[ 'deep-plc', 'ENABLE_DEEP_PLC' ],
[ 'dred', 'ENABLE_DRED' ],
[ 'osce', 'ENABLE_OSCE' ],
]
foreach opt : feat
# we assume these are all boolean options
opt_foo = get_option(opt[0])
if opt_foo.enabled()
opus_conf.set(opt[1], 1)
endif
set_variable('opt_' + opt[0].underscorify(), opt_foo)
endforeach
opt_asm = get_option('asm') opt_asm = get_option('asm')
opt_rtcd = get_option('rtcd') opt_rtcd = get_option('rtcd')
opt_intrinsics = get_option('intrinsics') opt_intrinsics = get_option('intrinsics')
@ -172,6 +187,10 @@ if disable_float_api
opus_conf.set('DISABLE_FLOAT_API', 1) opus_conf.set('DISABLE_FLOAT_API', 1)
endif endif
if not get_option('dnn-debug-float').enabled()
opus_conf.set('DISABLE_DEBUG_FLOAT', 1)
endif
# This is for the description in the pkg-config .pc file # This is for the description in the pkg-config .pc file
if opt_fixed_point if opt_fixed_point
pc_build = 'fixed-point' pc_build = 'fixed-point'
@ -220,7 +239,7 @@ if not opt_asm.disabled()
#error GCC before 3.4 has critical bugs compiling inline assembly #error GCC before 3.4 has critical bugs compiling inline assembly
#endif #endif
#endif #endif
__asm__ (""::)''', int main(int argc, char ** argv) { __asm__ (""::); }''',
name : 'compiler supports gcc-style inline assembly') name : 'compiler supports gcc-style inline assembly')
opus_conf.set('OPUS_ARM_INLINE_ASM', 1) opus_conf.set('OPUS_ARM_INLINE_ASM', 1)
@ -245,6 +264,13 @@ if not opt_asm.disabled()
opus_conf.set('OPUS_ARM_INLINE_NEON', 1) opus_conf.set('OPUS_ARM_INLINE_NEON', 1)
inline_optimization += ['NEON'] inline_optimization += ['NEON']
endif endif
# AS_ASM_ARM_DOTPROD
if cc.compiles(asm_tmpl.format('udot v0.4s,v1.16b,v2.16b'),
name : 'assembler supports DOTPROD instructions on ARM')
opus_conf.set('OPUS_ARM_INLINE_DOTPROD', 1)
inline_optimization += ['DOTPROD']
endif
endif endif
# We need Perl to translate RVCT-syntax asm to gas syntax # We need Perl to translate RVCT-syntax asm to gas syntax
@ -266,21 +292,24 @@ if not opt_asm.disabled()
opus_arm_may_have_neon = opus_conf.has('OPUS_ARM_INLINE_NEON') opus_arm_may_have_neon = opus_conf.has('OPUS_ARM_INLINE_NEON')
opus_arm_presume_neon = opus_arm_may_have_neon and opus_can_presume_simd opus_arm_presume_neon = opus_arm_may_have_neon and opus_can_presume_simd
opus_arm_may_have_dotprod = opus_conf.has('OPUS_ARM_INLINE_DOTPROD')
opus_arm_presume_dotprod = opus_arm_may_have_dotprod and opus_can_presume_simd
if not opt_rtcd.disabled() if not opt_rtcd.disabled()
if not opus_arm_may_have_edsp if not opus_arm_may_have_edsp
message('Trying to force-enable armv5e EDSP instructions...') message('Trying to force-enable armv5e EDSP instructions...')
# AS_ASM_ARM_EDSP_FORCE # AS_ASM_ARM_EDSP_FORCE
opus_arm_may_have_edsp = cc.compiles(asm_tmpl.format('.arch armv5te\n.object_arch armv4t\nqadd r3,r3,r3'), opus_arm_may_have_edsp = cc.compiles(asm_tmpl.format('.arch armv5te;.object_arch armv4t;qadd r3,r3,r3'),
name : 'Assembler supports EDSP instructions on ARM (forced)') name : 'Assembler supports EDSP instructions on ARM (forced)')
endif endif
if not opus_arm_may_have_media if not opus_arm_may_have_media
message('Trying to force-enable ARMv6 media instructions...') message('Trying to force-enable ARMv6 media instructions...')
opus_arm_may_have_media = cc.compiles(asm_tmpl.format('.arch armv6\n.object_arch armv4t\nshadd8 r3,r3,r3'), opus_arm_may_have_media = cc.compiles(asm_tmpl.format('.arch armv6;.object_arch armv4t;shadd8 r3,r3,r3'),
name : 'Assembler supports ARMv6 media instructions on ARM (forced)') name : 'Assembler supports ARMv6 media instructions on ARM (forced)')
endif endif
if not opus_arm_may_have_neon if not opus_arm_may_have_neon
message('Trying to force-enable NEON instructions...') message('Trying to force-enable NEON instructions...')
opus_arm_may_have_neon = cc.compiles(asm_tmpl.format('.arch armv7-a\n.fpu neon\n.object_arch armv4t\nvorr d0,d0,d0'), opus_arm_may_have_neon = cc.compiles(asm_tmpl.format('.arch armv7-a;.fpu neon;.object_arch armv4t;vorr d0,d0,d0'),
name : 'Assembler supports NEON instructions on ARM (forced)') name : 'Assembler supports NEON instructions on ARM (forced)')
endif endif
endif endif
@ -312,8 +341,17 @@ if not opt_asm.disabled()
rtcd_support += ['NEON'] rtcd_support += ['NEON']
endif endif
endif endif
if opus_arm_may_have_dotprod
opus_conf.set('OPUS_ARM_MAY_HAVE_DOTPROD', 1)
if opus_arm_presume_dotprod
opus_conf.set('OPUS_ARM_PRESUME_DOTPROD', 1)
asm_optimization += ['DOTPROD']
else
rtcd_support += ['DOTPROD']
endif
endif
if cc.get_define('__APPLE__') if cc.get_define('__APPLE__') != ''
arm2gnu_args = ['--apple'] arm2gnu_args = ['--apple']
else else
arm2gnu_args = [] arm2gnu_args = []
@ -338,12 +376,14 @@ endif
# -mfloat-abi=softfp to enable NEON. F.ex., on Android. It should # -mfloat-abi=softfp to enable NEON. F.ex., on Android. It should
# be set in the cross file. # be set in the cross file.
arm_neon_intr_link_args = ['-mfpu=neon'] arm_neon_intr_link_args = ['-mfpu=neon']
arm_dotprod_intr_link_args = ['-march=armv8.2-a+dotprod']
have_sse = false have_sse = false
have_sse2 = false have_sse2 = false
have_sse4_1 = false have_sse4_1 = false
have_avx = false # no avx opus code yet have_avx2 = false
have_neon_intr = false have_neon_intr = false
have_dotprod_intr = false
intrinsics_support = [] intrinsics_support = []
if not opt_intrinsics.disabled() if not opt_intrinsics.disabled()
@ -419,13 +459,53 @@ if not opt_intrinsics.disabled()
else else
message('Compiler does not support @0@ intrinsics'.format(intrin_name)) message('Compiler does not support @0@ intrinsics'.format(intrin_name))
endif endif
# Check for ARMv8.2 dotprod intrinsics
intrin_check = '''
#include <arm_neon.h>
int main (void) {
static int8x16_t a, b;
static int32x4_t SUMM;
SUMM = vdotq_s32(SUMM, a, b);
return (int)vgetq_lane_s32(SUMM, 0);
}'''
intrin_name = 'AArch64 DOTPROD'
if cc.links(intrin_check,
name: 'compiler supports @0@ intrinsics'.format(intrin_name))
opus_arm_presume_dotprod_intr = opus_can_presume_simd
opus_arm_may_have_dotprod_intr = true
else
opus_arm_presume_dotprod_intr = false
if cc.links(intrin_check,
args: arm_dotprod_intr_link_args,
name: 'compiler supports @0@ intrinsics with @1@'.format(intrin_name, ' '.join(arm_dotprod_intr_link_args)))
opus_arm_may_have_dotprod_intr = true
else
opus_arm_may_have_dotprod_intr = false
endif
endif
if opus_arm_may_have_dotprod_intr
have_dotprod_intr = true
intrinsics_support += [intrin_name]
opus_conf.set('OPUS_ARM_MAY_HAVE_DOTPROD', 1)
if opus_arm_presume_dotprod_intr
opus_conf.set('OPUS_ARM_PRESUME_DOTPROD', 1)
else
rtcd_support += [intrin_name]
opus_dotprod_intr_args = arm_dotprod_intr_link_args
endif
else
message('Compiler does not support @0@ intrinsics'.format(intrin_name))
endif
elif host_cpu_family in ['x86', 'x86_64'] elif host_cpu_family in ['x86', 'x86_64']
# XXX: allow external override/specification of the flags # XXX: allow external override/specification of the flags
x86_intrinsics = [ x86_intrinsics = [
[ 'SSE', 'xmmintrin.h', '__m128', '_mm_setzero_ps()', ['-msse'] ], [ 'SSE', 'xmmintrin.h', '__m128', '_mm_setzero_ps()', ['-msse'], [] ],
[ 'SSE2', 'emmintrin.h', '__m128i', '_mm_setzero_si128()', ['-msse2'] ], [ 'SSE2', 'emmintrin.h', '__m128i', '_mm_setzero_si128()', ['-msse2'], [] ],
[ 'SSE4.1', 'smmintrin.h', '__m128i', '_mm_setzero_si128(); mtest = _mm_cmpeq_epi64(mtest, mtest)', ['-msse4.1'] ], [ 'SSE4.1', 'smmintrin.h', '__m128i', '_mm_setzero_si128(); mtest = _mm_cmpeq_epi64(mtest, mtest)', ['-msse4.1'], [] ],
[ 'AVX', 'immintrin.h', '__m256', '_mm256_setzero_ps()', ['-mavx'] ], [ 'AVX2', 'immintrin.h', '__m256i', '_mm256_abs_epi32(_mm256_setzero_si256())', ['-mavx', '-mfma', '-mavx2'], ['/arch:AVX2'] ],
] ]
foreach intrin : x86_intrinsics foreach intrin : x86_intrinsics
@ -436,9 +516,11 @@ if not opt_intrinsics.disabled()
return *((unsigned char *) &mtest) != 0; return *((unsigned char *) &mtest) != 0;
}'''.format(intrin[1],intrin[2],intrin[3]) }'''.format(intrin[1],intrin[2],intrin[3])
intrin_name = intrin[0] intrin_name = intrin[0]
# Intrinsics arguments are not available with MSVC-like compilers intrin_args = cc.get_argument_syntax() == 'msvc' ? intrin[5] : intrin[4]
intrin_args = cc.get_argument_syntax() == 'msvc' ? [] : intrin[4] if cc.get_argument_syntax() == 'msvc' and intrin_args.length() == 0 and cc.links(intrin_check, name : 'compiler supports @0@ intrinsics'.format(intrin_name))
if cc.links(intrin_check, name : 'compiler supports @0@ intrinsics'.format(intrin_name)) may_have_intrin = true
presume_intrin = opus_can_presume_simd
elif cc.get_argument_syntax() != 'msvc' and cc.links(intrin_check, name : 'compiler supports @0@ intrinsics'.format(intrin_name))
may_have_intrin = true may_have_intrin = true
presume_intrin = opus_can_presume_simd presume_intrin = opus_can_presume_simd
elif intrin_args.length() > 0 elif intrin_args.length() > 0
@ -563,7 +645,12 @@ else
endif endif
# extract source file lists from .mk files # extract source file lists from .mk files
mk_files = ['silk_sources.mk', 'opus_headers.mk', 'opus_sources.mk', 'silk_headers.mk', 'celt_sources.mk', 'celt_headers.mk'] mk_files = [
'opus_headers.mk', 'opus_sources.mk',
'silk_headers.mk', 'silk_sources.mk',
'celt_sources.mk', 'celt_headers.mk',
'lpcnet_headers.mk', 'lpcnet_sources.mk',
]
lines = run_command('meson/read-sources-list.py', mk_files, check: true).stdout().strip().split('\n') lines = run_command('meson/read-sources-list.py', mk_files, check: true).stdout().strip().split('\n')
sources = {} sources = {}
foreach l : lines foreach l : lines
@ -574,8 +661,9 @@ foreach l : lines
endforeach endforeach
subdir('include') subdir('include')
subdir('silk')
subdir('celt') subdir('celt')
subdir('silk')
subdir('dnn')
subdir('src') subdir('src')
configure_file(output: 'config.h', configuration: opus_conf) configure_file(output: 'config.h', configuration: opus_conf)
@ -586,29 +674,11 @@ if not opt_tests.disabled()
subdir('tests') subdir('tests')
endif endif
# pkg-config files (not using pkg module so we can use the existing .pc.in file) pkg = import('pkgconfig')
pkgconf = configuration_data() pkg.generate(opus_lib,
description: 'Opus IETF audio codec (floating-point build)',
pkgconf.set('prefix', join_paths(get_option('prefix'))) subdirs: 'opus',
pkgconf.set('exec_prefix', '${prefix}') )
pkgconf.set('libdir', '${prefix}/@0@'.format(get_option('libdir')))
pkgconf.set('includedir', '${prefix}/@0@'.format(get_option('includedir')))
pkgconf.set('VERSION', opus_version)
pkgconf.set('PC_BUILD', pc_build)
pkgconf.set('LIBM', libm.found() ? '-lm' : '')
pkg_install_dir = '@0@/pkgconfig'.format(get_option('libdir'))
configure_file(input : 'opus.pc.in',
output : 'opus.pc',
configuration : pkgconf,
install_dir : pkg_install_dir)
# The uninstalled one has hardcoded libtool + static lib stuff, skip it for now
#configure_file(input : 'opus-uninstalled.pc.in',
# output : 'opus-uninstalled.pc',
# configuration : pkgconf,
# install : false)
doxygen = find_program('doxygen', required: get_option('docs')) doxygen = find_program('doxygen', required: get_option('docs'))
if doxygen.found() if doxygen.found()

View File

@ -7,6 +7,11 @@ option('rtcd', type : 'feature', value : 'auto', description : 'Run-time CPU cap
option('asm', type : 'feature', value : 'auto', description : 'Assembly optimizations for ARM (fixed-point)') option('asm', type : 'feature', value : 'auto', description : 'Assembly optimizations for ARM (fixed-point)')
option('intrinsics', type : 'feature', value : 'auto', description : 'Intrinsics optimizations for ARM NEON or x86') option('intrinsics', type : 'feature', value : 'auto', description : 'Intrinsics optimizations for ARM NEON or x86')
option('deep-plc', type : 'feature', value : 'disabled', description : 'Enable Deep Packet Loss Concealment (PLC)')
option('dred', type : 'feature', value : 'disabled', description : 'Enable Deep Redundancy (DRED)')
option('osce', type : 'feature', value : 'disabled', description : 'Enable Opus Speech Coding Enhancement (OSCE)')
option('dnn-debug-float', type : 'feature', value : 'disabled', description : 'Compute DNN using float weights')
option('custom-modes', type : 'boolean', value : false, description : 'Enable non-Opus modes, e.g. 44.1 kHz & 2^n frames') option('custom-modes', type : 'boolean', value : false, description : 'Enable non-Opus modes, e.g. 44.1 kHz & 2^n frames')
option('extra-programs', type : 'feature', value : 'auto', description : 'Extra programs (demo and tests)') option('extra-programs', type : 'feature', value : 'auto', description : 'Extra programs (demo and tests)')
option('assertions', type : 'boolean', value : false, description : 'Additional software error checking') option('assertions', type : 'boolean', value : false, description : 'Additional software error checking')

View File

@ -3,7 +3,7 @@
scriptversion=2018-03-07.03; # UTC scriptversion=2018-03-07.03; # UTC
# Copyright (C) 1996-2018 Free Software Foundation, Inc. # Copyright (C) 1996-2021 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify

View File

@ -5,5 +5,4 @@ include/opus_projection.h \
src/opus_private.h \ src/opus_private.h \
src/analysis.h \ src/analysis.h \
src/mapping_matrix.h \ src/mapping_matrix.h \
src/mlp.h \ src/mlp.h
src/tansig_table.h

View File

@ -2,6 +2,7 @@ OPUS_SOURCES = \
src/opus.c \ src/opus.c \
src/opus_decoder.c \ src/opus_decoder.c \
src/opus_encoder.c \ src/opus_encoder.c \
src/extensions.c \
src/opus_multistream.c \ src/opus_multistream.c \
src/opus_multistream_encoder.c \ src/opus_multistream_encoder.c \
src/opus_multistream_decoder.c \ src/opus_multistream_decoder.c \

View File

@ -1 +1 @@
PACKAGE_VERSION="1.4" PACKAGE_VERSION="1.5.2"

View File

@ -34,6 +34,10 @@ POSSIBILITY OF SUCH DAMAGE.
#include "entenc.h" #include "entenc.h"
#include "entdec.h" #include "entdec.h"
#ifdef ENABLE_DEEP_PLC
#include "lpcnet_private.h"
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
@ -88,6 +92,16 @@ opus_int silk_Encode( /* O Returns error co
/* Decoder functions */ /* Decoder functions */
/****************************************/ /****************************************/
/***********************************************/
/* Load OSCE models from external data pointer */
/***********************************************/
opus_int silk_LoadOSCEModels(
void *decState, /* O I/O State */
const unsigned char *data, /* I pointer to binary blob */
int len /* I length of binary blob data */
);
/***********************************************/ /***********************************************/
/* Get size in bytes of the Silk decoder state */ /* Get size in bytes of the Silk decoder state */
/***********************************************/ /***********************************************/
@ -96,8 +110,12 @@ opus_int silk_Get_Decoder_Size( /* O Returns error co
); );
/*************************/ /*************************/
/* Init or Reset decoder */ /* Init and Reset decoder */
/*************************/ /*************************/
opus_int silk_ResetDecoder( /* O Returns error code */
void *decState /* I/O State */
);
opus_int silk_InitDecoder( /* O Returns error code */ opus_int silk_InitDecoder( /* O Returns error code */
void *decState /* I/O State */ void *decState /* I/O State */
); );
@ -113,6 +131,9 @@ opus_int silk_Decode( /* O Returns error co
ec_dec *psRangeDec, /* I/O Compressor data structure */ ec_dec *psRangeDec, /* I/O Compressor data structure */
opus_int16 *samplesOut, /* O Decoded output speech vector */ opus_int16 *samplesOut, /* O Decoded output speech vector */
opus_int32 *nSamplesOut, /* O Number of samples decoded */ opus_int32 *nSamplesOut, /* O Number of samples decoded */
#ifdef ENABLE_DEEP_PLC
LPCNetPLCState *lpcnet,
#endif
int arch /* I Run-time architecture */ int arch /* I Run-time architecture */
); );

View File

@ -80,7 +80,7 @@ void silk_NSQ_c
SideInfoIndices *psIndices, /* I/O Quantization Indices */ SideInfoIndices *psIndices, /* I/O Quantization Indices */
const opus_int16 x16[], /* I Input */ const opus_int16 x16[], /* I Input */
opus_int8 pulses[], /* O Quantized pulse signal */ opus_int8 pulses[], /* O Quantized pulse signal */
const opus_int16 PredCoef_Q12[ 2 * MAX_LPC_ORDER ], /* I Short term prediction coefs */ const opus_int16 *PredCoef_Q12, /* I Short term prediction coefs */
const opus_int16 LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ], /* I Long term prediction coefs */ const opus_int16 LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ], /* I Long term prediction coefs */
const opus_int16 AR_Q13[ MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER ], /* I Noise shaping coefs */ const opus_int16 AR_Q13[ MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER ], /* I Noise shaping coefs */
const opus_int HarmShapeGain_Q14[ MAX_NB_SUBFR ], /* I Long term shaping coefs */ const opus_int HarmShapeGain_Q14[ MAX_NB_SUBFR ], /* I Long term shaping coefs */
@ -258,8 +258,8 @@ void silk_noise_shape_quantizer(
celt_assert( lag > 0 || signalType != TYPE_VOICED ); celt_assert( lag > 0 || signalType != TYPE_VOICED );
/* Combine prediction and noise shaping signals */ /* Combine prediction and noise shaping signals */
tmp1 = silk_SUB32( silk_LSHIFT32( LPC_pred_Q10, 2 ), n_AR_Q12 ); /* Q12 */ tmp1 = silk_SUB32_ovflw( silk_LSHIFT32( LPC_pred_Q10, 2 ), n_AR_Q12 ); /* Q12 */
tmp1 = silk_SUB32( tmp1, n_LF_Q12 ); /* Q12 */ tmp1 = silk_SUB32_ovflw( tmp1, n_LF_Q12 ); /* Q12 */
if( lag > 0 ) { if( lag > 0 ) {
/* Symmetric, packed FIR coefficients */ /* Symmetric, packed FIR coefficients */
n_LTP_Q13 = silk_SMULWB( silk_ADD_SAT32( shp_lag_ptr[ 0 ], shp_lag_ptr[ -2 ] ), HarmShapeFIRPacked_Q14 ); n_LTP_Q13 = silk_SMULWB( silk_ADD_SAT32( shp_lag_ptr[ 0 ], shp_lag_ptr[ -2 ] ), HarmShapeFIRPacked_Q14 );
@ -268,7 +268,7 @@ void silk_noise_shape_quantizer(
shp_lag_ptr++; shp_lag_ptr++;
tmp2 = silk_SUB32( LTP_pred_Q13, n_LTP_Q13 ); /* Q13 */ tmp2 = silk_SUB32( LTP_pred_Q13, n_LTP_Q13 ); /* Q13 */
tmp1 = silk_ADD_LSHIFT32( tmp2, tmp1, 1 ); /* Q13 */ tmp1 = silk_ADD32_ovflw( tmp2, silk_LSHIFT32( tmp1, 1 ) ); /* Q13 */
tmp1 = silk_RSHIFT_ROUND( tmp1, 3 ); /* Q10 */ tmp1 = silk_RSHIFT_ROUND( tmp1, 3 ); /* Q10 */
} else { } else {
tmp1 = silk_RSHIFT_ROUND( tmp1, 2 ); /* Q10 */ tmp1 = silk_RSHIFT_ROUND( tmp1, 2 ); /* Q10 */
@ -340,7 +340,7 @@ void silk_noise_shape_quantizer(
/* Add predictions */ /* Add predictions */
LPC_exc_Q14 = silk_ADD_LSHIFT32( exc_Q14, LTP_pred_Q13, 1 ); LPC_exc_Q14 = silk_ADD_LSHIFT32( exc_Q14, LTP_pred_Q13, 1 );
xq_Q14 = silk_ADD_LSHIFT32( LPC_exc_Q14, LPC_pred_Q10, 4 ); xq_Q14 = silk_ADD32_ovflw( LPC_exc_Q14, silk_LSHIFT32( LPC_pred_Q10, 4 ) );
/* Scale XQ back to normal level before saving */ /* Scale XQ back to normal level before saving */
xq[ i ] = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( silk_SMULWW( xq_Q14, Gain_Q10 ), 8 ) ); xq[ i ] = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( silk_SMULWW( xq_Q14, Gain_Q10 ), 8 ) );
@ -349,10 +349,10 @@ void silk_noise_shape_quantizer(
psLPC_Q14++; psLPC_Q14++;
*psLPC_Q14 = xq_Q14; *psLPC_Q14 = xq_Q14;
NSQ->sDiff_shp_Q14 = silk_SUB_LSHIFT32( xq_Q14, x_sc_Q10[ i ], 4 ); NSQ->sDiff_shp_Q14 = silk_SUB_LSHIFT32( xq_Q14, x_sc_Q10[ i ], 4 );
sLF_AR_shp_Q14 = silk_SUB_LSHIFT32( NSQ->sDiff_shp_Q14, n_AR_Q12, 2 ); sLF_AR_shp_Q14 = silk_SUB32_ovflw( NSQ->sDiff_shp_Q14, silk_LSHIFT32( n_AR_Q12, 2 ) );
NSQ->sLF_AR_shp_Q14 = sLF_AR_shp_Q14; NSQ->sLF_AR_shp_Q14 = sLF_AR_shp_Q14;
NSQ->sLTP_shp_Q14[ NSQ->sLTP_shp_buf_idx ] = silk_SUB_LSHIFT32( sLF_AR_shp_Q14, n_LF_Q12, 2 ); NSQ->sLTP_shp_Q14[ NSQ->sLTP_shp_buf_idx ] = silk_SUB32_ovflw(sLF_AR_shp_Q14, silk_LSHIFT32(n_LF_Q12, 2));
sLTP_Q15[ NSQ->sLTP_buf_idx ] = silk_LSHIFT( LPC_exc_Q14, 1 ); sLTP_Q15[ NSQ->sLTP_buf_idx ] = silk_LSHIFT( LPC_exc_Q14, 1 );
NSQ->sLTP_shp_buf_idx++; NSQ->sLTP_shp_buf_idx++;
NSQ->sLTP_buf_idx++; NSQ->sLTP_buf_idx++;

View File

@ -120,7 +120,7 @@ void silk_NSQ_del_dec_c(
SideInfoIndices *psIndices, /* I/O Quantization Indices */ SideInfoIndices *psIndices, /* I/O Quantization Indices */
const opus_int16 x16[], /* I Input */ const opus_int16 x16[], /* I Input */
opus_int8 pulses[], /* O Quantized pulse signal */ opus_int8 pulses[], /* O Quantized pulse signal */
const opus_int16 PredCoef_Q12[ 2 * MAX_LPC_ORDER ], /* I Short term prediction coefs */ const opus_int16 *PredCoef_Q12, /* I Short term prediction coefs */
const opus_int16 LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ], /* I Long term prediction coefs */ const opus_int16 LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ], /* I Long term prediction coefs */
const opus_int16 AR_Q13[ MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER ], /* I Noise shaping coefs */ const opus_int16 AR_Q13[ MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER ], /* I Noise shaping coefs */
const opus_int HarmShapeGain_Q14[ MAX_NB_SUBFR ], /* I Long term shaping coefs */ const opus_int HarmShapeGain_Q14[ MAX_NB_SUBFR ], /* I Long term shaping coefs */
@ -423,18 +423,18 @@ static OPUS_INLINE void silk_noise_shape_quantizer_del_dec(
/* Output of lowpass section */ /* Output of lowpass section */
tmp2 = silk_SMLAWB( psDD->Diff_Q14, psDD->sAR2_Q14[ 0 ], warping_Q16 ); tmp2 = silk_SMLAWB( psDD->Diff_Q14, psDD->sAR2_Q14[ 0 ], warping_Q16 );
/* Output of allpass section */ /* Output of allpass section */
tmp1 = silk_SMLAWB( psDD->sAR2_Q14[ 0 ], psDD->sAR2_Q14[ 1 ] - tmp2, warping_Q16 ); tmp1 = silk_SMLAWB( psDD->sAR2_Q14[ 0 ], silk_SUB32_ovflw(psDD->sAR2_Q14[ 1 ], tmp2), warping_Q16 );
psDD->sAR2_Q14[ 0 ] = tmp2; psDD->sAR2_Q14[ 0 ] = tmp2;
n_AR_Q14 = silk_RSHIFT( shapingLPCOrder, 1 ); n_AR_Q14 = silk_RSHIFT( shapingLPCOrder, 1 );
n_AR_Q14 = silk_SMLAWB( n_AR_Q14, tmp2, AR_shp_Q13[ 0 ] ); n_AR_Q14 = silk_SMLAWB( n_AR_Q14, tmp2, AR_shp_Q13[ 0 ] );
/* Loop over allpass sections */ /* Loop over allpass sections */
for( j = 2; j < shapingLPCOrder; j += 2 ) { for( j = 2; j < shapingLPCOrder; j += 2 ) {
/* Output of allpass section */ /* Output of allpass section */
tmp2 = silk_SMLAWB( psDD->sAR2_Q14[ j - 1 ], psDD->sAR2_Q14[ j + 0 ] - tmp1, warping_Q16 ); tmp2 = silk_SMLAWB( psDD->sAR2_Q14[ j - 1 ], silk_SUB32_ovflw(psDD->sAR2_Q14[ j + 0 ], tmp1), warping_Q16 );
psDD->sAR2_Q14[ j - 1 ] = tmp1; psDD->sAR2_Q14[ j - 1 ] = tmp1;
n_AR_Q14 = silk_SMLAWB( n_AR_Q14, tmp1, AR_shp_Q13[ j - 1 ] ); n_AR_Q14 = silk_SMLAWB( n_AR_Q14, tmp1, AR_shp_Q13[ j - 1 ] );
/* Output of allpass section */ /* Output of allpass section */
tmp1 = silk_SMLAWB( psDD->sAR2_Q14[ j + 0 ], psDD->sAR2_Q14[ j + 1 ] - tmp2, warping_Q16 ); tmp1 = silk_SMLAWB( psDD->sAR2_Q14[ j + 0 ], silk_SUB32_ovflw(psDD->sAR2_Q14[ j + 1 ], tmp2), warping_Q16 );
psDD->sAR2_Q14[ j + 0 ] = tmp2; psDD->sAR2_Q14[ j + 0 ] = tmp2;
n_AR_Q14 = silk_SMLAWB( n_AR_Q14, tmp2, AR_shp_Q13[ j ] ); n_AR_Q14 = silk_SMLAWB( n_AR_Q14, tmp2, AR_shp_Q13[ j ] );
} }
@ -452,7 +452,7 @@ static OPUS_INLINE void silk_noise_shape_quantizer_del_dec(
/* Input minus prediction plus noise feedback */ /* Input minus prediction plus noise feedback */
/* r = x[ i ] - LTP_pred - LPC_pred + n_AR + n_Tilt + n_LF + n_LTP */ /* r = x[ i ] - LTP_pred - LPC_pred + n_AR + n_Tilt + n_LF + n_LTP */
tmp1 = silk_ADD_SAT32( n_AR_Q14, n_LF_Q14 ); /* Q14 */ tmp1 = silk_ADD_SAT32( n_AR_Q14, n_LF_Q14 ); /* Q14 */
tmp2 = silk_ADD32( n_LTP_Q14, LPC_pred_Q14 ); /* Q13 */ tmp2 = silk_ADD32_ovflw( n_LTP_Q14, LPC_pred_Q14 ); /* Q13 */
tmp1 = silk_SUB_SAT32( tmp2, tmp1 ); /* Q13 */ tmp1 = silk_SUB_SAT32( tmp2, tmp1 ); /* Q13 */
tmp1 = silk_RSHIFT_ROUND( tmp1, 4 ); /* Q10 */ tmp1 = silk_RSHIFT_ROUND( tmp1, 4 ); /* Q10 */
@ -530,11 +530,11 @@ static OPUS_INLINE void silk_noise_shape_quantizer_del_dec(
/* Add predictions */ /* Add predictions */
LPC_exc_Q14 = silk_ADD32( exc_Q14, LTP_pred_Q14 ); LPC_exc_Q14 = silk_ADD32( exc_Q14, LTP_pred_Q14 );
xq_Q14 = silk_ADD32( LPC_exc_Q14, LPC_pred_Q14 ); xq_Q14 = silk_ADD32_ovflw( LPC_exc_Q14, LPC_pred_Q14 );
/* Update states */ /* Update states */
psSS[ 0 ].Diff_Q14 = silk_SUB_LSHIFT32( xq_Q14, x_Q10[ i ], 4 ); psSS[ 0 ].Diff_Q14 = silk_SUB32_ovflw( xq_Q14, silk_LSHIFT32( x_Q10[ i ], 4 ) );
sLF_AR_shp_Q14 = silk_SUB32( psSS[ 0 ].Diff_Q14, n_AR_Q14 ); sLF_AR_shp_Q14 = silk_SUB32_ovflw( psSS[ 0 ].Diff_Q14, n_AR_Q14 );
psSS[ 0 ].sLTP_shp_Q14 = silk_SUB_SAT32( sLF_AR_shp_Q14, n_LF_Q14 ); psSS[ 0 ].sLTP_shp_Q14 = silk_SUB_SAT32( sLF_AR_shp_Q14, n_LF_Q14 );
psSS[ 0 ].LF_AR_Q14 = sLF_AR_shp_Q14; psSS[ 0 ].LF_AR_Q14 = sLF_AR_shp_Q14;
psSS[ 0 ].LPC_exc_Q14 = LPC_exc_Q14; psSS[ 0 ].LPC_exc_Q14 = LPC_exc_Q14;
@ -550,11 +550,11 @@ static OPUS_INLINE void silk_noise_shape_quantizer_del_dec(
/* Add predictions */ /* Add predictions */
LPC_exc_Q14 = silk_ADD32( exc_Q14, LTP_pred_Q14 ); LPC_exc_Q14 = silk_ADD32( exc_Q14, LTP_pred_Q14 );
xq_Q14 = silk_ADD32( LPC_exc_Q14, LPC_pred_Q14 ); xq_Q14 = silk_ADD32_ovflw( LPC_exc_Q14, LPC_pred_Q14 );
/* Update states */ /* Update states */
psSS[ 1 ].Diff_Q14 = silk_SUB_LSHIFT32( xq_Q14, x_Q10[ i ], 4 ); psSS[ 1 ].Diff_Q14 = silk_SUB32_ovflw( xq_Q14, silk_LSHIFT32( x_Q10[ i ], 4 ) );
sLF_AR_shp_Q14 = silk_SUB32( psSS[ 1 ].Diff_Q14, n_AR_Q14 ); sLF_AR_shp_Q14 = silk_SUB32_ovflw( psSS[ 1 ].Diff_Q14, n_AR_Q14 );
psSS[ 1 ].sLTP_shp_Q14 = silk_SUB_SAT32( sLF_AR_shp_Q14, n_LF_Q14 ); psSS[ 1 ].sLTP_shp_Q14 = silk_SUB_SAT32( sLF_AR_shp_Q14, n_LF_Q14 );
psSS[ 1 ].LF_AR_Q14 = sLF_AR_shp_Q14; psSS[ 1 ].LF_AR_Q14 = sLF_AR_shp_Q14;
psSS[ 1 ].LPC_exc_Q14 = LPC_exc_Q14; psSS[ 1 ].LPC_exc_Q14 = LPC_exc_Q14;

View File

@ -33,6 +33,10 @@ POSSIBILITY OF SUCH DAMAGE.
#include "stack_alloc.h" #include "stack_alloc.h"
#include "PLC.h" #include "PLC.h"
#ifdef ENABLE_DEEP_PLC
#include "lpcnet.h"
#endif
#define NB_ATT 2 #define NB_ATT 2
static const opus_int16 HARM_ATT_Q15[NB_ATT] = { 32440, 31130 }; /* 0.99, 0.95 */ static const opus_int16 HARM_ATT_Q15[NB_ATT] = { 32440, 31130 }; /* 0.99, 0.95 */
static const opus_int16 PLC_RAND_ATTENUATE_V_Q15[NB_ATT] = { 31130, 26214 }; /* 0.95, 0.8 */ static const opus_int16 PLC_RAND_ATTENUATE_V_Q15[NB_ATT] = { 31130, 26214 }; /* 0.95, 0.8 */
@ -47,6 +51,9 @@ static OPUS_INLINE void silk_PLC_conceal(
silk_decoder_state *psDec, /* I/O Decoder state */ silk_decoder_state *psDec, /* I/O Decoder state */
silk_decoder_control *psDecCtrl, /* I/O Decoder control */ silk_decoder_control *psDecCtrl, /* I/O Decoder control */
opus_int16 frame[], /* O LPC residual signal */ opus_int16 frame[], /* O LPC residual signal */
#ifdef ENABLE_DEEP_PLC
LPCNetPLCState *lpcnet,
#endif
int arch /* I Run-time architecture */ int arch /* I Run-time architecture */
); );
@ -67,6 +74,9 @@ void silk_PLC(
silk_decoder_control *psDecCtrl, /* I/O Decoder control */ silk_decoder_control *psDecCtrl, /* I/O Decoder control */
opus_int16 frame[], /* I/O signal */ opus_int16 frame[], /* I/O signal */
opus_int lost, /* I Loss flag */ opus_int lost, /* I Loss flag */
#ifdef ENABLE_DEEP_PLC
LPCNetPLCState *lpcnet,
#endif
int arch /* I Run-time architecture */ int arch /* I Run-time architecture */
) )
{ {
@ -80,7 +90,11 @@ void silk_PLC(
/****************************/ /****************************/
/* Generate Signal */ /* Generate Signal */
/****************************/ /****************************/
silk_PLC_conceal( psDec, psDecCtrl, frame, arch ); silk_PLC_conceal( psDec, psDecCtrl, frame,
#ifdef ENABLE_DEEP_PLC
lpcnet,
#endif
arch );
psDec->lossCnt++; psDec->lossCnt++;
} else { } else {
@ -88,6 +102,14 @@ void silk_PLC(
/* Update state */ /* Update state */
/****************************/ /****************************/
silk_PLC_update( psDec, psDecCtrl ); silk_PLC_update( psDec, psDecCtrl );
#ifdef ENABLE_DEEP_PLC
if ( lpcnet != NULL && psDec->sPLC.fs_kHz == 16 ) {
int k;
for( k = 0; k < psDec->nb_subfr; k += 2 ) {
lpcnet_plc_update( lpcnet, frame + k * psDec->subfr_length );
}
}
#endif
} }
} }
@ -195,6 +217,9 @@ static OPUS_INLINE void silk_PLC_conceal(
silk_decoder_state *psDec, /* I/O Decoder state */ silk_decoder_state *psDec, /* I/O Decoder state */
silk_decoder_control *psDecCtrl, /* I/O Decoder control */ silk_decoder_control *psDecCtrl, /* I/O Decoder control */
opus_int16 frame[], /* O LPC residual signal */ opus_int16 frame[], /* O LPC residual signal */
#ifdef ENABLE_DEEP_PLC
LPCNetPLCState *lpcnet,
#endif
int arch /* I Run-time architecture */ int arch /* I Run-time architecture */
) )
{ {
@ -371,6 +396,24 @@ static OPUS_INLINE void silk_PLC_conceal(
/* Scale with Gain */ /* Scale with Gain */
frame[ i ] = (opus_int16)silk_SAT16( silk_SAT16( silk_RSHIFT_ROUND( silk_SMULWW( sLPC_Q14_ptr[ MAX_LPC_ORDER + i ], prevGain_Q10[ 1 ] ), 8 ) ) ); frame[ i ] = (opus_int16)silk_SAT16( silk_SAT16( silk_RSHIFT_ROUND( silk_SMULWW( sLPC_Q14_ptr[ MAX_LPC_ORDER + i ], prevGain_Q10[ 1 ] ), 8 ) ) );
} }
#ifdef ENABLE_DEEP_PLC
if ( lpcnet != NULL && lpcnet->loaded && psDec->sPLC.fs_kHz == 16 ) {
int run_deep_plc = psDec->sPLC.enable_deep_plc || lpcnet->fec_fill_pos != 0;
if( run_deep_plc ) {
for( k = 0; k < psDec->nb_subfr; k += 2 ) {
lpcnet_plc_conceal( lpcnet, frame + k * psDec->subfr_length );
}
/* We *should* be able to copy only from psDec->frame_length-MAX_LPC_ORDER, i.e. the last MAX_LPC_ORDER samples. */
for( i = 0; i < psDec->frame_length; i++ ) {
sLPC_Q14_ptr[ MAX_LPC_ORDER + i ] = (int)floor(.5 + frame[ i ] * (float)(1 << 24) / prevGain_Q10[ 1 ] );
}
} else {
for( k = 0; k < psDec->nb_subfr; k += 2 ) {
lpcnet_plc_update( lpcnet, frame + k * psDec->subfr_length );
}
}
}
#endif
/* Save LPC state */ /* Save LPC state */
silk_memcpy( psDec->sLPC_Q14_buf, &sLPC_Q14_ptr[ psDec->frame_length ], MAX_LPC_ORDER * sizeof( opus_int32 ) ); silk_memcpy( psDec->sLPC_Q14_buf, &sLPC_Q14_ptr[ psDec->frame_length ], MAX_LPC_ORDER * sizeof( opus_int32 ) );
@ -431,12 +474,16 @@ void silk_PLC_glue_frames(
slope_Q16 = silk_DIV32_16( ( (opus_int32)1 << 16 ) - gain_Q16, length ); slope_Q16 = silk_DIV32_16( ( (opus_int32)1 << 16 ) - gain_Q16, length );
/* Make slope 4x steeper to avoid missing onsets after DTX */ /* Make slope 4x steeper to avoid missing onsets after DTX */
slope_Q16 = silk_LSHIFT( slope_Q16, 2 ); slope_Q16 = silk_LSHIFT( slope_Q16, 2 );
#ifdef ENABLE_DEEP_PLC
for( i = 0; i < length; i++ ) { if ( psDec->sPLC.fs_kHz != 16 )
frame[ i ] = silk_SMULWB( gain_Q16, frame[ i ] ); #endif
gain_Q16 += slope_Q16; {
if( gain_Q16 > (opus_int32)1 << 16 ) { for( i = 0; i < length; i++ ) {
break; frame[ i ] = silk_SMULWB( gain_Q16, frame[ i ] );
gain_Q16 += slope_Q16;
if( gain_Q16 > (opus_int32)1 << 16 ) {
break;
}
} }
} }
} }

View File

@ -49,6 +49,9 @@ void silk_PLC(
silk_decoder_control *psDecCtrl, /* I/O Decoder control */ silk_decoder_control *psDecCtrl, /* I/O Decoder control */
opus_int16 frame[], /* I/O signal */ opus_int16 frame[], /* I/O signal */
opus_int lost, /* I Loss flag */ opus_int lost, /* I Loss flag */
#ifdef ENABLE_DEEP_PLC
LPCNetPLCState *lpcnet,
#endif
int arch /* I Run-time architecture */ int arch /* I Run-time architecture */
); );

View File

@ -34,7 +34,7 @@ POSSIBILITY OF SUCH DAMAGE.
void silk_NSQ_del_dec_neon( void silk_NSQ_del_dec_neon(
const silk_encoder_state *psEncC, silk_nsq_state *NSQ, const silk_encoder_state *psEncC, silk_nsq_state *NSQ,
SideInfoIndices *psIndices, const opus_int16 x16[], opus_int8 pulses[], SideInfoIndices *psIndices, const opus_int16 x16[], opus_int8 pulses[],
const opus_int16 PredCoef_Q12[2 * MAX_LPC_ORDER], const opus_int16 *PredCoef_Q12,
const opus_int16 LTPCoef_Q14[LTP_ORDER * MAX_NB_SUBFR], const opus_int16 LTPCoef_Q14[LTP_ORDER * MAX_NB_SUBFR],
const opus_int16 AR_Q13[MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER], const opus_int16 AR_Q13[MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER],
const opus_int HarmShapeGain_Q14[MAX_NB_SUBFR], const opus_int HarmShapeGain_Q14[MAX_NB_SUBFR],
@ -65,7 +65,7 @@ void silk_NSQ_del_dec_neon(
extern void (*const SILK_NSQ_DEL_DEC_IMPL[OPUS_ARCHMASK + 1])( extern void (*const SILK_NSQ_DEL_DEC_IMPL[OPUS_ARCHMASK + 1])(
const silk_encoder_state *psEncC, silk_nsq_state *NSQ, const silk_encoder_state *psEncC, silk_nsq_state *NSQ,
SideInfoIndices *psIndices, const opus_int16 x16[], opus_int8 pulses[], SideInfoIndices *psIndices, const opus_int16 x16[], opus_int8 pulses[],
const opus_int16 PredCoef_Q12[2 * MAX_LPC_ORDER], const opus_int16 *PredCoef_Q12,
const opus_int16 LTPCoef_Q14[LTP_ORDER * MAX_NB_SUBFR], const opus_int16 LTPCoef_Q14[LTP_ORDER * MAX_NB_SUBFR],
const opus_int16 AR_Q13[MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER], const opus_int16 AR_Q13[MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER],
const opus_int HarmShapeGain_Q14[MAX_NB_SUBFR], const opus_int HarmShapeGain_Q14[MAX_NB_SUBFR],

View File

@ -35,6 +35,7 @@ POSSIBILITY OF SUCH DAMAGE.
#endif #endif
#include "main.h" #include "main.h"
#include "stack_alloc.h" #include "stack_alloc.h"
#include "os_support.h"
/* NEON intrinsics optimization now can only parallelize up to 4 delay decision states. */ /* NEON intrinsics optimization now can only parallelize up to 4 delay decision states. */
/* If there are more states, C function is called, and this optimization must be expanded. */ /* If there are more states, C function is called, and this optimization must be expanded. */
@ -220,7 +221,7 @@ void silk_NSQ_del_dec_neon(
SideInfoIndices *psIndices, /* I/O Quantization Indices */ SideInfoIndices *psIndices, /* I/O Quantization Indices */
const opus_int16 x16[], /* I Input */ const opus_int16 x16[], /* I Input */
opus_int8 pulses[], /* O Quantized pulse signal */ opus_int8 pulses[], /* O Quantized pulse signal */
const opus_int16 PredCoef_Q12[ 2 * MAX_LPC_ORDER ], /* I Short term prediction coefs */ const opus_int16 *PredCoef_Q12, /* I Short term prediction coefs */
const opus_int16 LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ], /* I Long term prediction coefs */ const opus_int16 LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ], /* I Long term prediction coefs */
const opus_int16 AR_Q13[ MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER ], /* I Noise shaping coefs */ const opus_int16 AR_Q13[ MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER ], /* I Noise shaping coefs */
const opus_int HarmShapeGain_Q14[ MAX_NB_SUBFR ], /* I Long term shaping coefs */ const opus_int HarmShapeGain_Q14[ MAX_NB_SUBFR ], /* I Long term shaping coefs */
@ -279,6 +280,7 @@ void silk_NSQ_del_dec_neon(
/* Initialize delayed decision states */ /* Initialize delayed decision states */
ALLOC( psDelDec, 1, NSQ_del_decs_struct ); ALLOC( psDelDec, 1, NSQ_del_decs_struct );
OPUS_CLEAR(psDelDec, 1);
/* Only RandState and RD_Q10 need to be initialized to 0. */ /* Only RandState and RD_Q10 need to be initialized to 0. */
silk_memset( psDelDec->RandState, 0, sizeof( psDelDec->RandState ) ); silk_memset( psDelDec->RandState, 0, sizeof( psDelDec->RandState ) );
vst1q_s32( psDelDec->RD_Q10, vdupq_n_s32( 0 ) ); vst1q_s32( psDelDec->RD_Q10, vdupq_n_s32( 0 ) );
@ -587,6 +589,7 @@ static OPUS_INLINE void silk_noise_shape_quantizer_del_dec_neon(
silk_assert( nStatesDelayedDecision > 0 ); silk_assert( nStatesDelayedDecision > 0 );
silk_assert( ( shapingLPCOrder & 1 ) == 0 ); /* check that order is even */ silk_assert( ( shapingLPCOrder & 1 ) == 0 ); /* check that order is even */
ALLOC( psSampleState, 2, NSQ_samples_struct ); ALLOC( psSampleState, 2, NSQ_samples_struct );
OPUS_CLEAR(psSampleState, 2);
shp_lag_ptr = &NSQ->sLTP_shp_Q14[ NSQ->sLTP_shp_buf_idx - lag + HARM_SHAPE_FIR_TAPS / 2 ]; shp_lag_ptr = &NSQ->sLTP_shp_Q14[ NSQ->sLTP_shp_buf_idx - lag + HARM_SHAPE_FIR_TAPS / 2 ];
pred_lag_ptr = &sLTP_Q15[ NSQ->sLTP_buf_idx - lag + LTP_ORDER / 2 ]; pred_lag_ptr = &sLTP_Q15[ NSQ->sLTP_buf_idx - lag + LTP_ORDER / 2 ];
@ -711,23 +714,26 @@ static OPUS_INLINE void silk_noise_shape_quantizer_del_dec_neon(
const int rdo_offset = Lambda_Q10/2 - 512; const int rdo_offset = Lambda_Q10/2 - 512;
const uint16x4_t greaterThanRdo = vcgt_s16( q1_Q10_s16x4, vdup_n_s16( rdo_offset ) ); const uint16x4_t greaterThanRdo = vcgt_s16( q1_Q10_s16x4, vdup_n_s16( rdo_offset ) );
const uint16x4_t lessThanMinusRdo = vclt_s16( q1_Q10_s16x4, vdup_n_s16( -rdo_offset ) ); const uint16x4_t lessThanMinusRdo = vclt_s16( q1_Q10_s16x4, vdup_n_s16( -rdo_offset ) );
int16x4_t signed_offset = vbsl_s16( greaterThanRdo, vdup_n_s16( -rdo_offset ), vdup_n_s16( 0 ) );
signed_offset = vbsl_s16( lessThanMinusRdo, vdup_n_s16( rdo_offset ), signed_offset );
/* If Lambda_Q10 > 32767, then q1_Q0, q1_Q10 and q2_Q10 must change to 32-bit. */ /* If Lambda_Q10 > 32767, then q1_Q0, q1_Q10 and q2_Q10 must change to 32-bit. */
silk_assert( Lambda_Q10 <= 32767 ); silk_assert( Lambda_Q10 <= 32767 );
q1_Q0_s16x4 = vreinterpret_s16_u16( vclt_s16( q1_Q10_s16x4, vdup_n_s16( 0 ) ) ); q1_Q0_s16x4 = vreinterpret_s16_u16( vclt_s16( q1_Q10_s16x4, vdup_n_s16( 0 ) ) );
q1_Q0_s16x4 = vbsl_s16( greaterThanRdo, vsub_s16( q1_Q10_s16x4, vdup_n_s16( rdo_offset ) ), q1_Q0_s16x4 ); q1_Q0_s16x4 = vbsl_s16(vorr_u16(greaterThanRdo, lessThanMinusRdo), vadd_s16( q1_Q10_s16x4 , signed_offset), q1_Q0_s16x4);
q1_Q0_s16x4 = vbsl_s16( lessThanMinusRdo, vadd_s16( q1_Q10_s16x4, vdup_n_s16( rdo_offset ) ), q1_Q0_s16x4 );
q1_Q0_s16x4 = vshr_n_s16( q1_Q0_s16x4, 10 ); q1_Q0_s16x4 = vshr_n_s16( q1_Q0_s16x4, 10 );
} }
{ {
const uint16x4_t equal0_u16x4 = vceq_s16( q1_Q0_s16x4, vdup_n_s16( 0 ) ); const uint16x4_t equal0_u16x4 = vceq_s16( q1_Q0_s16x4, vdup_n_s16( 0 ) );
const uint16x4_t equalMinus1_u16x4 = vceq_s16( q1_Q0_s16x4, vdup_n_s16( -1 ) ); const uint16x4_t equalMinus1_u16x4 = vceq_s16( q1_Q0_s16x4, vdup_n_s16( -1 ) );
const uint16x4_t lessThanMinus1_u16x4 = vclt_s16( q1_Q0_s16x4, vdup_n_s16( -1 ) ); const uint16x4_t lessThanMinus1_u16x4 = vclt_s16( q1_Q0_s16x4, vdup_n_s16( -1 ) );
int16x4_t tmp1_s16x4, tmp2_s16x4; int16x4_t tmp1_s16x4, tmp2_s16x4, tmp_summand_s16x4;
q1_Q10_s16x4 = vshl_n_s16( q1_Q0_s16x4, 10 ); q1_Q10_s16x4 = vshl_n_s16( q1_Q0_s16x4, 10 );
tmp1_s16x4 = vadd_s16( q1_Q10_s16x4, vdup_n_s16( offset_Q10 - QUANT_LEVEL_ADJUST_Q10 ) ); tmp_summand_s16x4 = vand_s16( vreinterpret_s16_u16(vcge_s16(q1_Q0_s16x4, vdup_n_s16(0))), vdup_n_s16( offset_Q10 - QUANT_LEVEL_ADJUST_Q10 ) );
q1_Q10_s16x4 = vadd_s16( q1_Q10_s16x4, vdup_n_s16( offset_Q10 + QUANT_LEVEL_ADJUST_Q10 ) ); tmp1_s16x4 = vadd_s16( q1_Q10_s16x4, tmp_summand_s16x4 );
tmp_summand_s16x4 = vbsl_s16( lessThanMinus1_u16x4, vdup_n_s16( offset_Q10 + QUANT_LEVEL_ADJUST_Q10 ), vdup_n_s16(0) );
q1_Q10_s16x4 = vadd_s16( q1_Q10_s16x4, tmp_summand_s16x4);
q1_Q10_s16x4 = vbsl_s16( lessThanMinus1_u16x4, q1_Q10_s16x4, tmp1_s16x4 ); q1_Q10_s16x4 = vbsl_s16( lessThanMinus1_u16x4, q1_Q10_s16x4, tmp1_s16x4 );
q1_Q10_s16x4 = vbsl_s16( equal0_u16x4, vdup_n_s16( offset_Q10 ), q1_Q10_s16x4 ); q1_Q10_s16x4 = vbsl_s16( equal0_u16x4, vdup_n_s16( offset_Q10 ), q1_Q10_s16x4 );
q1_Q10_s16x4 = vbsl_s16( equalMinus1_u16x4, vdup_n_s16( offset_Q10 - ( 1024 - QUANT_LEVEL_ADJUST_Q10 ) ), q1_Q10_s16x4 ); q1_Q10_s16x4 = vbsl_s16( equalMinus1_u16x4, vdup_n_s16( offset_Q10 - ( 1024 - QUANT_LEVEL_ADJUST_Q10 ) ), q1_Q10_s16x4 );
@ -818,6 +824,13 @@ static OPUS_INLINE void silk_noise_shape_quantizer_del_dec_neon(
} }
} }
/* clear unused part of RD_Q10 to avoid overflows */
if( nStatesDelayedDecision < NEON_MAX_DEL_DEC_STATES )
{
OPUS_CLEAR(psSampleState[0].RD_Q10 + nStatesDelayedDecision, NEON_MAX_DEL_DEC_STATES - nStatesDelayedDecision);
OPUS_CLEAR(psSampleState[1].RD_Q10 + nStatesDelayedDecision, NEON_MAX_DEL_DEC_STATES - nStatesDelayedDecision);
}
/* Increase RD values of expired states */ /* Increase RD values of expired states */
{ {
uint32x4_t t_u32x4; uint32x4_t t_u32x4;
@ -896,7 +909,8 @@ static OPUS_INLINE void silk_noise_shape_quantizer_del_dec_neon(
vst1q_s32( psDelDec->Pred_Q15[ *smpl_buf_idx ], vshlq_n_s32( vld1q_s32( psSampleState[ 0 ].LPC_exc_Q14 ), 1 ) ); vst1q_s32( psDelDec->Pred_Q15[ *smpl_buf_idx ], vshlq_n_s32( vld1q_s32( psSampleState[ 0 ].LPC_exc_Q14 ), 1 ) );
vst1q_s32( psDelDec->Shape_Q14[ *smpl_buf_idx ], vld1q_s32( psSampleState[ 0 ].sLTP_shp_Q14 ) ); vst1q_s32( psDelDec->Shape_Q14[ *smpl_buf_idx ], vld1q_s32( psSampleState[ 0 ].sLTP_shp_Q14 ) );
tmp1_s32x4 = vrshrq_n_s32( tmp1_s32x4, 10 ); tmp1_s32x4 = vrshrq_n_s32( tmp1_s32x4, 10 );
tmp1_s32x4 = vaddq_s32( vld1q_s32( psDelDec->Seed ), tmp1_s32x4 ); tmp1_s32x4 = vreinterpretq_s32_u32( vaddq_u32( vreinterpretq_u32_s32(
vld1q_s32( psDelDec->Seed ) ), vreinterpretq_u32_s32( tmp1_s32x4 ) ) );
vst1q_s32( psDelDec->Seed, tmp1_s32x4 ); vst1q_s32( psDelDec->Seed, tmp1_s32x4 );
vst1q_s32( psDelDec->RandState[ *smpl_buf_idx ], tmp1_s32x4 ); vst1q_s32( psDelDec->RandState[ *smpl_buf_idx ], tmp1_s32x4 );
vst1q_s32( psDelDec->RD_Q10, vld1q_s32( psSampleState[ 0 ].RD_Q10 ) ); vst1q_s32( psDelDec->RD_Q10, vld1q_s32( psSampleState[ 0 ].RD_Q10 ) );

View File

@ -73,7 +73,7 @@ static OPUS_INLINE void silk_short_prediction_create_arch_coef_neon(opus_int32 *
#elif defined(OPUS_HAVE_RTCD) && defined(OPUS_ARM_MAY_HAVE_NEON_INTR) #elif defined(OPUS_HAVE_RTCD) && defined(OPUS_ARM_MAY_HAVE_NEON_INTR)
#define silk_short_prediction_create_arch_coef(out, in, order) \ #define silk_short_prediction_create_arch_coef(out, in, order) \
do { if (arch == OPUS_ARCH_ARM_NEON) { silk_short_prediction_create_arch_coef_neon(out, in, order); } } while (0) do { if (arch >= OPUS_ARCH_ARM_NEON) { silk_short_prediction_create_arch_coef_neon(out, in, order); } } while (0)
#endif #endif
@ -95,7 +95,7 @@ opus_int32 silk_NSQ_noise_shape_feedback_loop_neon(const opus_int32 *data0, opus
(coef vs. coefRev) so can't use the usual IMPL table implementation */ (coef vs. coefRev) so can't use the usual IMPL table implementation */
#undef silk_noise_shape_quantizer_short_prediction #undef silk_noise_shape_quantizer_short_prediction
#define silk_noise_shape_quantizer_short_prediction(in, coef, coefRev, order, arch) \ #define silk_noise_shape_quantizer_short_prediction(in, coef, coefRev, order, arch) \
(arch == OPUS_ARCH_ARM_NEON ? \ (arch >= OPUS_ARCH_ARM_NEON ? \
silk_noise_shape_quantizer_short_prediction_neon(in, coefRev, order) : \ silk_noise_shape_quantizer_short_prediction_neon(in, coefRev, order) : \
silk_noise_shape_quantizer_short_prediction_c(in, coef, order)) silk_noise_shape_quantizer_short_prediction_c(in, coef, order))

View File

@ -49,6 +49,7 @@ void (*const SILK_BIQUAD_ALT_STRIDE2_IMPL[OPUS_ARCHMASK + 1])(
silk_biquad_alt_stride2_c, /* EDSP */ silk_biquad_alt_stride2_c, /* EDSP */
silk_biquad_alt_stride2_c, /* Media */ silk_biquad_alt_stride2_c, /* Media */
silk_biquad_alt_stride2_neon, /* Neon */ silk_biquad_alt_stride2_neon, /* Neon */
silk_biquad_alt_stride2_neon, /* dotprod */
}; };
opus_int32 (*const SILK_LPC_INVERSE_PRED_GAIN_IMPL[OPUS_ARCHMASK + 1])( /* O Returns inverse prediction gain in energy domain, Q30 */ opus_int32 (*const SILK_LPC_INVERSE_PRED_GAIN_IMPL[OPUS_ARCHMASK + 1])( /* O Returns inverse prediction gain in energy domain, Q30 */
@ -59,6 +60,7 @@ opus_int32 (*const SILK_LPC_INVERSE_PRED_GAIN_IMPL[OPUS_ARCHMASK + 1])( /* O R
silk_LPC_inverse_pred_gain_c, /* EDSP */ silk_LPC_inverse_pred_gain_c, /* EDSP */
silk_LPC_inverse_pred_gain_c, /* Media */ silk_LPC_inverse_pred_gain_c, /* Media */
silk_LPC_inverse_pred_gain_neon, /* Neon */ silk_LPC_inverse_pred_gain_neon, /* Neon */
silk_LPC_inverse_pred_gain_neon, /* dotprod */
}; };
void (*const SILK_NSQ_DEL_DEC_IMPL[OPUS_ARCHMASK + 1])( void (*const SILK_NSQ_DEL_DEC_IMPL[OPUS_ARCHMASK + 1])(
@ -67,7 +69,7 @@ void (*const SILK_NSQ_DEL_DEC_IMPL[OPUS_ARCHMASK + 1])(
SideInfoIndices *psIndices, /* I/O Quantization Indices */ SideInfoIndices *psIndices, /* I/O Quantization Indices */
const opus_int16 x16[], /* I Input */ const opus_int16 x16[], /* I Input */
opus_int8 pulses[], /* O Quantized pulse signal */ opus_int8 pulses[], /* O Quantized pulse signal */
const opus_int16 PredCoef_Q12[ 2 * MAX_LPC_ORDER ], /* I Short term prediction coefs */ const opus_int16 *PredCoef_Q12, /* I Short term prediction coefs */
const opus_int16 LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ], /* I Long term prediction coefs */ const opus_int16 LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ], /* I Long term prediction coefs */
const opus_int16 AR_Q13[ MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER ], /* I Noise shaping coefs */ const opus_int16 AR_Q13[ MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER ], /* I Noise shaping coefs */
const opus_int HarmShapeGain_Q14[ MAX_NB_SUBFR ], /* I Long term shaping coefs */ const opus_int HarmShapeGain_Q14[ MAX_NB_SUBFR ], /* I Long term shaping coefs */
@ -82,6 +84,7 @@ void (*const SILK_NSQ_DEL_DEC_IMPL[OPUS_ARCHMASK + 1])(
silk_NSQ_del_dec_c, /* EDSP */ silk_NSQ_del_dec_c, /* EDSP */
silk_NSQ_del_dec_c, /* Media */ silk_NSQ_del_dec_c, /* Media */
silk_NSQ_del_dec_neon, /* Neon */ silk_NSQ_del_dec_neon, /* Neon */
silk_NSQ_del_dec_neon, /* dotprod */
}; };
/*There is no table for silk_noise_shape_quantizer_short_prediction because the /*There is no table for silk_noise_shape_quantizer_short_prediction because the
@ -97,6 +100,7 @@ opus_int32
silk_NSQ_noise_shape_feedback_loop_c, /* EDSP */ silk_NSQ_noise_shape_feedback_loop_c, /* EDSP */
silk_NSQ_noise_shape_feedback_loop_c, /* Media */ silk_NSQ_noise_shape_feedback_loop_c, /* Media */
silk_NSQ_noise_shape_feedback_loop_neon, /* NEON */ silk_NSQ_noise_shape_feedback_loop_neon, /* NEON */
silk_NSQ_noise_shape_feedback_loop_neon, /* dotprod */
}; };
# endif # endif
@ -116,6 +120,7 @@ void (*const SILK_WARPED_AUTOCORRELATION_FIX_IMPL[OPUS_ARCHMASK + 1])(
silk_warped_autocorrelation_FIX_c, /* EDSP */ silk_warped_autocorrelation_FIX_c, /* EDSP */
silk_warped_autocorrelation_FIX_c, /* Media */ silk_warped_autocorrelation_FIX_c, /* Media */
silk_warped_autocorrelation_FIX_neon, /* Neon */ silk_warped_autocorrelation_FIX_neon, /* Neon */
silk_warped_autocorrelation_FIX_neon, /* dotprod */
}; };
# endif # endif

View File

@ -77,6 +77,9 @@ typedef struct {
/* I: Flag to enable in-band Forward Error Correction (FEC); 0/1 */ /* I: Flag to enable in-band Forward Error Correction (FEC); 0/1 */
opus_int useInBandFEC; opus_int useInBandFEC;
/* I: Flag to enable in-band Deep REDundancy (DRED); 0/1 */
opus_int useDRED;
/* I: Flag to actually code in-band Forward Error Correction (FEC) in the current packet; 0/1 */ /* I: Flag to actually code in-band Forward Error Correction (FEC) in the current packet; 0/1 */
opus_int LBRR_coded; opus_int LBRR_coded;
@ -141,6 +144,14 @@ typedef struct {
/* O: Pitch lag of previous frame (0 if unvoiced), measured in samples at 48 kHz */ /* O: Pitch lag of previous frame (0 if unvoiced), measured in samples at 48 kHz */
opus_int prevPitchLag; opus_int prevPitchLag;
/* I: Enable Deep PLC */
opus_int enable_deep_plc;
#ifdef ENABLE_OSCE
/* I: OSCE method */
opus_int osce_method;
#endif
} silk_DecControlStruct; } silk_DecControlStruct;
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -33,6 +33,11 @@ POSSIBILITY OF SUCH DAMAGE.
#include "stack_alloc.h" #include "stack_alloc.h"
#include "os_support.h" #include "os_support.h"
#ifdef ENABLE_OSCE
#include "osce.h"
#include "osce_structs.h"
#endif
/************************/ /************************/
/* Decoder Super Struct */ /* Decoder Super Struct */
/************************/ /************************/
@ -42,12 +47,33 @@ typedef struct {
opus_int nChannelsAPI; opus_int nChannelsAPI;
opus_int nChannelsInternal; opus_int nChannelsInternal;
opus_int prev_decode_only_middle; opus_int prev_decode_only_middle;
#ifdef ENABLE_OSCE
OSCEModel osce_model;
#endif
} silk_decoder; } silk_decoder;
/*********************/ /*********************/
/* Decoder functions */ /* Decoder functions */
/*********************/ /*********************/
opus_int silk_LoadOSCEModels(void *decState, const unsigned char *data, int len)
{
#ifdef ENABLE_OSCE
opus_int ret = SILK_NO_ERROR;
ret = osce_load_models(&((silk_decoder *)decState)->osce_model, data, len);
((silk_decoder *)decState)->osce_model.loaded = (ret == 0);
return ret;
#else
(void) decState;
(void) data;
(void) len;
return SILK_NO_ERROR;
#endif
}
opus_int silk_Get_Decoder_Size( /* O Returns error code */ opus_int silk_Get_Decoder_Size( /* O Returns error code */
opus_int *decSizeBytes /* O Number of bytes in SILK decoder state */ opus_int *decSizeBytes /* O Number of bytes in SILK decoder state */
) )
@ -60,12 +86,37 @@ opus_int silk_Get_Decoder_Size( /* O Returns error co
} }
/* Reset decoder state */ /* Reset decoder state */
opus_int silk_ResetDecoder( /* O Returns error code */
void *decState /* I/O State */
)
{
opus_int n, ret = SILK_NO_ERROR;
silk_decoder_state *channel_state = ((silk_decoder *)decState)->channel_state;
for( n = 0; n < DECODER_NUM_CHANNELS; n++ ) {
ret = silk_reset_decoder( &channel_state[ n ] );
}
silk_memset(&((silk_decoder *)decState)->sStereo, 0, sizeof(((silk_decoder *)decState)->sStereo));
/* Not strictly needed, but it's cleaner that way */
((silk_decoder *)decState)->prev_decode_only_middle = 0;
return ret;
}
opus_int silk_InitDecoder( /* O Returns error code */ opus_int silk_InitDecoder( /* O Returns error code */
void *decState /* I/O State */ void *decState /* I/O State */
) )
{ {
opus_int n, ret = SILK_NO_ERROR; opus_int n, ret = SILK_NO_ERROR;
silk_decoder_state *channel_state = ((silk_decoder *)decState)->channel_state; silk_decoder_state *channel_state = ((silk_decoder *)decState)->channel_state;
#ifdef ENABLE_OSCE
((silk_decoder *)decState)->osce_model.loaded = 0;
#endif
#ifndef USE_WEIGHTS_FILE
/* load osce models */
silk_LoadOSCEModels(decState, NULL, 0);
#endif
for( n = 0; n < DECODER_NUM_CHANNELS; n++ ) { for( n = 0; n < DECODER_NUM_CHANNELS; n++ ) {
ret = silk_init_decoder( &channel_state[ n ] ); ret = silk_init_decoder( &channel_state[ n ] );
@ -86,6 +137,9 @@ opus_int silk_Decode( /* O Returns error co
ec_dec *psRangeDec, /* I/O Compressor data structure */ ec_dec *psRangeDec, /* I/O Compressor data structure */
opus_int16 *samplesOut, /* O Decoded output speech vector */ opus_int16 *samplesOut, /* O Decoded output speech vector */
opus_int32 *nSamplesOut, /* O Number of samples decoded */ opus_int32 *nSamplesOut, /* O Number of samples decoded */
#ifdef ENABLE_DEEP_PLC
LPCNetPLCState *lpcnet,
#endif
int arch /* I Run-time architecture */ int arch /* I Run-time architecture */
) )
{ {
@ -278,6 +332,7 @@ opus_int silk_Decode( /* O Returns error co
has_side = !psDec->prev_decode_only_middle has_side = !psDec->prev_decode_only_middle
|| (decControl->nChannelsInternal == 2 && lostFlag == FLAG_DECODE_LBRR && channel_state[1].LBRR_flags[ channel_state[1].nFramesDecoded ] == 1 ); || (decControl->nChannelsInternal == 2 && lostFlag == FLAG_DECODE_LBRR && channel_state[1].LBRR_flags[ channel_state[1].nFramesDecoded ] == 1 );
} }
channel_state[ 0 ].sPLC.enable_deep_plc = decControl->enable_deep_plc;
/* Call decoder for one frame */ /* Call decoder for one frame */
for( n = 0; n < decControl->nChannelsInternal; n++ ) { for( n = 0; n < decControl->nChannelsInternal; n++ ) {
if( n == 0 || has_side ) { if( n == 0 || has_side ) {
@ -297,7 +352,19 @@ opus_int silk_Decode( /* O Returns error co
} else { } else {
condCoding = CODE_CONDITIONALLY; condCoding = CODE_CONDITIONALLY;
} }
ret += silk_decode_frame( &channel_state[ n ], psRangeDec, &samplesOut1_tmp[ n ][ 2 ], &nSamplesOutDec, lostFlag, condCoding, arch); #ifdef ENABLE_OSCE
if ( channel_state[n].osce.method != decControl->osce_method ) {
osce_reset( &channel_state[n].osce, decControl->osce_method );
}
#endif
ret += silk_decode_frame( &channel_state[ n ], psRangeDec, &samplesOut1_tmp[ n ][ 2 ], &nSamplesOutDec, lostFlag, condCoding,
#ifdef ENABLE_DEEP_PLC
n == 0 ? lpcnet : NULL,
#endif
#ifdef ENABLE_OSCE
&psDec->osce_model,
#endif
arch);
} else { } else {
silk_memset( &samplesOut1_tmp[ n ][ 2 ], 0, nSamplesOutDec * sizeof( opus_int16 ) ); silk_memset( &samplesOut1_tmp[ n ][ 2 ], 0, nSamplesOutDec * sizeof( opus_int16 ) );
} }

View File

@ -33,6 +33,10 @@ POSSIBILITY OF SUCH DAMAGE.
#include "stack_alloc.h" #include "stack_alloc.h"
#include "PLC.h" #include "PLC.h"
#ifdef ENABLE_OSCE
#include "osce.h"
#endif
/****************/ /****************/
/* Decode frame */ /* Decode frame */
/****************/ /****************/
@ -43,6 +47,12 @@ opus_int silk_decode_frame(
opus_int32 *pN, /* O Pointer to size of output frame */ opus_int32 *pN, /* O Pointer to size of output frame */
opus_int lostFlag, /* I 0: no loss, 1 loss, 2 decode fec */ opus_int lostFlag, /* I 0: no loss, 1 loss, 2 decode fec */
opus_int condCoding, /* I The type of conditional coding to use */ opus_int condCoding, /* I The type of conditional coding to use */
#ifdef ENABLE_DEEP_PLC
LPCNetPLCState *lpcnet,
#endif
#ifdef ENABLE_OSCE
OSCEModel *osce_model,
#endif
int arch /* I Run-time architecture */ int arch /* I Run-time architecture */
) )
{ {
@ -61,6 +71,10 @@ opus_int silk_decode_frame(
( lostFlag == FLAG_DECODE_LBRR && psDec->LBRR_flags[ psDec->nFramesDecoded ] == 1 ) ) ( lostFlag == FLAG_DECODE_LBRR && psDec->LBRR_flags[ psDec->nFramesDecoded ] == 1 ) )
{ {
VARDECL( opus_int16, pulses ); VARDECL( opus_int16, pulses );
#ifdef ENABLE_OSCE
opus_int32 ec_start;
ec_start = ec_tell(psRangeDec);
#endif
ALLOC( pulses, (L + SHELL_CODEC_FRAME_LENGTH - 1) & ALLOC( pulses, (L + SHELL_CODEC_FRAME_LENGTH - 1) &
~(SHELL_CODEC_FRAME_LENGTH - 1), opus_int16 ); ~(SHELL_CODEC_FRAME_LENGTH - 1), opus_int16 );
/*********************************************/ /*********************************************/
@ -84,10 +98,29 @@ opus_int silk_decode_frame(
/********************************************************/ /********************************************************/
silk_decode_core( psDec, psDecCtrl, pOut, pulses, arch ); silk_decode_core( psDec, psDecCtrl, pOut, pulses, arch );
/*************************/
/* Update output buffer. */
/*************************/
celt_assert( psDec->ltp_mem_length >= psDec->frame_length );
mv_len = psDec->ltp_mem_length - psDec->frame_length;
silk_memmove( psDec->outBuf, &psDec->outBuf[ psDec->frame_length ], mv_len * sizeof(opus_int16) );
silk_memcpy( &psDec->outBuf[ mv_len ], pOut, psDec->frame_length * sizeof( opus_int16 ) );
#ifdef ENABLE_OSCE
/********************************************************/
/* Run SILK enhancer */
/********************************************************/
osce_enhance_frame( osce_model, psDec, psDecCtrl, pOut, ec_tell(psRangeDec) - ec_start, arch );
#endif
/********************************************************/ /********************************************************/
/* Update PLC state */ /* Update PLC state */
/********************************************************/ /********************************************************/
silk_PLC( psDec, psDecCtrl, pOut, 0, arch ); silk_PLC( psDec, psDecCtrl, pOut, 0,
#ifdef ENABLE_DEEP_PLC
lpcnet,
#endif
arch );
psDec->lossCnt = 0; psDec->lossCnt = 0;
psDec->prevSignalType = psDec->indices.signalType; psDec->prevSignalType = psDec->indices.signalType;
@ -97,16 +130,23 @@ opus_int silk_decode_frame(
psDec->first_frame_after_reset = 0; psDec->first_frame_after_reset = 0;
} else { } else {
/* Handle packet loss by extrapolation */ /* Handle packet loss by extrapolation */
silk_PLC( psDec, psDecCtrl, pOut, 1, arch ); silk_PLC( psDec, psDecCtrl, pOut, 1,
} #ifdef ENABLE_DEEP_PLC
lpcnet,
#endif
arch );
/*************************/ #ifdef ENABLE_OSCE
/* Update output buffer. */ osce_reset( &psDec->osce, psDec->osce.method );
/*************************/ #endif
celt_assert( psDec->ltp_mem_length >= psDec->frame_length ); /*************************/
mv_len = psDec->ltp_mem_length - psDec->frame_length; /* Update output buffer. */
silk_memmove( psDec->outBuf, &psDec->outBuf[ psDec->frame_length ], mv_len * sizeof(opus_int16) ); /*************************/
silk_memcpy( &psDec->outBuf[ mv_len ], pOut, psDec->frame_length * sizeof( opus_int16 ) ); celt_assert( psDec->ltp_mem_length >= psDec->frame_length );
mv_len = psDec->ltp_mem_length - psDec->frame_length;
silk_memmove( psDec->outBuf, &psDec->outBuf[ psDec->frame_length ], mv_len * sizeof(opus_int16) );
silk_memcpy( &psDec->outBuf[ mv_len ], pOut, psDec->frame_length * sizeof( opus_int16 ) );
}
/************************************************/ /************************************************/
/* Comfort noise generation / estimation */ /* Comfort noise generation / estimation */

View File

@ -41,6 +41,10 @@ POSSIBILITY OF SUCH DAMAGE.
#include "main_FLP.h" #include "main_FLP.h"
#endif #endif
#ifdef ENABLE_DRED
#include "dred_encoder.h"
#endif
/***************************************/ /***************************************/
/* Read control structure from encoder */ /* Read control structure from encoder */
/***************************************/ /***************************************/

Some files were not shown because too many files have changed in this diff Show More