From 375bf64275d7ac250e90550bbc152a672ba9a6bc Mon Sep 17 00:00:00 2001 From: Dmytro Bogovych Date: Thu, 21 Aug 2025 12:17:04 +0300 Subject: [PATCH] - upgrade to opus 1.5.2 + fix Opus CMakeLists for macOS ARM + fix rtphone macOS build --- src/CMakeLists.txt | 1 + src/engine/media/MT_AmrCodec.cpp | 4 +- src/libs/ice/ICENetworkHelper.cpp | 2 +- src/libs/opus/CMakeLists.txt | 270 +- src/libs/opus/COPYING | 4 +- src/libs/opus/INSTALL | 6 +- src/libs/opus/Makefile.am | 157 +- src/libs/opus/Makefile.in | 1154 ++- src/libs/opus/Makefile.mips | 14 +- src/libs/opus/Makefile.unix | 14 +- src/libs/opus/README | 30 +- src/libs/opus/aclocal.m4 | 83 +- src/libs/opus/celt/arm/arm_celt_map.c | 31 +- src/libs/opus/celt/arm/armcpu.c | 101 +- src/libs/opus/celt/arm/armcpu.h | 13 + src/libs/opus/celt/arm/celt_neon_intr.c | 83 +- src/libs/opus/celt/arm/pitch_neon_intr.c | 7 + src/libs/opus/celt/bands.c | 2 +- src/libs/opus/celt/celt.h | 25 +- src/libs/opus/celt/celt_decoder.c | 360 +- src/libs/opus/celt/celt_encoder.c | 70 +- src/libs/opus/celt/celt_lpc.c | 27 +- src/libs/opus/celt/celt_lpc.h | 2 +- src/libs/opus/celt/cpu_support.h | 7 +- src/libs/opus/celt/entdec.c | 21 + src/libs/opus/celt/entdec.h | 10 + src/libs/opus/celt/entenc.c | 11 + src/libs/opus/celt/entenc.h | 9 + src/libs/opus/celt/laplace.c | 101 + src/libs/opus/celt/laplace.h | 9 + src/libs/opus/celt/mathops.h | 6 + src/libs/opus/celt/meson.build | 13 +- src/libs/opus/celt/mips/celt_mipsr1.h | 6 +- src/libs/opus/celt/mips/mdct_mipsr1.h | 6 +- src/libs/opus/celt/mips/vq_mipsr1.h | 6 +- src/libs/opus/celt/os_support.h | 14 +- src/libs/opus/celt/pitch.c | 11 +- src/libs/opus/celt/pitch.h | 11 + src/libs/opus/celt/stack_alloc.h | 2 +- src/libs/opus/celt/tests/test_unit_cwrs32.c | 1 + src/libs/opus/celt/tests/test_unit_dft.c | 1 + src/libs/opus/celt/tests/test_unit_laplace.c | 1 + src/libs/opus/celt/tests/test_unit_mdct.c | 1 + src/libs/opus/celt/tests/test_unit_rotation.c | 1 + src/libs/opus/celt/x86/celt_lpc_sse4_1.c | 13 +- src/libs/opus/celt/x86/pitch_sse.h | 40 +- src/libs/opus/celt/x86/vq_sse.h | 6 +- src/libs/opus/celt/x86/vq_sse2.c | 8 +- src/libs/opus/celt/x86/x86_celt_map.c | 20 + src/libs/opus/celt/x86/x86cpu.c | 16 +- src/libs/opus/celt/x86/x86cpu.h | 63 +- src/libs/opus/celt_headers.mk | 1 + src/libs/opus/celt_sources.mk | 3 + src/libs/opus/cmake/OpusConfig.cmake | 5 +- src/libs/opus/cmake/OpusFunctions.cmake | 22 +- src/libs/opus/cmake/OpusSources.cmake | 20 + src/libs/opus/compile | 6 +- src/libs/opus/config.guess | 1500 ++-- src/libs/opus/config.h.in | 45 +- src/libs/opus/config.sub | 2855 +++---- src/libs/opus/configure | 6884 ++++++++++------- src/libs/opus/configure.ac | 196 +- src/libs/opus/depcomp | 2 +- src/libs/opus/dnn/dred_rdovae_dec_data.c | 238 +- src/libs/opus/dnn/dred_rdovae_enc_data.c | 194 +- src/libs/opus/dnn/dump_data.c | 44 +- src/libs/opus/dnn/fargan_data.c | 164 +- src/libs/opus/dnn/lace_data.c | 98 +- src/libs/opus/dnn/lpcnet_private.h | 2 +- src/libs/opus/dnn/meson.build | 6 +- src/libs/opus/dnn/nolace_data.c | 244 +- src/libs/opus/dnn/pitchdnn_data.c | 68 +- src/libs/opus/dnn/plc_data.c | 48 +- src/libs/opus/dnn/vec_neon.h | 2 +- src/libs/opus/doc/Makefile.in | 17 +- src/libs/opus/include/opus.h | 122 +- src/libs/opus/include/opus_defines.h | 29 + src/libs/opus/include/opus_multistream.h | 2 +- src/libs/opus/install-sh | 157 +- src/libs/opus/ltmain.sh | 4 +- src/libs/opus/m4/libtool.m4 | 4 +- src/libs/opus/meson.build | 148 +- src/libs/opus/meson_options.txt | 5 + src/libs/opus/missing | 2 +- src/libs/opus/opus_headers.mk | 3 +- src/libs/opus/opus_sources.mk | 1 + src/libs/opus/package_version | 2 +- src/libs/opus/silk/API.h | 23 +- src/libs/opus/silk/NSQ.c | 14 +- src/libs/opus/silk/NSQ_del_dec.c | 22 +- src/libs/opus/silk/PLC.c | 61 +- src/libs/opus/silk/PLC.h | 3 + src/libs/opus/silk/arm/NSQ_del_dec_arm.h | 4 +- .../opus/silk/arm/NSQ_del_dec_neon_intr.c | 28 +- src/libs/opus/silk/arm/NSQ_neon.h | 4 +- src/libs/opus/silk/arm/arm_silk_map.c | 7 +- src/libs/opus/silk/control.h | 11 + src/libs/opus/silk/dec_API.c | 69 +- src/libs/opus/silk/decode_frame.c | 60 +- src/libs/opus/silk/enc_API.c | 4 + src/libs/opus/silk/fixed/encode_frame_FIX.c | 18 +- src/libs/opus/silk/float/SigProc_FLP.h | 14 +- .../opus/silk/float/autocorrelation_FLP.c | 5 +- src/libs/opus/silk/float/burg_modified_FLP.c | 5 +- src/libs/opus/silk/float/corrMatrix_FLP.c | 10 +- src/libs/opus/silk/float/encode_frame_FLP.c | 17 +- src/libs/opus/silk/float/find_LPC_FLP.c | 7 +- src/libs/opus/silk/float/find_LTP_FLP.c | 7 +- .../opus/silk/float/find_pitch_lags_FLP.c | 2 +- .../opus/silk/float/find_pred_coefs_FLP.c | 4 +- src/libs/opus/silk/float/inner_product_FLP.c | 2 +- src/libs/opus/silk/float/main_FLP.h | 12 +- .../silk/float/noise_shape_analysis_FLP.c | 2 +- .../opus/silk/float/pitch_analysis_core_FLP.c | 2 +- .../silk/float/warped_autocorrelation_FLP.c | 6 +- src/libs/opus/silk/init_decoder.c | 33 +- src/libs/opus/silk/init_encoder.c | 4 + src/libs/opus/silk/main.h | 14 +- src/libs/opus/silk/meson.build | 14 +- src/libs/opus/silk/mips/NSQ_del_dec_mipsr1.h | 6 +- src/libs/opus/silk/mips/macros_mipsr1.h | 6 +- src/libs/opus/silk/structs.h | 28 + .../silk/tests/test_unit_LPC_inv_pred_gain.c | 1 + src/libs/opus/silk/x86/NSQ_del_dec_avx2.c | 15 +- src/libs/opus/silk/x86/NSQ_del_dec_sse4_1.c | 38 +- src/libs/opus/silk/x86/NSQ_sse4_1.c | 38 +- src/libs/opus/silk/x86/VAD_sse4_1.c | 2 +- src/libs/opus/silk/x86/VQ_WMat_EC_sse4_1.c | 2 +- src/libs/opus/silk/x86/main_sse.h | 62 +- src/libs/opus/silk/x86/x86_silk_map.c | 28 +- src/libs/opus/silk_sources.mk | 6 + src/libs/opus/src/analysis.c | 6 +- src/libs/opus/src/mapping_matrix.c | 561 ++ src/libs/opus/src/mapping_matrix.h | 12 + src/libs/opus/src/meson.build | 2 +- src/libs/opus/src/mlp.c | 42 +- src/libs/opus/src/mlp.h | 20 +- src/libs/opus/src/mlp_data.c | 6 +- src/libs/opus/src/opus.c | 10 +- src/libs/opus/src/opus_decoder.c | 495 +- src/libs/opus/src/opus_demo.c | 359 +- src/libs/opus/src/opus_encoder.c | 651 +- src/libs/opus/src/opus_multistream_decoder.c | 4 +- src/libs/opus/src/opus_multistream_encoder.c | 2 +- src/libs/opus/src/opus_private.h | 28 +- src/libs/opus/src/opus_projection_encoder.c | 42 + src/libs/opus/src/repacketizer.c | 145 +- src/libs/opus/test-driver | 19 +- src/libs/opus/tests/meson.build | 13 +- src/libs/opus/tests/test_opus_api.c | 6 +- src/libs/opus/tests/test_opus_common.h | 1 + src/libs/opus/tests/test_opus_decode.c | 18 + src/libs/opus/tests/test_opus_encode.c | 39 +- src/libs/opus/tests/test_opus_padding.c | 4 + src/libs/opus/tests/test_opus_projection.c | 2 +- 155 files changed, 12510 insertions(+), 6714 deletions(-) mode change 100644 => 100755 src/libs/opus/ltmain.sh diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 298e42fc..4775d540 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -15,6 +15,7 @@ option (USE_MUSL "Build with MUSL library" OFF) # PIC code by default set (CMAKE_POSITION_INDEPENDENT_CODE ON) +set (RUNTIME_CPU_CAPABILITY_DETECTION ON) set (LIB_PLATFORM ${CMAKE_CURRENT_SOURCE_DIR}/libs/libraries) include (${LIB_PLATFORM}/platform_libs.cmake) diff --git a/src/engine/media/MT_AmrCodec.cpp b/src/engine/media/MT_AmrCodec.cpp index 0c5efd2a..caf0f598 100644 --- a/src/engine/media/MT_AmrCodec.cpp +++ b/src/engine/media/MT_AmrCodec.cpp @@ -191,8 +191,8 @@ static AmrPayload parseAmrPayload(AmrPayloadInfo& input) } else { - ICELogError(<< "Problem parsing AMR header: octet-aligned is set, available " << input.mPayloadLength - byteOffset - << " bytes but requested " << byteLength); + ICELogError(<< "Problem parsing AMR header: octet-aligned is set, available " << int(input.mPayloadLength - byteOffset) + << " bytes but requested " << (int)byteLength); result.mDiscardPacket = true; continue; } diff --git a/src/libs/ice/ICENetworkHelper.cpp b/src/libs/ice/ICENetworkHelper.cpp index 1e2d3900..e276b4e2 100644 --- a/src/libs/ice/ICENetworkHelper.cpp +++ b/src/libs/ice/ICENetworkHelper.cpp @@ -151,7 +151,7 @@ void NetworkHelper::reload(int networkType) } #else mIPList.clear(); -#if defined(TARGET_OS_IPHONE) +#if TARGET_OS_IPHONE ICELogDebug(<< "Obtaining IPv4 interfaces."); fillIosInterfaceList(AF_INET, networkType, mIPList); ICELogDebug(<< "Obtaining IPv6 interfaces."); diff --git a/src/libs/opus/CMakeLists.txt b/src/libs/opus/CMakeLists.txt index bfbaaa64..eeea6fab 100644 --- a/src/libs/opus/CMakeLists.txt +++ b/src/libs/opus/CMakeLists.txt @@ -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") 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) 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.") 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}) @@ -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) 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) set(OPUS_BUILD_FRAMEWORK_HELP_STR "build Framework bundle for Apple systems.") option(OPUS_BUILD_FRAMEWORK ${OPUS_BUILD_FRAMEWORK_HELP_STR} OFF) add_feature_info(OPUS_BUILD_FRAMEWORK OPUS_BUILD_FRAMEWORK ${OPUS_BUILD_FRAMEWORK_HELP_STR}) 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.") cmake_dependent_option(OPUS_FIXED_POINT_DEBUG ${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.") cmake_dependent_option(OPUS_X86_MAY_HAVE_SSE4_1 ${OPUS_X86_MAY_HAVE_SSE4_1_HELP_STR} - OFF + ON "SSE4_1_SUPPORTED; NOT OPUS_DISABLE_INTRINSICS" OFF) 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.") - cmake_dependent_option(OPUS_X86_MAY_HAVE_AVX - ${OPUS_X86_MAY_HAVE_AVX_HELP_STR} + set(OPUS_X86_MAY_HAVE_AVX2_HELP_STR "does runtime check for AVX FMA AVX2 support.") + cmake_dependent_option(OPUS_X86_MAY_HAVE_AVX2 + ${OPUS_X86_MAY_HAVE_AVX2_HELP_STR} ON - "AVX_SUPPORTED; NOT OPUS_DISABLE_INTRINSICS" + "AVX2_SUPPORTED; NOT OPUS_DISABLE_INTRINSICS" 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 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 cmake_dependent_option(OPUS_X86_PRESUME_SSE ${OPUS_X86_PRESUME_SSE_HELP_STR} - OFF + ON "OPUS_X86_MAY_HAVE_SSE; NOT OPUS_DISABLE_INTRINSICS" OFF) cmake_dependent_option(OPUS_X86_PRESUME_SSE2 ${OPUS_X86_PRESUME_SSE2_HELP_STR} - OFF + ON "OPUS_X86_MAY_HAVE_SSE2; NOT OPUS_DISABLE_INTRINSICS" OFF) else() @@ -220,13 +238,13 @@ if(OPUS_CPU_X86 OR OPUS_CPU_X64) OFF) 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).") - cmake_dependent_option(OPUS_X86_PRESUME_AVX - ${OPUS_X86_PRESUME_AVX_HELP_STR} + set(OPUS_X86_PRESUME_AVX2_HELP_STR "assume target CPU has AVX FMA AVX2 support (override runtime check).") + cmake_dependent_option(OPUS_X86_PRESUME_AVX2 + ${OPUS_X86_PRESUME_AVX2_HELP_STR} OFF - "OPUS_X86_MAY_HAVE_AVX; NOT OPUS_DISABLE_INTRINSICS" + "OPUS_X86_MAY_HAVE_AVX2; NOT OPUS_DISABLE_INTRINSICS" 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() 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) endif() +if(MSVC) + if(OPUS_STATIC_RUNTIME) + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") + else() + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") + endif() +endif() + add_library(opus ${opus_headers} ${opus_sources} ${opus_sources_float} ${Opus_PUBLIC_HEADER}) add_library(Opus::opus ALIAS opus) -set_property(TARGET opus PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") - get_library_version(OPUS_LIBRARY_VERSION OPUS_LIBRARY_VERSION_MAJOR) message(DEBUG "Opus library version: ${OPUS_LIBRARY_VERSION}") @@ -276,6 +300,7 @@ target_include_directories( $ PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/dnn celt silk) @@ -311,6 +336,10 @@ if(OPUS_CHECK_ASM) target_compile_definitions(opus PRIVATE OPUS_CHECK_ASM) endif() +if(NOT OPUS_DNN_FLOAT_DEBUG) + target_compile_definitions(opus PRIVATE DISABLE_DEBUG_FLOAT) +endif() + if(OPUS_VAR_ARRAYS) target_compile_definitions(opus PRIVATE VAR_ARRAYS) elseif(OPUS_USE_ALLOCA) @@ -367,12 +396,33 @@ if(NOT OPUS_ENABLE_FLOAT_API) target_compile_definitions(opus PRIVATE DISABLE_FLOAT_API) 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(((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_SSE4_1 AND NOT OPUS_X86_PRESUME_SSE4_1) OR - (OPUS_X86_MAY_HAVE_AVX AND NOT OPUS_X86_PRESUME_AVX)) AND - RUNTIME_CPU_CAPABILITY_DETECTION) + (OPUS_X86_MAY_HAVE_AVX2 AND NOT OPUS_X86_PRESUME_AVX2))) target_compile_definitions(opus PRIVATE OPUS_HAVE_RTCD) if(NOT MSVC) if(CPU_INFO_BY_ASM_SUPPORTED) @@ -385,6 +435,9 @@ if(NOT OPUS_DISABLE_INTRINSICS) endif() add_sources_group(opus celt ${celt_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() if(SSE1_SUPPORTED) @@ -406,9 +459,12 @@ if(NOT OPUS_DISABLE_INTRINSICS) if(SSE2_SUPPORTED) if(OPUS_X86_MAY_HAVE_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) 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() if(OPUS_X86_PRESUME_SSE2) @@ -423,9 +479,12 @@ if(NOT OPUS_DISABLE_INTRINSICS) if(OPUS_X86_MAY_HAVE_SSE4_1) add_sources_group(opus celt ${celt_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) 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() if(OPUS_FIXED_POINT) @@ -443,22 +502,37 @@ if(NOT OPUS_DISABLE_INTRINSICS) endif() endif() - if(AVX_SUPPORTED) - # mostly placeholder in case of avx intrinsics is added - if(OPUS_X86_MAY_HAVE_AVX) - target_compile_definitions(opus PRIVATE OPUS_X86_MAY_HAVE_AVX) + if(AVX2_SUPPORTED) + if(OPUS_X86_MAY_HAVE_AVX2) + add_sources_group(opus celt ${celt_sources_avx2}) + 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() - if(OPUS_X86_PRESUME_AVX) - target_compile_definitions(opus PRIVATE OPUS_X86_PRESUME_AVX) + if(OPUS_X86_PRESUME_AVX2) + target_compile_definitions(opus PRIVATE OPUS_X86_PRESUME_AVX2) + target_compile_definitions(opus PRIVATE OPUS_X86_PRESUME_SSE4_1) if(NOT MSVC) - target_compile_options(opus PRIVATE -mavx) + target_compile_options(opus PRIVATE -mavx2 -mfma -mavx) endif() endif() endif() if(MSVC) - if(AVX_SUPPORTED AND OPUS_X86_PRESUME_AVX) # on 64 bit and 32 bits - add_definitions(/arch:AVX) + if(AVX2_SUPPORTED AND OPUS_X86_PRESUME_AVX2) # on 64 bit and 32 bits + add_definitions(/arch:AVX2) elseif(OPUS_CPU_X86) # if AVX not supported then set SSE flag if((SSE4_1_SUPPORTED AND OPUS_X86_PRESUME_SSE4_1) OR (SSE2_SUPPORTED AND OPUS_X86_PRESUME_SSE2)) @@ -471,7 +545,7 @@ if(NOT OPUS_DISABLE_INTRINSICS) if(COMPILER_SUPPORT_NEON) if(OPUS_MAY_HAVE_NEON) - if(RUNTIME_CPU_CAPABILITY_DETECTION) + if(TRUE) message(STATUS "OPUS_MAY_HAVE_NEON enabling runtime detection") target_compile_definitions(opus PRIVATE OPUS_HAVE_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 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 target_include_directories(opus PRIVATE silk/fixed) @@ -529,5 +606,138 @@ install(TARGETS opus FRAMEWORK DESTINATION ${CMAKE_INSTALL_PREFIX} 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=$ + -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=$ + -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=$ + -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=$ + -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=$ + -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=$ + -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} + -P "${PROJECT_SOURCE_DIR}/cmake/RunTest.cmake") + endif() +endif() diff --git a/src/libs/opus/COPYING b/src/libs/opus/COPYING index 9c739c34..75711467 100644 --- a/src/libs/opus/COPYING +++ b/src/libs/opus/COPYING @@ -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, 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 modification, are permitted provided that the following conditions diff --git a/src/libs/opus/INSTALL b/src/libs/opus/INSTALL index 8865734f..e82fd21d 100644 --- a/src/libs/opus/INSTALL +++ b/src/libs/opus/INSTALL @@ -1,8 +1,8 @@ Installation Instructions ************************* - Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software -Foundation, Inc. + Copyright (C) 1994-1996, 1999-2002, 2004-2017, 2020-2021 Free +Software Foundation, Inc. Copying and distribution of this file, with or without modification, 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. - 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 files such as 'configure' are involved. Use GNU 'make' instead. diff --git a/src/libs/opus/Makefile.am b/src/libs/opus/Makefile.am index 492fc09d..bb357bba 100644 --- a/src/libs/opus/Makefile.am +++ b/src/libs/opus/Makefile.am @@ -10,12 +10,25 @@ lib_LTLIBRARIES = libopus.la DIST_SUBDIRS = doc 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 lpcnet_sources.mk include silk_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 SILK_SOURCES += $(SILK_SOURCES_FIXED) if HAVE_SSE4_1 @@ -29,6 +42,9 @@ SILK_SOURCES += $(SILK_SOURCES_FLOAT) if HAVE_SSE4_1 SILK_SOURCES += $(SILK_SOURCES_SSE4_1) endif +if HAVE_AVX2 +SILK_SOURCES += $(SILK_SOURCES_FLOAT_AVX2) +endif endif if DISABLE_FLOAT_API @@ -40,15 +56,31 @@ if CPU_X86 if HAVE_RTCD CELT_SOURCES += $(CELT_SOURCES_X86_RTCD) SILK_SOURCES += $(SILK_SOURCES_X86_RTCD) +if ENABLE_DEEP_PLC +LPCNET_SOURCES += $(DNN_SOURCES_X86_RTCD) +endif endif if HAVE_SSE CELT_SOURCES += $(CELT_SOURCES_SSE) endif if HAVE_SSE2 CELT_SOURCES += $(CELT_SOURCES_SSE2) +if ENABLE_DEEP_PLC +LPCNET_SOURCES += $(DNN_SOURCES_SSE2) +endif endif if HAVE_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 @@ -56,6 +88,18 @@ if CPU_ARM if HAVE_RTCD CELT_SOURCES += $(CELT_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 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) include celt_headers.mk +include lpcnet_headers.mk include silk_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_LIBADD = $(NE10_LIBS) $(LIBM) 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 -noinst_HEADERS = $(OPUS_HEAD) $(SILK_HEAD) $(CELT_HEAD) +noinst_HEADERS = $(OPUS_HEAD) $(SILK_HEAD) $(CELT_HEAD) $(LPCNET_HEAD) if EXTRA_PROGRAMS 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 \ tests/test_opus_api \ tests/test_opus_decode \ + tests/test_opus_dred \ tests/test_opus_encode \ + tests/test_opus_extensions \ tests/test_opus_padding \ tests/test_opus_projection \ trivial_example @@ -126,10 +187,14 @@ TESTS = celt/tests/test_unit_cwrs32 \ tests/test_opus_api \ tests/test_opus_decode \ tests/test_opus_encode \ + tests/test_opus_extensions \ tests/test_opus_padding \ tests/test_opus_projection opus_demo_SOURCES = src/opus_demo.c +if ENABLE_LOSSGEN +opus_demo_SOURCES += $(LOSSGEN_SOURCES) +endif 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_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) SILK_OBJ = $(SILK_SOURCES:.c=.lo) +LPCNET_OBJ = $(LPCNET_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_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 tests_test_opus_projection_LDADD += libarmasm.la 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_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 silk_tests_test_unit_LPC_inv_pred_gain_LDADD += libarmasm.la 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_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 celt_tests_test_unit_dft_LDADD += libarmasm.la 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_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 celt_tests_test_unit_mathops_LDADD += libarmasm.la endif 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 celt_tests_test_unit_mdct_LDADD += libarmasm.la endif 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 celt_tests_test_unit_rotation_LDADD += libarmasm.la endif @@ -217,6 +292,32 @@ opus_custom_demo_LDADD = libopus.la $(LIBM) 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 \ opus-uninstalled.pc.in \ opus.m4 \ @@ -230,6 +331,7 @@ EXTRA_DIST = opus.pc.in \ cmake/OpusFunctions.cmake \ cmake/OpusPackageVersion.cmake \ cmake/OpusSources.cmake \ + cmake/README.md \ cmake/RunTest.cmake \ cmake/config.h.cmake.in \ cmake/vla.c \ @@ -237,11 +339,14 @@ EXTRA_DIST = opus.pc.in \ cmake/cpu_info_by_c.c \ meson/get-version.py \ meson/read-sources-list.py \ + meson/README.md \ meson.build \ meson_options.txt \ include/meson.build \ celt/meson.build \ celt/tests/meson.build \ + dnn/meson.build \ + dnn/README.md \ silk/meson.build \ silk/tests/meson.build \ src/meson.build \ @@ -249,21 +354,7 @@ EXTRA_DIST = opus.pc.in \ doc/meson.build \ tests/run_vectors.sh \ celt/arm/arm2gnu.pl \ - 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 + celt/arm/celt_pitch_xcorr_arm.s pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = opus.pc @@ -362,21 +453,37 @@ $(SSE_OBJ): CFLAGS += $(OPUS_X86_SSE_CFLAGS) endif 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) endif if HAVE_SSE4_1 SSE4_1_OBJ = $(CELT_SOURCES_SSE4_1:.c=.lo) \ + $(DNN_SOURCES_SSE4_1:.c=.lo) \ $(SILK_SOURCES_SSE4_1:.c=.lo) \ $(SILK_SOURCES_FIXED_SSE4_1:.c=.lo) $(SSE4_1_OBJ): CFLAGS += $(OPUS_X86_SSE4_1_CFLAGS) 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 ARM_NEON_INTR_OBJ = $(CELT_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) $(ARM_NEON_INTR_OBJ): CFLAGS += \ $(OPUS_ARM_NEON_INTR_CFLAGS) $(NE10_CFLAGS) endif + +if HAVE_ARM_DOTPROD +ARM_DOTPROD_OBJ = $(DNN_SOURCES_DOTPROD:.c=.lo) +$(ARM_DOTPROD_OBJ): CFLAGS += $(ARM_DOTPROD_INTR_CFLAGS) +endif diff --git a/src/libs/opus/Makefile.in b/src/libs/opus/Makefile.in index b9512d64..7bca4a63 100644 --- a/src/libs/opus/Makefile.in +++ b/src/libs/opus/Makefile.in @@ -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@ -# 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 # gives unlimited permission to copy and/or distribute it, @@ -91,23 +91,40 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -@FIXED_POINT_TRUE@am__append_1 = $(SILK_SOURCES_FIXED) -@FIXED_POINT_TRUE@@HAVE_SSE4_1_TRUE@am__append_2 = $(SILK_SOURCES_SSE4_1) $(SILK_SOURCES_FIXED_SSE4_1) -@FIXED_POINT_TRUE@@HAVE_ARM_NEON_INTR_TRUE@am__append_3 = $(SILK_SOURCES_FIXED_ARM_NEON_INTR) -@FIXED_POINT_FALSE@am__append_4 = $(SILK_SOURCES_FLOAT) -@FIXED_POINT_FALSE@@HAVE_SSE4_1_TRUE@am__append_5 = $(SILK_SOURCES_SSE4_1) -@DISABLE_FLOAT_API_FALSE@am__append_6 = $(OPUS_SOURCES_FLOAT) -@CPU_X86_TRUE@@HAVE_RTCD_TRUE@am__append_7 = $(CELT_SOURCES_X86_RTCD) -@CPU_X86_TRUE@@HAVE_RTCD_TRUE@am__append_8 = $(SILK_SOURCES_X86_RTCD) -@CPU_X86_TRUE@@HAVE_SSE_TRUE@am__append_9 = $(CELT_SOURCES_SSE) -@CPU_X86_TRUE@@HAVE_SSE2_TRUE@am__append_10 = $(CELT_SOURCES_SSE2) -@CPU_X86_TRUE@@HAVE_SSE4_1_TRUE@am__append_11 = $(CELT_SOURCES_SSE4_1) -@CPU_ARM_TRUE@@HAVE_RTCD_TRUE@am__append_12 = $(CELT_SOURCES_ARM_RTCD) -@CPU_ARM_TRUE@@HAVE_RTCD_TRUE@am__append_13 = $(SILK_SOURCES_ARM_RTCD) -@CPU_ARM_TRUE@@HAVE_ARM_NEON_INTR_TRUE@am__append_14 = $(CELT_SOURCES_ARM_NEON_INTR) -@CPU_ARM_TRUE@@HAVE_ARM_NEON_INTR_TRUE@am__append_15 = $(SILK_SOURCES_ARM_NEON_INTR) -@CPU_ARM_TRUE@@HAVE_ARM_NE10_TRUE@am__append_16 = $(CELT_SOURCES_ARM_NE10) -@OPUS_ARM_EXTERNAL_ASM_TRUE@am__append_17 = libarmasm.la +@ENABLE_DEEP_PLC_TRUE@am__append_1 = $(DEEP_PLC_SOURCES) +@ENABLE_DRED_TRUE@am__append_2 = $(DRED_SOURCES) +@ENABLE_OSCE_TRUE@am__append_3 = $(OSCE_SOURCES) +@FIXED_POINT_TRUE@am__append_4 = $(SILK_SOURCES_FIXED) +@FIXED_POINT_TRUE@@HAVE_SSE4_1_TRUE@am__append_5 = $(SILK_SOURCES_SSE4_1) $(SILK_SOURCES_FIXED_SSE4_1) +@FIXED_POINT_TRUE@@HAVE_ARM_NEON_INTR_TRUE@am__append_6 = $(SILK_SOURCES_FIXED_ARM_NEON_INTR) +@FIXED_POINT_FALSE@am__append_7 = $(SILK_SOURCES_FLOAT) +@FIXED_POINT_FALSE@@HAVE_SSE4_1_TRUE@am__append_8 = $(SILK_SOURCES_SSE4_1) +@FIXED_POINT_FALSE@@HAVE_AVX2_TRUE@am__append_9 = $(SILK_SOURCES_FLOAT_AVX2) +@DISABLE_FLOAT_API_FALSE@am__append_10 = $(OPUS_SOURCES_FLOAT) +@CPU_X86_TRUE@@HAVE_RTCD_TRUE@am__append_11 = $(CELT_SOURCES_X86_RTCD) +@CPU_X86_TRUE@@HAVE_RTCD_TRUE@am__append_12 = $(SILK_SOURCES_X86_RTCD) +@CPU_X86_TRUE@@ENABLE_DEEP_PLC_TRUE@@HAVE_RTCD_TRUE@am__append_13 = $(DNN_SOURCES_X86_RTCD) +@CPU_X86_TRUE@@HAVE_SSE_TRUE@am__append_14 = $(CELT_SOURCES_SSE) +@CPU_X86_TRUE@@HAVE_SSE2_TRUE@am__append_15 = $(CELT_SOURCES_SSE2) +@CPU_X86_TRUE@@ENABLE_DEEP_PLC_TRUE@@HAVE_SSE2_TRUE@am__append_16 = $(DNN_SOURCES_SSE2) +@CPU_X86_TRUE@@HAVE_SSE4_1_TRUE@am__append_17 = $(CELT_SOURCES_SSE4_1) +@CPU_X86_TRUE@@ENABLE_DEEP_PLC_TRUE@@HAVE_SSE4_1_TRUE@am__append_18 = $(DNN_SOURCES_SSE4_1) +@CPU_X86_TRUE@@HAVE_AVX2_TRUE@am__append_19 = $(SILK_SOURCES_AVX2) +@CPU_X86_TRUE@@HAVE_AVX2_TRUE@am__append_20 = $(CELT_SOURCES_AVX2) +@CPU_X86_TRUE@@ENABLE_DEEP_PLC_TRUE@@HAVE_AVX2_TRUE@am__append_21 = $(DNN_SOURCES_AVX2) +@CPU_ARM_TRUE@@HAVE_RTCD_TRUE@am__append_22 = $(CELT_SOURCES_ARM_RTCD) +@CPU_ARM_TRUE@@HAVE_RTCD_TRUE@am__append_23 = $(SILK_SOURCES_ARM_RTCD) +@CPU_ARM_TRUE@@ENABLE_DEEP_PLC_TRUE@@HAVE_RTCD_TRUE@am__append_24 = $(DNN_SOURCES_ARM_RTCD) +@CPU_ARM_TRUE@@ENABLE_DEEP_PLC_TRUE@@HAVE_ARM_DOTPROD_TRUE@am__append_25 = $(DNN_SOURCES_DOTPROD) +@CPU_ARM_TRUE@@ENABLE_DEEP_PLC_TRUE@@HAVE_ARM_NEON_INTR_TRUE@am__append_26 = $(DNN_SOURCES_NEON) +@CPU_ARM_TRUE@@HAVE_ARM_NEON_INTR_TRUE@am__append_27 = $(CELT_SOURCES_ARM_NEON_INTR) +@CPU_ARM_TRUE@@HAVE_ARM_NEON_INTR_TRUE@am__append_28 = $(SILK_SOURCES_ARM_NEON_INTR) +@CPU_ARM_TRUE@@HAVE_ARM_NE10_TRUE@am__append_29 = $(CELT_SOURCES_ARM_NE10) +@ENABLE_DEEP_PLC_TRUE@am__append_30 = $(DEEP_PLC_HEAD) +@ENABLE_DRED_TRUE@am__append_31 = $(DRED_HEAD) +@ENABLE_OSCE_TRUE@am__append_32 = $(OSCE_HEAD) +@ENABLE_LOSSGEN_TRUE@am__append_33 = $(LOSSGEN_HEAD) +@OPUS_ARM_EXTERNAL_ASM_TRUE@am__append_34 = libarmasm.la @EXTRA_PROGRAMS_TRUE@noinst_PROGRAMS = \ @EXTRA_PROGRAMS_TRUE@ celt/tests/test_unit_cwrs32$(EXEEXT) \ @EXTRA_PROGRAMS_TRUE@ celt/tests/test_unit_dft$(EXEEXT) \ @@ -122,10 +139,13 @@ host_triplet = @host@ @EXTRA_PROGRAMS_TRUE@ silk/tests/test_unit_LPC_inv_pred_gain$(EXEEXT) \ @EXTRA_PROGRAMS_TRUE@ tests/test_opus_api$(EXEEXT) \ @EXTRA_PROGRAMS_TRUE@ tests/test_opus_decode$(EXEEXT) \ +@EXTRA_PROGRAMS_TRUE@ tests/test_opus_dred$(EXEEXT) \ @EXTRA_PROGRAMS_TRUE@ tests/test_opus_encode$(EXEEXT) \ +@EXTRA_PROGRAMS_TRUE@ tests/test_opus_extensions$(EXEEXT) \ @EXTRA_PROGRAMS_TRUE@ tests/test_opus_padding$(EXEEXT) \ @EXTRA_PROGRAMS_TRUE@ tests/test_opus_projection$(EXEEXT) \ -@EXTRA_PROGRAMS_TRUE@ trivial_example$(EXEEXT) $(am__EXEEXT_1) +@EXTRA_PROGRAMS_TRUE@ trivial_example$(EXEEXT) $(am__EXEEXT_1) \ +@EXTRA_PROGRAMS_TRUE@ $(am__EXEEXT_2) $(am__EXEEXT_3) @EXTRA_PROGRAMS_TRUE@TESTS = celt/tests/test_unit_cwrs32$(EXEEXT) \ @EXTRA_PROGRAMS_TRUE@ celt/tests/test_unit_dft$(EXEEXT) \ @EXTRA_PROGRAMS_TRUE@ celt/tests/test_unit_entropy$(EXEEXT) \ @@ -138,16 +158,23 @@ host_triplet = @host@ @EXTRA_PROGRAMS_TRUE@ tests/test_opus_api$(EXEEXT) \ @EXTRA_PROGRAMS_TRUE@ tests/test_opus_decode$(EXEEXT) \ @EXTRA_PROGRAMS_TRUE@ tests/test_opus_encode$(EXEEXT) \ +@EXTRA_PROGRAMS_TRUE@ tests/test_opus_extensions$(EXEEXT) \ @EXTRA_PROGRAMS_TRUE@ tests/test_opus_padding$(EXEEXT) \ -@EXTRA_PROGRAMS_TRUE@ tests/test_opus_projection$(EXEEXT) -@EXTRA_PROGRAMS_TRUE@@OPUS_ARM_EXTERNAL_ASM_TRUE@am__append_18 = libarmasm.la -@EXTRA_PROGRAMS_TRUE@@OPUS_ARM_EXTERNAL_ASM_TRUE@am__append_19 = libarmasm.la -@EXTRA_PROGRAMS_TRUE@@OPUS_ARM_EXTERNAL_ASM_TRUE@am__append_20 = libarmasm.la -@EXTRA_PROGRAMS_TRUE@@OPUS_ARM_EXTERNAL_ASM_TRUE@am__append_21 = libarmasm.la -@EXTRA_PROGRAMS_TRUE@@OPUS_ARM_EXTERNAL_ASM_TRUE@am__append_22 = libarmasm.la -@EXTRA_PROGRAMS_TRUE@@OPUS_ARM_EXTERNAL_ASM_TRUE@am__append_23 = libarmasm.la -@CUSTOM_MODES_TRUE@am__append_24 = include/opus_custom.h -@CUSTOM_MODES_TRUE@@EXTRA_PROGRAMS_TRUE@am__append_25 = opus_custom_demo +@EXTRA_PROGRAMS_TRUE@ tests/test_opus_projection$(EXEEXT) \ +@EXTRA_PROGRAMS_TRUE@ $(am__EXEEXT_4) +@ENABLE_LOSSGEN_TRUE@@EXTRA_PROGRAMS_TRUE@am__append_35 = $(LOSSGEN_SOURCES) +@EXTRA_PROGRAMS_TRUE@@OPUS_ARM_EXTERNAL_ASM_TRUE@am__append_36 = libarmasm.la +@EXTRA_PROGRAMS_TRUE@@OPUS_ARM_EXTERNAL_ASM_TRUE@am__append_37 = libarmasm.la +@EXTRA_PROGRAMS_TRUE@@OPUS_ARM_EXTERNAL_ASM_TRUE@am__append_38 = libarmasm.la +@EXTRA_PROGRAMS_TRUE@@OPUS_ARM_EXTERNAL_ASM_TRUE@am__append_39 = libarmasm.la +@EXTRA_PROGRAMS_TRUE@@OPUS_ARM_EXTERNAL_ASM_TRUE@am__append_40 = libarmasm.la +@EXTRA_PROGRAMS_TRUE@@OPUS_ARM_EXTERNAL_ASM_TRUE@am__append_41 = libarmasm.la +@EXTRA_PROGRAMS_TRUE@@OPUS_ARM_EXTERNAL_ASM_TRUE@am__append_42 = libarmasm.la +@CUSTOM_MODES_TRUE@am__append_43 = include/opus_custom.h +@CUSTOM_MODES_TRUE@@EXTRA_PROGRAMS_TRUE@am__append_44 = opus_custom_demo +@ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@am__append_45 = fargan_demo dump_data dump_weights_blob +@ENABLE_DRED_TRUE@@EXTRA_PROGRAMS_TRUE@am__append_46 = tests/test_opus_dred +@ENABLE_LOSSGEN_TRUE@@EXTRA_PROGRAMS_TRUE@am__append_47 = lossgen_demo subdir = . SUBDIRS = ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -160,7 +187,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/as-gcc-inline-assembly.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ - $(am__configure_deps) $(noinst_HEADERS) \ + $(am__configure_deps) $(am__noinst_HEADERS_DIST) \ $(am__pkginclude_HEADERS_DIST) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno @@ -169,6 +196,10 @@ CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = opus.pc opus-uninstalled.pc celt/arm/armopts.s CONFIG_CLEAN_VPATH_FILES = @CUSTOM_MODES_TRUE@@EXTRA_PROGRAMS_TRUE@am__EXEEXT_1 = opus_custom_demo$(EXEEXT) +@ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@am__EXEEXT_2 = fargan_demo$(EXEEXT) \ +@ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@ dump_data$(EXEEXT) \ +@ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@ dump_weights_blob$(EXEEXT) +@ENABLE_LOSSGEN_TRUE@@EXTRA_PROGRAMS_TRUE@am__EXEEXT_3 = lossgen_demo$(EXEEXT) PROGRAMS = $(noinst_PROGRAMS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ @@ -214,7 +245,7 @@ am__v_lt_1 = @CPU_ARM_TRUE@@OPUS_ARM_EXTERNAL_ASM_TRUE@am_libarmasm_la_rpath = am__DEPENDENCIES_1 = libopus_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__append_17) + $(am__append_34) am__libopus_la_SOURCES_DIST = celt/bands.c celt/celt.c \ celt/celt_encoder.c celt/celt_decoder.c celt/cwrs.c \ celt/entcode.c celt/entdec.c celt/entenc.c celt/kiss_fft.c \ @@ -223,7 +254,7 @@ am__libopus_la_SOURCES_DIST = celt/bands.c celt/celt.c \ celt/vq.c celt/x86/x86cpu.c celt/x86/x86_celt_map.c \ celt/x86/pitch_sse.c celt/x86/pitch_sse2.c celt/x86/vq_sse2.c \ celt/x86/celt_lpc_sse4_1.c celt/x86/pitch_sse4_1.c \ - celt/arm/armcpu.c celt/arm/arm_celt_map.c \ + celt/x86/pitch_avx.c celt/arm/armcpu.c celt/arm/arm_celt_map.c \ celt/arm/celt_neon_intr.c celt/arm/pitch_neon_intr.c \ celt/arm/celt_fft_ne10.c celt/arm/celt_mdct_ne10.c silk/CNG.c \ silk/code_signs.c silk/init_decoder.c silk/decode_core.c \ @@ -297,15 +328,29 @@ am__libopus_la_SOURCES_DIST = celt/bands.c celt/celt.c \ silk/float/pitch_analysis_core_FLP.c \ silk/float/scale_copy_vector_FLP.c \ silk/float/scale_vector_FLP.c silk/float/schur_FLP.c \ - silk/float/sort_FLP.c silk/x86/x86_silk_map.c \ + silk/float/sort_FLP.c silk/float/x86/inner_product_FLP_avx2.c \ + silk/x86/x86_silk_map.c silk/x86/NSQ_del_dec_avx2.c \ silk/arm/arm_silk_map.c silk/arm/biquad_alt_neon_intr.c \ silk/arm/LPC_inv_pred_gain_neon_intr.c \ silk/arm/NSQ_del_dec_neon_intr.c silk/arm/NSQ_neon.c \ - src/opus.c src/opus_decoder.c src/opus_encoder.c \ - src/opus_multistream.c src/opus_multistream_encoder.c \ - src/opus_multistream_decoder.c src/repacketizer.c \ - src/opus_projection_encoder.c src/opus_projection_decoder.c \ - src/mapping_matrix.c src/analysis.c src/mlp.c src/mlp_data.c + dnn/burg.c dnn/freq.c dnn/fargan.c dnn/fargan_data.c \ + dnn/lpcnet_enc.c dnn/lpcnet_plc.c dnn/lpcnet_tables.c \ + dnn/nnet.c dnn/nnet_default.c dnn/plc_data.c \ + dnn/parse_lpcnet_weights.c dnn/pitchdnn.c dnn/pitchdnn_data.c \ + dnn/dred_rdovae_enc.c dnn/dred_rdovae_enc_data.c \ + dnn/dred_rdovae_dec.c dnn/dred_rdovae_dec_data.c \ + dnn/dred_rdovae_stats_data.c dnn/dred_encoder.c \ + dnn/dred_coding.c dnn/dred_decoder.c dnn/osce.c \ + dnn/osce_features.c dnn/nndsp.c dnn/lace_data.c \ + dnn/nolace_data.c dnn/x86/x86_dnn_map.c dnn/x86/nnet_sse2.c \ + dnn/x86/nnet_sse4_1.c dnn/x86/nnet_avx2.c \ + dnn/arm/arm_dnn_map.c dnn/arm/nnet_dotprod.c \ + dnn/arm/nnet_neon.c src/opus.c src/opus_decoder.c \ + src/opus_encoder.c src/extensions.c src/opus_multistream.c \ + src/opus_multistream_encoder.c src/opus_multistream_decoder.c \ + src/repacketizer.c src/opus_projection_encoder.c \ + src/opus_projection_decoder.c src/mapping_matrix.c \ + src/analysis.c src/mlp.c src/mlp_data.c am__objects_2 = celt/x86/x86cpu.lo celt/x86/x86_celt_map.lo @CPU_X86_TRUE@@HAVE_RTCD_TRUE@am__objects_3 = $(am__objects_2) am__objects_4 = celt/x86/pitch_sse.lo @@ -314,23 +359,25 @@ am__objects_6 = celt/x86/pitch_sse2.lo celt/x86/vq_sse2.lo @CPU_X86_TRUE@@HAVE_SSE2_TRUE@am__objects_7 = $(am__objects_6) am__objects_8 = celt/x86/celt_lpc_sse4_1.lo celt/x86/pitch_sse4_1.lo @CPU_X86_TRUE@@HAVE_SSE4_1_TRUE@am__objects_9 = $(am__objects_8) -am__objects_10 = celt/arm/armcpu.lo celt/arm/arm_celt_map.lo -@CPU_ARM_TRUE@@HAVE_RTCD_TRUE@am__objects_11 = $(am__objects_10) -am__objects_12 = celt/arm/celt_neon_intr.lo \ +am__objects_10 = celt/x86/pitch_avx.lo +@CPU_X86_TRUE@@HAVE_AVX2_TRUE@am__objects_11 = $(am__objects_10) +am__objects_12 = celt/arm/armcpu.lo celt/arm/arm_celt_map.lo +@CPU_ARM_TRUE@@HAVE_RTCD_TRUE@am__objects_13 = $(am__objects_12) +am__objects_14 = celt/arm/celt_neon_intr.lo \ celt/arm/pitch_neon_intr.lo -@CPU_ARM_TRUE@@HAVE_ARM_NEON_INTR_TRUE@am__objects_13 = \ -@CPU_ARM_TRUE@@HAVE_ARM_NEON_INTR_TRUE@ $(am__objects_12) -am__objects_14 = celt/arm/celt_fft_ne10.lo celt/arm/celt_mdct_ne10.lo -@CPU_ARM_TRUE@@HAVE_ARM_NE10_TRUE@am__objects_15 = $(am__objects_14) -am__objects_16 = celt/bands.lo celt/celt.lo celt/celt_encoder.lo \ +@CPU_ARM_TRUE@@HAVE_ARM_NEON_INTR_TRUE@am__objects_15 = \ +@CPU_ARM_TRUE@@HAVE_ARM_NEON_INTR_TRUE@ $(am__objects_14) +am__objects_16 = celt/arm/celt_fft_ne10.lo celt/arm/celt_mdct_ne10.lo +@CPU_ARM_TRUE@@HAVE_ARM_NE10_TRUE@am__objects_17 = $(am__objects_16) +am__objects_18 = celt/bands.lo celt/celt.lo celt/celt_encoder.lo \ celt/celt_decoder.lo celt/cwrs.lo celt/entcode.lo \ celt/entdec.lo celt/entenc.lo celt/kiss_fft.lo celt/laplace.lo \ celt/mathops.lo celt/mdct.lo celt/modes.lo celt/pitch.lo \ celt/celt_lpc.lo celt/quant_bands.lo celt/rate.lo celt/vq.lo \ $(am__objects_3) $(am__objects_5) $(am__objects_7) \ $(am__objects_9) $(am__objects_11) $(am__objects_13) \ - $(am__objects_15) -am__objects_17 = silk/fixed/LTP_analysis_filter_FIX.lo \ + $(am__objects_15) $(am__objects_17) +am__objects_19 = silk/fixed/LTP_analysis_filter_FIX.lo \ silk/fixed/LTP_scale_ctrl_FIX.lo silk/fixed/corrMatrix_FIX.lo \ silk/fixed/encode_frame_FIX.lo silk/fixed/find_LPC_FIX.lo \ silk/fixed/find_LTP_FIX.lo silk/fixed/find_pitch_lags_FIX.lo \ @@ -347,19 +394,19 @@ am__objects_17 = silk/fixed/LTP_analysis_filter_FIX.lo \ silk/fixed/pitch_analysis_core_FIX.lo \ silk/fixed/vector_ops_FIX.lo silk/fixed/schur64_FIX.lo \ silk/fixed/schur_FIX.lo -@FIXED_POINT_TRUE@am__objects_18 = $(am__objects_17) -am__objects_19 = silk/x86/NSQ_sse4_1.lo silk/x86/NSQ_del_dec_sse4_1.lo \ +@FIXED_POINT_TRUE@am__objects_20 = $(am__objects_19) +am__objects_21 = silk/x86/NSQ_sse4_1.lo silk/x86/NSQ_del_dec_sse4_1.lo \ silk/x86/VAD_sse4_1.lo silk/x86/VQ_WMat_EC_sse4_1.lo -am__objects_20 = silk/fixed/x86/vector_ops_FIX_sse4_1.lo \ +am__objects_22 = silk/fixed/x86/vector_ops_FIX_sse4_1.lo \ silk/fixed/x86/burg_modified_FIX_sse4_1.lo -@FIXED_POINT_TRUE@@HAVE_SSE4_1_TRUE@am__objects_21 = \ -@FIXED_POINT_TRUE@@HAVE_SSE4_1_TRUE@ $(am__objects_19) \ -@FIXED_POINT_TRUE@@HAVE_SSE4_1_TRUE@ $(am__objects_20) -am__objects_22 = \ +@FIXED_POINT_TRUE@@HAVE_SSE4_1_TRUE@am__objects_23 = \ +@FIXED_POINT_TRUE@@HAVE_SSE4_1_TRUE@ $(am__objects_21) \ +@FIXED_POINT_TRUE@@HAVE_SSE4_1_TRUE@ $(am__objects_22) +am__objects_24 = \ silk/fixed/arm/warped_autocorrelation_FIX_neon_intr.lo -@FIXED_POINT_TRUE@@HAVE_ARM_NEON_INTR_TRUE@am__objects_23 = \ -@FIXED_POINT_TRUE@@HAVE_ARM_NEON_INTR_TRUE@ $(am__objects_22) -am__objects_24 = silk/float/apply_sine_window_FLP.lo \ +@FIXED_POINT_TRUE@@HAVE_ARM_NEON_INTR_TRUE@am__objects_25 = \ +@FIXED_POINT_TRUE@@HAVE_ARM_NEON_INTR_TRUE@ $(am__objects_24) +am__objects_26 = silk/float/apply_sine_window_FLP.lo \ silk/float/corrMatrix_FLP.lo silk/float/encode_frame_FLP.lo \ silk/float/find_LPC_FLP.lo silk/float/find_LTP_FLP.lo \ silk/float/find_pitch_lags_FLP.lo \ @@ -380,19 +427,23 @@ am__objects_24 = silk/float/apply_sine_window_FLP.lo \ silk/float/scale_copy_vector_FLP.lo \ silk/float/scale_vector_FLP.lo silk/float/schur_FLP.lo \ silk/float/sort_FLP.lo -@FIXED_POINT_FALSE@am__objects_25 = $(am__objects_24) -@FIXED_POINT_FALSE@@HAVE_SSE4_1_TRUE@am__objects_26 = \ -@FIXED_POINT_FALSE@@HAVE_SSE4_1_TRUE@ $(am__objects_19) -am__objects_27 = silk/x86/x86_silk_map.lo -@CPU_X86_TRUE@@HAVE_RTCD_TRUE@am__objects_28 = $(am__objects_27) -am__objects_29 = silk/arm/arm_silk_map.lo -@CPU_ARM_TRUE@@HAVE_RTCD_TRUE@am__objects_30 = $(am__objects_29) -am__objects_31 = silk/arm/biquad_alt_neon_intr.lo \ +@FIXED_POINT_FALSE@am__objects_27 = $(am__objects_26) +@FIXED_POINT_FALSE@@HAVE_SSE4_1_TRUE@am__objects_28 = \ +@FIXED_POINT_FALSE@@HAVE_SSE4_1_TRUE@ $(am__objects_21) +am__objects_29 = silk/float/x86/inner_product_FLP_avx2.lo +@FIXED_POINT_FALSE@@HAVE_AVX2_TRUE@am__objects_30 = $(am__objects_29) +am__objects_31 = silk/x86/x86_silk_map.lo +@CPU_X86_TRUE@@HAVE_RTCD_TRUE@am__objects_32 = $(am__objects_31) +am__objects_33 = silk/x86/NSQ_del_dec_avx2.lo +@CPU_X86_TRUE@@HAVE_AVX2_TRUE@am__objects_34 = $(am__objects_33) +am__objects_35 = silk/arm/arm_silk_map.lo +@CPU_ARM_TRUE@@HAVE_RTCD_TRUE@am__objects_36 = $(am__objects_35) +am__objects_37 = silk/arm/biquad_alt_neon_intr.lo \ silk/arm/LPC_inv_pred_gain_neon_intr.lo \ silk/arm/NSQ_del_dec_neon_intr.lo silk/arm/NSQ_neon.lo -@CPU_ARM_TRUE@@HAVE_ARM_NEON_INTR_TRUE@am__objects_32 = \ -@CPU_ARM_TRUE@@HAVE_ARM_NEON_INTR_TRUE@ $(am__objects_31) -am__objects_33 = silk/CNG.lo silk/code_signs.lo silk/init_decoder.lo \ +@CPU_ARM_TRUE@@HAVE_ARM_NEON_INTR_TRUE@am__objects_38 = \ +@CPU_ARM_TRUE@@HAVE_ARM_NEON_INTR_TRUE@ $(am__objects_37) +am__objects_39 = silk/CNG.lo silk/code_signs.lo silk/init_decoder.lo \ silk/decode_core.lo silk/decode_frame.lo \ silk/decode_parameters.lo silk/decode_indices.lo \ silk/decode_pulses.lo silk/decoder_set_fs.lo silk/dec_API.lo \ @@ -426,18 +477,52 @@ am__objects_33 = silk/CNG.lo silk/code_signs.lo silk/init_decoder.lo \ silk/sigm_Q15.lo silk/sort.lo silk/sum_sqr_shift.lo \ silk/stereo_decode_pred.lo silk/stereo_encode_pred.lo \ silk/stereo_find_predictor.lo silk/stereo_quant_pred.lo \ - silk/LPC_fit.lo $(am__objects_18) $(am__objects_21) \ - $(am__objects_23) $(am__objects_25) $(am__objects_26) \ - $(am__objects_28) $(am__objects_30) $(am__objects_32) -am__objects_34 = src/analysis.lo src/mlp.lo src/mlp_data.lo -@DISABLE_FLOAT_API_FALSE@am__objects_35 = $(am__objects_34) -am__objects_36 = src/opus.lo src/opus_decoder.lo src/opus_encoder.lo \ - src/opus_multistream.lo src/opus_multistream_encoder.lo \ + silk/LPC_fit.lo $(am__objects_20) $(am__objects_23) \ + $(am__objects_25) $(am__objects_27) $(am__objects_28) \ + $(am__objects_30) $(am__objects_32) $(am__objects_34) \ + $(am__objects_36) $(am__objects_38) +am__objects_40 = dnn/burg.lo dnn/freq.lo dnn/fargan.lo \ + dnn/fargan_data.lo dnn/lpcnet_enc.lo dnn/lpcnet_plc.lo \ + dnn/lpcnet_tables.lo dnn/nnet.lo dnn/nnet_default.lo \ + dnn/plc_data.lo dnn/parse_lpcnet_weights.lo dnn/pitchdnn.lo \ + dnn/pitchdnn_data.lo +@ENABLE_DEEP_PLC_TRUE@am__objects_41 = $(am__objects_40) +am__objects_42 = dnn/dred_rdovae_enc.lo dnn/dred_rdovae_enc_data.lo \ + dnn/dred_rdovae_dec.lo dnn/dred_rdovae_dec_data.lo \ + dnn/dred_rdovae_stats_data.lo dnn/dred_encoder.lo \ + dnn/dred_coding.lo dnn/dred_decoder.lo +@ENABLE_DRED_TRUE@am__objects_43 = $(am__objects_42) +am__objects_44 = dnn/osce.lo dnn/osce_features.lo dnn/nndsp.lo \ + dnn/lace_data.lo dnn/nolace_data.lo +@ENABLE_OSCE_TRUE@am__objects_45 = $(am__objects_44) +am__objects_46 = dnn/x86/x86_dnn_map.lo +@CPU_X86_TRUE@@ENABLE_DEEP_PLC_TRUE@@HAVE_RTCD_TRUE@am__objects_47 = $(am__objects_46) +am__objects_48 = dnn/x86/nnet_sse2.lo +@CPU_X86_TRUE@@ENABLE_DEEP_PLC_TRUE@@HAVE_SSE2_TRUE@am__objects_49 = $(am__objects_48) +am__objects_50 = dnn/x86/nnet_sse4_1.lo +@CPU_X86_TRUE@@ENABLE_DEEP_PLC_TRUE@@HAVE_SSE4_1_TRUE@am__objects_51 = $(am__objects_50) +am__objects_52 = dnn/x86/nnet_avx2.lo +@CPU_X86_TRUE@@ENABLE_DEEP_PLC_TRUE@@HAVE_AVX2_TRUE@am__objects_53 = $(am__objects_52) +am__objects_54 = dnn/arm/arm_dnn_map.lo +@CPU_ARM_TRUE@@ENABLE_DEEP_PLC_TRUE@@HAVE_RTCD_TRUE@am__objects_55 = $(am__objects_54) +am__objects_56 = dnn/arm/nnet_dotprod.lo +@CPU_ARM_TRUE@@ENABLE_DEEP_PLC_TRUE@@HAVE_ARM_DOTPROD_TRUE@am__objects_57 = $(am__objects_56) +am__objects_58 = dnn/arm/nnet_neon.lo +@CPU_ARM_TRUE@@ENABLE_DEEP_PLC_TRUE@@HAVE_ARM_NEON_INTR_TRUE@am__objects_59 = $(am__objects_58) +am__objects_60 = $(am__objects_41) $(am__objects_43) $(am__objects_45) \ + $(am__objects_47) $(am__objects_49) $(am__objects_51) \ + $(am__objects_53) $(am__objects_55) $(am__objects_57) \ + $(am__objects_59) +am__objects_61 = src/analysis.lo src/mlp.lo src/mlp_data.lo +@DISABLE_FLOAT_API_FALSE@am__objects_62 = $(am__objects_61) +am__objects_63 = src/opus.lo src/opus_decoder.lo src/opus_encoder.lo \ + src/extensions.lo src/opus_multistream.lo \ + src/opus_multistream_encoder.lo \ src/opus_multistream_decoder.lo src/repacketizer.lo \ src/opus_projection_encoder.lo src/opus_projection_decoder.lo \ - src/mapping_matrix.lo $(am__objects_35) -am_libopus_la_OBJECTS = $(am__objects_16) $(am__objects_33) \ - $(am__objects_36) + src/mapping_matrix.lo $(am__objects_62) +am_libopus_la_OBJECTS = $(am__objects_18) $(am__objects_39) \ + $(am__objects_60) $(am__objects_63) libopus_la_OBJECTS = $(am_libopus_la_OBJECTS) libopus_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ @@ -469,18 +554,21 @@ am__DEPENDENCIES_8 = celt/x86/celt_lpc_sse4_1.lo \ celt/x86/pitch_sse4_1.lo @CPU_X86_TRUE@@HAVE_SSE4_1_TRUE@am__DEPENDENCIES_9 = \ @CPU_X86_TRUE@@HAVE_SSE4_1_TRUE@ $(am__DEPENDENCIES_8) -am__DEPENDENCIES_10 = celt/arm/armcpu.lo celt/arm/arm_celt_map.lo -@CPU_ARM_TRUE@@HAVE_RTCD_TRUE@am__DEPENDENCIES_11 = \ -@CPU_ARM_TRUE@@HAVE_RTCD_TRUE@ $(am__DEPENDENCIES_10) -am__DEPENDENCIES_12 = celt/arm/celt_neon_intr.lo \ +am__DEPENDENCIES_10 = celt/x86/pitch_avx.lo +@CPU_X86_TRUE@@HAVE_AVX2_TRUE@am__DEPENDENCIES_11 = \ +@CPU_X86_TRUE@@HAVE_AVX2_TRUE@ $(am__DEPENDENCIES_10) +am__DEPENDENCIES_12 = celt/arm/armcpu.lo celt/arm/arm_celt_map.lo +@CPU_ARM_TRUE@@HAVE_RTCD_TRUE@am__DEPENDENCIES_13 = \ +@CPU_ARM_TRUE@@HAVE_RTCD_TRUE@ $(am__DEPENDENCIES_12) +am__DEPENDENCIES_14 = celt/arm/celt_neon_intr.lo \ celt/arm/pitch_neon_intr.lo -@CPU_ARM_TRUE@@HAVE_ARM_NEON_INTR_TRUE@am__DEPENDENCIES_13 = \ -@CPU_ARM_TRUE@@HAVE_ARM_NEON_INTR_TRUE@ $(am__DEPENDENCIES_12) -am__DEPENDENCIES_14 = celt/arm/celt_fft_ne10.lo \ +@CPU_ARM_TRUE@@HAVE_ARM_NEON_INTR_TRUE@am__DEPENDENCIES_15 = \ +@CPU_ARM_TRUE@@HAVE_ARM_NEON_INTR_TRUE@ $(am__DEPENDENCIES_14) +am__DEPENDENCIES_16 = celt/arm/celt_fft_ne10.lo \ celt/arm/celt_mdct_ne10.lo -@CPU_ARM_TRUE@@HAVE_ARM_NE10_TRUE@am__DEPENDENCIES_15 = \ -@CPU_ARM_TRUE@@HAVE_ARM_NE10_TRUE@ $(am__DEPENDENCIES_14) -am__DEPENDENCIES_16 = celt/bands.lo celt/celt.lo celt/celt_encoder.lo \ +@CPU_ARM_TRUE@@HAVE_ARM_NE10_TRUE@am__DEPENDENCIES_17 = \ +@CPU_ARM_TRUE@@HAVE_ARM_NE10_TRUE@ $(am__DEPENDENCIES_16) +am__DEPENDENCIES_18 = celt/bands.lo celt/celt.lo celt/celt_encoder.lo \ celt/celt_decoder.lo celt/cwrs.lo celt/entcode.lo \ celt/entdec.lo celt/entenc.lo celt/kiss_fft.lo celt/laplace.lo \ celt/mathops.lo celt/mdct.lo celt/modes.lo celt/pitch.lo \ @@ -488,12 +576,47 @@ am__DEPENDENCIES_16 = celt/bands.lo celt/celt.lo celt/celt_encoder.lo \ $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_5) \ $(am__DEPENDENCIES_7) $(am__DEPENDENCIES_9) \ $(am__DEPENDENCIES_11) $(am__DEPENDENCIES_13) \ - $(am__DEPENDENCIES_15) -@EXTRA_PROGRAMS_TRUE@am__DEPENDENCIES_17 = $(am__DEPENDENCIES_16) + $(am__DEPENDENCIES_15) $(am__DEPENDENCIES_17) +@EXTRA_PROGRAMS_TRUE@am__DEPENDENCIES_19 = $(am__DEPENDENCIES_18) +am__DEPENDENCIES_20 = dnn/burg.lo dnn/freq.lo dnn/fargan.lo \ + dnn/fargan_data.lo dnn/lpcnet_enc.lo dnn/lpcnet_plc.lo \ + dnn/lpcnet_tables.lo dnn/nnet.lo dnn/nnet_default.lo \ + dnn/plc_data.lo dnn/parse_lpcnet_weights.lo dnn/pitchdnn.lo \ + dnn/pitchdnn_data.lo +@ENABLE_DEEP_PLC_TRUE@am__DEPENDENCIES_21 = $(am__DEPENDENCIES_20) +am__DEPENDENCIES_22 = dnn/dred_rdovae_enc.lo \ + dnn/dred_rdovae_enc_data.lo dnn/dred_rdovae_dec.lo \ + dnn/dred_rdovae_dec_data.lo dnn/dred_rdovae_stats_data.lo \ + dnn/dred_encoder.lo dnn/dred_coding.lo dnn/dred_decoder.lo +@ENABLE_DRED_TRUE@am__DEPENDENCIES_23 = $(am__DEPENDENCIES_22) +am__DEPENDENCIES_24 = dnn/osce.lo dnn/osce_features.lo dnn/nndsp.lo \ + dnn/lace_data.lo dnn/nolace_data.lo +@ENABLE_OSCE_TRUE@am__DEPENDENCIES_25 = $(am__DEPENDENCIES_24) +am__DEPENDENCIES_26 = dnn/x86/x86_dnn_map.lo +@CPU_X86_TRUE@@ENABLE_DEEP_PLC_TRUE@@HAVE_RTCD_TRUE@am__DEPENDENCIES_27 = $(am__DEPENDENCIES_26) +am__DEPENDENCIES_28 = dnn/x86/nnet_sse2.lo +@CPU_X86_TRUE@@ENABLE_DEEP_PLC_TRUE@@HAVE_SSE2_TRUE@am__DEPENDENCIES_29 = $(am__DEPENDENCIES_28) +am__DEPENDENCIES_30 = dnn/x86/nnet_sse4_1.lo +@CPU_X86_TRUE@@ENABLE_DEEP_PLC_TRUE@@HAVE_SSE4_1_TRUE@am__DEPENDENCIES_31 = $(am__DEPENDENCIES_30) +am__DEPENDENCIES_32 = dnn/x86/nnet_avx2.lo +@CPU_X86_TRUE@@ENABLE_DEEP_PLC_TRUE@@HAVE_AVX2_TRUE@am__DEPENDENCIES_33 = $(am__DEPENDENCIES_32) +am__DEPENDENCIES_34 = dnn/arm/arm_dnn_map.lo +@CPU_ARM_TRUE@@ENABLE_DEEP_PLC_TRUE@@HAVE_RTCD_TRUE@am__DEPENDENCIES_35 = $(am__DEPENDENCIES_34) +am__DEPENDENCIES_36 = dnn/arm/nnet_dotprod.lo +@CPU_ARM_TRUE@@ENABLE_DEEP_PLC_TRUE@@HAVE_ARM_DOTPROD_TRUE@am__DEPENDENCIES_37 = $(am__DEPENDENCIES_36) +am__DEPENDENCIES_38 = dnn/arm/nnet_neon.lo +@CPU_ARM_TRUE@@ENABLE_DEEP_PLC_TRUE@@HAVE_ARM_NEON_INTR_TRUE@am__DEPENDENCIES_39 = $(am__DEPENDENCIES_38) +am__DEPENDENCIES_40 = $(am__DEPENDENCIES_21) $(am__DEPENDENCIES_23) \ + $(am__DEPENDENCIES_25) $(am__DEPENDENCIES_27) \ + $(am__DEPENDENCIES_29) $(am__DEPENDENCIES_31) \ + $(am__DEPENDENCIES_33) $(am__DEPENDENCIES_35) \ + $(am__DEPENDENCIES_37) $(am__DEPENDENCIES_39) +@EXTRA_PROGRAMS_TRUE@am__DEPENDENCIES_41 = $(am__DEPENDENCIES_40) @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_dft_DEPENDENCIES = \ -@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_17) \ +@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_19) \ +@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_41) \ @EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) \ -@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) $(am__append_20) +@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) $(am__append_39) am__celt_tests_test_unit_entropy_SOURCES_DIST = \ celt/tests/test_unit_entropy.c @EXTRA_PROGRAMS_TRUE@am_celt_tests_test_unit_entropy_OBJECTS = \ @@ -517,9 +640,10 @@ am__celt_tests_test_unit_mathops_SOURCES_DIST = \ celt_tests_test_unit_mathops_OBJECTS = \ $(am_celt_tests_test_unit_mathops_OBJECTS) @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_mathops_DEPENDENCIES = \ -@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_17) \ +@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_19) \ +@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_41) \ @EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) \ -@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) $(am__append_21) +@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) $(am__append_40) am__celt_tests_test_unit_mdct_SOURCES_DIST = \ celt/tests/test_unit_mdct.c @EXTRA_PROGRAMS_TRUE@am_celt_tests_test_unit_mdct_OBJECTS = \ @@ -527,9 +651,10 @@ am__celt_tests_test_unit_mdct_SOURCES_DIST = \ celt_tests_test_unit_mdct_OBJECTS = \ $(am_celt_tests_test_unit_mdct_OBJECTS) @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_mdct_DEPENDENCIES = \ -@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_17) \ +@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_19) \ +@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_41) \ @EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) \ -@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) $(am__append_22) +@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) $(am__append_41) am__celt_tests_test_unit_rotation_SOURCES_DIST = \ celt/tests/test_unit_rotation.c @EXTRA_PROGRAMS_TRUE@am_celt_tests_test_unit_rotation_OBJECTS = \ @@ -537,9 +662,10 @@ am__celt_tests_test_unit_rotation_SOURCES_DIST = \ celt_tests_test_unit_rotation_OBJECTS = \ $(am_celt_tests_test_unit_rotation_OBJECTS) @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_rotation_DEPENDENCIES = \ -@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_17) \ +@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_19) \ +@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_41) \ @EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) \ -@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) $(am__append_23) +@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) $(am__append_42) am__celt_tests_test_unit_types_SOURCES_DIST = \ celt/tests/test_unit_types.c @EXTRA_PROGRAMS_TRUE@am_celt_tests_test_unit_types_OBJECTS = \ @@ -548,6 +674,33 @@ celt_tests_test_unit_types_OBJECTS = \ $(am_celt_tests_test_unit_types_OBJECTS) @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_types_DEPENDENCIES = \ @EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) +am__dump_data_SOURCES_DIST = dnn/dump_data.c +@ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@am_dump_data_OBJECTS = dnn/dump_data.$(OBJEXT) +dump_data_OBJECTS = $(am_dump_data_OBJECTS) +@ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@dump_data_DEPENDENCIES = $(am__DEPENDENCIES_41) \ +@ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_19) \ +@ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) +am__dump_weights_blob_SOURCES_DIST = dnn/write_lpcnet_weights.c +@ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@am_dump_weights_blob_OBJECTS = dnn/dump_weights_blob-write_lpcnet_weights.$(OBJEXT) +dump_weights_blob_OBJECTS = $(am_dump_weights_blob_OBJECTS) +@ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@dump_weights_blob_DEPENDENCIES = $(am__DEPENDENCIES_1) +dump_weights_blob_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(dump_weights_blob_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ +am__fargan_demo_SOURCES_DIST = dnn/fargan_demo.c +@ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@am_fargan_demo_OBJECTS = dnn/fargan_demo.$(OBJEXT) +fargan_demo_OBJECTS = $(am_fargan_demo_OBJECTS) +@ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@fargan_demo_DEPENDENCIES = $(am__DEPENDENCIES_41) \ +@ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_19) \ +@ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) +am__lossgen_demo_SOURCES_DIST = dnn/lossgen_demo.c dnn/lossgen.c \ + dnn/lossgen_data.c +am__objects_64 = dnn/lossgen.$(OBJEXT) dnn/lossgen_data.$(OBJEXT) +@ENABLE_LOSSGEN_TRUE@@EXTRA_PROGRAMS_TRUE@am_lossgen_demo_OBJECTS = dnn/lossgen_demo.$(OBJEXT) \ +@ENABLE_LOSSGEN_TRUE@@EXTRA_PROGRAMS_TRUE@ $(am__objects_64) +lossgen_demo_OBJECTS = $(am_lossgen_demo_OBJECTS) +@ENABLE_LOSSGEN_TRUE@@EXTRA_PROGRAMS_TRUE@lossgen_demo_DEPENDENCIES = $(am__DEPENDENCIES_1) am__opus_compare_SOURCES_DIST = src/opus_compare.c @EXTRA_PROGRAMS_TRUE@am_opus_compare_OBJECTS = \ @EXTRA_PROGRAMS_TRUE@ src/opus_compare.$(OBJEXT) @@ -560,8 +713,12 @@ opus_custom_demo_OBJECTS = $(am_opus_custom_demo_OBJECTS) @CUSTOM_MODES_TRUE@@EXTRA_PROGRAMS_TRUE@opus_custom_demo_DEPENDENCIES = \ @CUSTOM_MODES_TRUE@@EXTRA_PROGRAMS_TRUE@ libopus.la \ @CUSTOM_MODES_TRUE@@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) -am__opus_demo_SOURCES_DIST = src/opus_demo.c -@EXTRA_PROGRAMS_TRUE@am_opus_demo_OBJECTS = src/opus_demo.$(OBJEXT) +am__opus_demo_SOURCES_DIST = src/opus_demo.c dnn/lossgen.c \ + dnn/lossgen_data.c +@ENABLE_LOSSGEN_TRUE@@EXTRA_PROGRAMS_TRUE@am__objects_65 = \ +@ENABLE_LOSSGEN_TRUE@@EXTRA_PROGRAMS_TRUE@ $(am__objects_64) +@EXTRA_PROGRAMS_TRUE@am_opus_demo_OBJECTS = src/opus_demo.$(OBJEXT) \ +@EXTRA_PROGRAMS_TRUE@ $(am__objects_65) opus_demo_OBJECTS = $(am_opus_demo_OBJECTS) @EXTRA_PROGRAMS_TRUE@opus_demo_DEPENDENCIES = libopus.la \ @EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) \ @@ -578,7 +735,7 @@ am__silk_tests_test_unit_LPC_inv_pred_gain_SOURCES_DIST = \ @EXTRA_PROGRAMS_TRUE@am_silk_tests_test_unit_LPC_inv_pred_gain_OBJECTS = silk/tests/test_unit_LPC_inv_pred_gain.$(OBJEXT) silk_tests_test_unit_LPC_inv_pred_gain_OBJECTS = \ $(am_silk_tests_test_unit_LPC_inv_pred_gain_OBJECTS) -am__DEPENDENCIES_18 = silk/fixed/LTP_analysis_filter_FIX.lo \ +am__DEPENDENCIES_42 = silk/fixed/LTP_analysis_filter_FIX.lo \ silk/fixed/LTP_scale_ctrl_FIX.lo silk/fixed/corrMatrix_FIX.lo \ silk/fixed/encode_frame_FIX.lo silk/fixed/find_LPC_FIX.lo \ silk/fixed/find_LTP_FIX.lo silk/fixed/find_pitch_lags_FIX.lo \ @@ -595,19 +752,19 @@ am__DEPENDENCIES_18 = silk/fixed/LTP_analysis_filter_FIX.lo \ silk/fixed/pitch_analysis_core_FIX.lo \ silk/fixed/vector_ops_FIX.lo silk/fixed/schur64_FIX.lo \ silk/fixed/schur_FIX.lo -@FIXED_POINT_TRUE@am__DEPENDENCIES_19 = $(am__DEPENDENCIES_18) -am__DEPENDENCIES_20 = silk/x86/NSQ_sse4_1.lo \ +@FIXED_POINT_TRUE@am__DEPENDENCIES_43 = $(am__DEPENDENCIES_42) +am__DEPENDENCIES_44 = silk/x86/NSQ_sse4_1.lo \ silk/x86/NSQ_del_dec_sse4_1.lo silk/x86/VAD_sse4_1.lo \ silk/x86/VQ_WMat_EC_sse4_1.lo -am__DEPENDENCIES_21 = silk/fixed/x86/vector_ops_FIX_sse4_1.lo \ +am__DEPENDENCIES_45 = silk/fixed/x86/vector_ops_FIX_sse4_1.lo \ silk/fixed/x86/burg_modified_FIX_sse4_1.lo -@FIXED_POINT_TRUE@@HAVE_SSE4_1_TRUE@am__DEPENDENCIES_22 = \ -@FIXED_POINT_TRUE@@HAVE_SSE4_1_TRUE@ $(am__DEPENDENCIES_20) \ -@FIXED_POINT_TRUE@@HAVE_SSE4_1_TRUE@ $(am__DEPENDENCIES_21) -am__DEPENDENCIES_23 = \ +@FIXED_POINT_TRUE@@HAVE_SSE4_1_TRUE@am__DEPENDENCIES_46 = \ +@FIXED_POINT_TRUE@@HAVE_SSE4_1_TRUE@ $(am__DEPENDENCIES_44) \ +@FIXED_POINT_TRUE@@HAVE_SSE4_1_TRUE@ $(am__DEPENDENCIES_45) +am__DEPENDENCIES_47 = \ silk/fixed/arm/warped_autocorrelation_FIX_neon_intr.lo -@FIXED_POINT_TRUE@@HAVE_ARM_NEON_INTR_TRUE@am__DEPENDENCIES_24 = $(am__DEPENDENCIES_23) -am__DEPENDENCIES_25 = silk/float/apply_sine_window_FLP.lo \ +@FIXED_POINT_TRUE@@HAVE_ARM_NEON_INTR_TRUE@am__DEPENDENCIES_48 = $(am__DEPENDENCIES_47) +am__DEPENDENCIES_49 = silk/float/apply_sine_window_FLP.lo \ silk/float/corrMatrix_FLP.lo silk/float/encode_frame_FLP.lo \ silk/float/find_LPC_FLP.lo silk/float/find_LTP_FLP.lo \ silk/float/find_pitch_lags_FLP.lo \ @@ -628,21 +785,27 @@ am__DEPENDENCIES_25 = silk/float/apply_sine_window_FLP.lo \ silk/float/scale_copy_vector_FLP.lo \ silk/float/scale_vector_FLP.lo silk/float/schur_FLP.lo \ silk/float/sort_FLP.lo -@FIXED_POINT_FALSE@am__DEPENDENCIES_26 = $(am__DEPENDENCIES_25) -@FIXED_POINT_FALSE@@HAVE_SSE4_1_TRUE@am__DEPENDENCIES_27 = \ -@FIXED_POINT_FALSE@@HAVE_SSE4_1_TRUE@ $(am__DEPENDENCIES_20) -am__DEPENDENCIES_28 = silk/x86/x86_silk_map.lo -@CPU_X86_TRUE@@HAVE_RTCD_TRUE@am__DEPENDENCIES_29 = \ -@CPU_X86_TRUE@@HAVE_RTCD_TRUE@ $(am__DEPENDENCIES_28) -am__DEPENDENCIES_30 = silk/arm/arm_silk_map.lo -@CPU_ARM_TRUE@@HAVE_RTCD_TRUE@am__DEPENDENCIES_31 = \ -@CPU_ARM_TRUE@@HAVE_RTCD_TRUE@ $(am__DEPENDENCIES_30) -am__DEPENDENCIES_32 = silk/arm/biquad_alt_neon_intr.lo \ +@FIXED_POINT_FALSE@am__DEPENDENCIES_50 = $(am__DEPENDENCIES_49) +@FIXED_POINT_FALSE@@HAVE_SSE4_1_TRUE@am__DEPENDENCIES_51 = \ +@FIXED_POINT_FALSE@@HAVE_SSE4_1_TRUE@ $(am__DEPENDENCIES_44) +am__DEPENDENCIES_52 = silk/float/x86/inner_product_FLP_avx2.lo +@FIXED_POINT_FALSE@@HAVE_AVX2_TRUE@am__DEPENDENCIES_53 = \ +@FIXED_POINT_FALSE@@HAVE_AVX2_TRUE@ $(am__DEPENDENCIES_52) +am__DEPENDENCIES_54 = silk/x86/x86_silk_map.lo +@CPU_X86_TRUE@@HAVE_RTCD_TRUE@am__DEPENDENCIES_55 = \ +@CPU_X86_TRUE@@HAVE_RTCD_TRUE@ $(am__DEPENDENCIES_54) +am__DEPENDENCIES_56 = silk/x86/NSQ_del_dec_avx2.lo +@CPU_X86_TRUE@@HAVE_AVX2_TRUE@am__DEPENDENCIES_57 = \ +@CPU_X86_TRUE@@HAVE_AVX2_TRUE@ $(am__DEPENDENCIES_56) +am__DEPENDENCIES_58 = silk/arm/arm_silk_map.lo +@CPU_ARM_TRUE@@HAVE_RTCD_TRUE@am__DEPENDENCIES_59 = \ +@CPU_ARM_TRUE@@HAVE_RTCD_TRUE@ $(am__DEPENDENCIES_58) +am__DEPENDENCIES_60 = silk/arm/biquad_alt_neon_intr.lo \ silk/arm/LPC_inv_pred_gain_neon_intr.lo \ silk/arm/NSQ_del_dec_neon_intr.lo silk/arm/NSQ_neon.lo -@CPU_ARM_TRUE@@HAVE_ARM_NEON_INTR_TRUE@am__DEPENDENCIES_33 = \ -@CPU_ARM_TRUE@@HAVE_ARM_NEON_INTR_TRUE@ $(am__DEPENDENCIES_32) -am__DEPENDENCIES_34 = silk/CNG.lo silk/code_signs.lo \ +@CPU_ARM_TRUE@@HAVE_ARM_NEON_INTR_TRUE@am__DEPENDENCIES_61 = \ +@CPU_ARM_TRUE@@HAVE_ARM_NEON_INTR_TRUE@ $(am__DEPENDENCIES_60) +am__DEPENDENCIES_62 = silk/CNG.lo silk/code_signs.lo \ silk/init_decoder.lo silk/decode_core.lo silk/decode_frame.lo \ silk/decode_parameters.lo silk/decode_indices.lo \ silk/decode_pulses.lo silk/decoder_set_fs.lo silk/dec_API.lo \ @@ -676,16 +839,18 @@ am__DEPENDENCIES_34 = silk/CNG.lo silk/code_signs.lo \ silk/sigm_Q15.lo silk/sort.lo silk/sum_sqr_shift.lo \ silk/stereo_decode_pred.lo silk/stereo_encode_pred.lo \ silk/stereo_find_predictor.lo silk/stereo_quant_pred.lo \ - silk/LPC_fit.lo $(am__DEPENDENCIES_19) $(am__DEPENDENCIES_22) \ - $(am__DEPENDENCIES_24) $(am__DEPENDENCIES_26) \ - $(am__DEPENDENCIES_27) $(am__DEPENDENCIES_29) \ - $(am__DEPENDENCIES_31) $(am__DEPENDENCIES_33) -@EXTRA_PROGRAMS_TRUE@am__DEPENDENCIES_35 = $(am__DEPENDENCIES_34) + silk/LPC_fit.lo $(am__DEPENDENCIES_43) $(am__DEPENDENCIES_46) \ + $(am__DEPENDENCIES_48) $(am__DEPENDENCIES_50) \ + $(am__DEPENDENCIES_51) $(am__DEPENDENCIES_53) \ + $(am__DEPENDENCIES_55) $(am__DEPENDENCIES_57) \ + $(am__DEPENDENCIES_59) $(am__DEPENDENCIES_61) +@EXTRA_PROGRAMS_TRUE@am__DEPENDENCIES_63 = $(am__DEPENDENCIES_62) @EXTRA_PROGRAMS_TRUE@silk_tests_test_unit_LPC_inv_pred_gain_DEPENDENCIES = \ -@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_35) \ -@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_17) \ +@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_63) \ +@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_41) \ +@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_19) \ @EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) \ -@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) $(am__append_19) +@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) $(am__append_38) am__tests_test_opus_api_SOURCES_DIST = tests/test_opus_api.c \ tests/test_opus_common.h @EXTRA_PROGRAMS_TRUE@am_tests_test_opus_api_OBJECTS = \ @@ -702,6 +867,14 @@ tests_test_opus_decode_OBJECTS = $(am_tests_test_opus_decode_OBJECTS) @EXTRA_PROGRAMS_TRUE@tests_test_opus_decode_DEPENDENCIES = libopus.la \ @EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) \ @EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) +am__tests_test_opus_dred_SOURCES_DIST = tests/test_opus_dred.c \ + tests/test_opus_common.h +@EXTRA_PROGRAMS_TRUE@am_tests_test_opus_dred_OBJECTS = \ +@EXTRA_PROGRAMS_TRUE@ tests/test_opus_dred.$(OBJEXT) +tests_test_opus_dred_OBJECTS = $(am_tests_test_opus_dred_OBJECTS) +@EXTRA_PROGRAMS_TRUE@tests_test_opus_dred_DEPENDENCIES = libopus.la \ +@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) \ +@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) am__tests_test_opus_encode_SOURCES_DIST = tests/test_opus_encode.c \ tests/opus_encode_regressions.c tests/test_opus_common.h @EXTRA_PROGRAMS_TRUE@am_tests_test_opus_encode_OBJECTS = \ @@ -711,6 +884,28 @@ tests_test_opus_encode_OBJECTS = $(am_tests_test_opus_encode_OBJECTS) @EXTRA_PROGRAMS_TRUE@tests_test_opus_encode_DEPENDENCIES = libopus.la \ @EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) \ @EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) +am__tests_test_opus_extensions_SOURCES_DIST = \ + tests/test_opus_extensions.c tests/test_opus_common.h +@EXTRA_PROGRAMS_TRUE@am_tests_test_opus_extensions_OBJECTS = \ +@EXTRA_PROGRAMS_TRUE@ tests/test_opus_extensions.$(OBJEXT) +tests_test_opus_extensions_OBJECTS = \ + $(am_tests_test_opus_extensions_OBJECTS) +am__DEPENDENCIES_64 = src/analysis.lo src/mlp.lo src/mlp_data.lo +@DISABLE_FLOAT_API_FALSE@am__DEPENDENCIES_65 = $(am__DEPENDENCIES_64) +am__DEPENDENCIES_66 = src/opus.lo src/opus_decoder.lo \ + src/opus_encoder.lo src/extensions.lo src/opus_multistream.lo \ + src/opus_multistream_encoder.lo \ + src/opus_multistream_decoder.lo src/repacketizer.lo \ + src/opus_projection_encoder.lo src/opus_projection_decoder.lo \ + src/mapping_matrix.lo $(am__DEPENDENCIES_65) +@EXTRA_PROGRAMS_TRUE@am__DEPENDENCIES_67 = $(am__DEPENDENCIES_66) +@EXTRA_PROGRAMS_TRUE@tests_test_opus_extensions_DEPENDENCIES = \ +@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_67) \ +@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_63) \ +@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_41) \ +@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_19) \ +@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) \ +@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) $(am__append_36) am__tests_test_opus_padding_SOURCES_DIST = tests/test_opus_padding.c \ tests/test_opus_common.h @EXTRA_PROGRAMS_TRUE@am_tests_test_opus_padding_OBJECTS = \ @@ -726,21 +921,13 @@ am__tests_test_opus_projection_SOURCES_DIST = \ @EXTRA_PROGRAMS_TRUE@ tests/test_opus_projection.$(OBJEXT) tests_test_opus_projection_OBJECTS = \ $(am_tests_test_opus_projection_OBJECTS) -am__DEPENDENCIES_36 = src/analysis.lo src/mlp.lo src/mlp_data.lo -@DISABLE_FLOAT_API_FALSE@am__DEPENDENCIES_37 = $(am__DEPENDENCIES_36) -am__DEPENDENCIES_38 = src/opus.lo src/opus_decoder.lo \ - src/opus_encoder.lo src/opus_multistream.lo \ - src/opus_multistream_encoder.lo \ - src/opus_multistream_decoder.lo src/repacketizer.lo \ - src/opus_projection_encoder.lo src/opus_projection_decoder.lo \ - src/mapping_matrix.lo $(am__DEPENDENCIES_37) -@EXTRA_PROGRAMS_TRUE@am__DEPENDENCIES_39 = $(am__DEPENDENCIES_38) @EXTRA_PROGRAMS_TRUE@tests_test_opus_projection_DEPENDENCIES = \ -@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_39) \ -@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_35) \ -@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_17) \ +@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_67) \ +@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_63) \ +@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_41) \ +@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_19) \ @EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) \ -@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) $(am__append_18) +@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) $(am__append_37) am__trivial_example_SOURCES_DIST = doc/trivial_example.c @EXTRA_PROGRAMS_TRUE@am_trivial_example_OBJECTS = \ @EXTRA_PROGRAMS_TRUE@ doc/trivial_example.$(OBJEXT) @@ -788,14 +975,42 @@ am__depfiles_remade = celt/$(DEPDIR)/bands.Plo celt/$(DEPDIR)/celt.Plo \ celt/tests/$(DEPDIR)/test_unit_rotation.Po \ celt/tests/$(DEPDIR)/test_unit_types.Po \ celt/x86/$(DEPDIR)/celt_lpc_sse4_1.Plo \ + celt/x86/$(DEPDIR)/pitch_avx.Plo \ celt/x86/$(DEPDIR)/pitch_sse.Plo \ celt/x86/$(DEPDIR)/pitch_sse2.Plo \ celt/x86/$(DEPDIR)/pitch_sse4_1.Plo \ celt/x86/$(DEPDIR)/vq_sse2.Plo \ celt/x86/$(DEPDIR)/x86_celt_map.Plo \ - celt/x86/$(DEPDIR)/x86cpu.Plo doc/$(DEPDIR)/trivial_example.Po \ - silk/$(DEPDIR)/A2NLSF.Plo silk/$(DEPDIR)/CNG.Plo \ - silk/$(DEPDIR)/HP_variable_cutoff.Plo \ + celt/x86/$(DEPDIR)/x86cpu.Plo dnn/$(DEPDIR)/burg.Plo \ + dnn/$(DEPDIR)/dred_coding.Plo dnn/$(DEPDIR)/dred_decoder.Plo \ + dnn/$(DEPDIR)/dred_encoder.Plo \ + dnn/$(DEPDIR)/dred_rdovae_dec.Plo \ + dnn/$(DEPDIR)/dred_rdovae_dec_data.Plo \ + dnn/$(DEPDIR)/dred_rdovae_enc.Plo \ + dnn/$(DEPDIR)/dred_rdovae_enc_data.Plo \ + dnn/$(DEPDIR)/dred_rdovae_stats_data.Plo \ + dnn/$(DEPDIR)/dump_data.Po \ + dnn/$(DEPDIR)/dump_weights_blob-write_lpcnet_weights.Po \ + dnn/$(DEPDIR)/fargan.Plo dnn/$(DEPDIR)/fargan_data.Plo \ + dnn/$(DEPDIR)/fargan_demo.Po dnn/$(DEPDIR)/freq.Plo \ + dnn/$(DEPDIR)/lace_data.Plo dnn/$(DEPDIR)/lossgen.Po \ + dnn/$(DEPDIR)/lossgen_data.Po dnn/$(DEPDIR)/lossgen_demo.Po \ + dnn/$(DEPDIR)/lpcnet_enc.Plo dnn/$(DEPDIR)/lpcnet_plc.Plo \ + dnn/$(DEPDIR)/lpcnet_tables.Plo dnn/$(DEPDIR)/nndsp.Plo \ + dnn/$(DEPDIR)/nnet.Plo dnn/$(DEPDIR)/nnet_default.Plo \ + dnn/$(DEPDIR)/nolace_data.Plo dnn/$(DEPDIR)/osce.Plo \ + dnn/$(DEPDIR)/osce_features.Plo \ + dnn/$(DEPDIR)/parse_lpcnet_weights.Plo \ + dnn/$(DEPDIR)/pitchdnn.Plo dnn/$(DEPDIR)/pitchdnn_data.Plo \ + dnn/$(DEPDIR)/plc_data.Plo dnn/arm/$(DEPDIR)/arm_dnn_map.Plo \ + dnn/arm/$(DEPDIR)/nnet_dotprod.Plo \ + dnn/arm/$(DEPDIR)/nnet_neon.Plo \ + dnn/x86/$(DEPDIR)/nnet_avx2.Plo \ + dnn/x86/$(DEPDIR)/nnet_sse2.Plo \ + dnn/x86/$(DEPDIR)/nnet_sse4_1.Plo \ + dnn/x86/$(DEPDIR)/x86_dnn_map.Plo \ + doc/$(DEPDIR)/trivial_example.Po silk/$(DEPDIR)/A2NLSF.Plo \ + silk/$(DEPDIR)/CNG.Plo silk/$(DEPDIR)/HP_variable_cutoff.Plo \ silk/$(DEPDIR)/LPC_analysis_filter.Plo \ silk/$(DEPDIR)/LPC_fit.Plo \ silk/$(DEPDIR)/LPC_inv_pred_gain.Plo \ @@ -913,16 +1128,19 @@ am__depfiles_remade = celt/$(DEPDIR)/bands.Plo celt/$(DEPDIR)/celt.Plo \ silk/float/$(DEPDIR)/sort_FLP.Plo \ silk/float/$(DEPDIR)/warped_autocorrelation_FLP.Plo \ silk/float/$(DEPDIR)/wrappers_FLP.Plo \ + silk/float/x86/$(DEPDIR)/inner_product_FLP_avx2.Plo \ silk/tests/$(DEPDIR)/test_unit_LPC_inv_pred_gain.Po \ + silk/x86/$(DEPDIR)/NSQ_del_dec_avx2.Plo \ silk/x86/$(DEPDIR)/NSQ_del_dec_sse4_1.Plo \ silk/x86/$(DEPDIR)/NSQ_sse4_1.Plo \ silk/x86/$(DEPDIR)/VAD_sse4_1.Plo \ silk/x86/$(DEPDIR)/VQ_WMat_EC_sse4_1.Plo \ silk/x86/$(DEPDIR)/x86_silk_map.Plo src/$(DEPDIR)/analysis.Plo \ - src/$(DEPDIR)/mapping_matrix.Plo src/$(DEPDIR)/mlp.Plo \ - src/$(DEPDIR)/mlp_data.Plo src/$(DEPDIR)/opus.Plo \ - src/$(DEPDIR)/opus_compare.Po src/$(DEPDIR)/opus_decoder.Plo \ - src/$(DEPDIR)/opus_demo.Po src/$(DEPDIR)/opus_encoder.Plo \ + src/$(DEPDIR)/extensions.Plo src/$(DEPDIR)/mapping_matrix.Plo \ + src/$(DEPDIR)/mlp.Plo src/$(DEPDIR)/mlp_data.Plo \ + src/$(DEPDIR)/opus.Plo src/$(DEPDIR)/opus_compare.Po \ + src/$(DEPDIR)/opus_decoder.Plo src/$(DEPDIR)/opus_demo.Po \ + src/$(DEPDIR)/opus_encoder.Plo \ src/$(DEPDIR)/opus_multistream.Plo \ src/$(DEPDIR)/opus_multistream_decoder.Plo \ src/$(DEPDIR)/opus_multistream_encoder.Plo \ @@ -933,7 +1151,9 @@ am__depfiles_remade = celt/$(DEPDIR)/bands.Plo celt/$(DEPDIR)/celt.Plo \ tests/$(DEPDIR)/opus_encode_regressions.Po \ tests/$(DEPDIR)/test_opus_api.Po \ tests/$(DEPDIR)/test_opus_decode.Po \ + tests/$(DEPDIR)/test_opus_dred.Po \ tests/$(DEPDIR)/test_opus_encode.Po \ + tests/$(DEPDIR)/test_opus_extensions.Po \ tests/$(DEPDIR)/test_opus_padding.Po \ tests/$(DEPDIR)/test_opus_projection.Po am__mv = mv -f @@ -973,13 +1193,17 @@ SOURCES = $(libarmasm_la_SOURCES) $(libopus_la_SOURCES) \ $(celt_tests_test_unit_mathops_SOURCES) \ $(celt_tests_test_unit_mdct_SOURCES) \ $(celt_tests_test_unit_rotation_SOURCES) \ - $(celt_tests_test_unit_types_SOURCES) $(opus_compare_SOURCES) \ + $(celt_tests_test_unit_types_SOURCES) $(dump_data_SOURCES) \ + $(dump_weights_blob_SOURCES) $(fargan_demo_SOURCES) \ + $(lossgen_demo_SOURCES) $(opus_compare_SOURCES) \ $(opus_custom_demo_SOURCES) $(opus_demo_SOURCES) \ $(repacketizer_demo_SOURCES) \ $(silk_tests_test_unit_LPC_inv_pred_gain_SOURCES) \ $(tests_test_opus_api_SOURCES) \ $(tests_test_opus_decode_SOURCES) \ + $(tests_test_opus_dred_SOURCES) \ $(tests_test_opus_encode_SOURCES) \ + $(tests_test_opus_extensions_SOURCES) \ $(tests_test_opus_padding_SOURCES) \ $(tests_test_opus_projection_SOURCES) \ $(trivial_example_SOURCES) @@ -993,6 +1217,10 @@ DIST_SOURCES = $(am__libarmasm_la_SOURCES_DIST) \ $(am__celt_tests_test_unit_mdct_SOURCES_DIST) \ $(am__celt_tests_test_unit_rotation_SOURCES_DIST) \ $(am__celt_tests_test_unit_types_SOURCES_DIST) \ + $(am__dump_data_SOURCES_DIST) \ + $(am__dump_weights_blob_SOURCES_DIST) \ + $(am__fargan_demo_SOURCES_DIST) \ + $(am__lossgen_demo_SOURCES_DIST) \ $(am__opus_compare_SOURCES_DIST) \ $(am__opus_custom_demo_SOURCES_DIST) \ $(am__opus_demo_SOURCES_DIST) \ @@ -1000,7 +1228,9 @@ DIST_SOURCES = $(am__libarmasm_la_SOURCES_DIST) \ $(am__silk_tests_test_unit_LPC_inv_pred_gain_SOURCES_DIST) \ $(am__tests_test_opus_api_SOURCES_DIST) \ $(am__tests_test_opus_decode_SOURCES_DIST) \ + $(am__tests_test_opus_dred_SOURCES_DIST) \ $(am__tests_test_opus_encode_SOURCES_DIST) \ + $(am__tests_test_opus_extensions_SOURCES_DIST) \ $(am__tests_test_opus_padding_SOURCES_DIST) \ $(am__tests_test_opus_projection_SOURCES_DIST) \ $(am__trivial_example_SOURCES_DIST) @@ -1018,6 +1248,61 @@ am__can_run_installinfo = \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(m4data_DATA) $(pkgconfig_DATA) +am__noinst_HEADERS_DIST = include/opus.h include/opus_multistream.h \ + include/opus_projection.h src/opus_private.h src/analysis.h \ + src/mapping_matrix.h src/mlp.h silk/debug.h silk/control.h \ + silk/errors.h silk/API.h silk/typedef.h silk/define.h \ + silk/main.h silk/x86/main_sse.h silk/PLC.h silk/structs.h \ + silk/tables.h silk/tuning_parameters.h silk/Inlines.h \ + silk/MacroCount.h silk/MacroDebug.h silk/macros.h silk/NSQ.h \ + silk/pitch_est_defines.h silk/resampler_private.h \ + silk/resampler_rom.h silk/resampler_structs.h \ + silk/SigProc_FIX.h silk/x86/SigProc_FIX_sse.h \ + silk/arm/biquad_alt_arm.h silk/arm/LPC_inv_pred_gain_arm.h \ + silk/arm/macros_armv4.h silk/arm/macros_armv5e.h \ + silk/arm/macros_arm64.h silk/arm/SigProc_FIX_armv4.h \ + silk/arm/SigProc_FIX_armv5e.h silk/arm/NSQ_del_dec_arm.h \ + silk/arm/NSQ_neon.h silk/fixed/main_FIX.h \ + silk/fixed/structs_FIX.h \ + silk/fixed/arm/warped_autocorrelation_FIX_arm.h \ + silk/fixed/mips/noise_shape_analysis_FIX_mipsr1.h \ + silk/fixed/mips/warped_autocorrelation_FIX_mipsr1.h \ + silk/float/main_FLP.h silk/float/structs_FLP.h \ + silk/float/SigProc_FLP.h silk/mips/macros_mipsr1.h \ + silk/mips/NSQ_del_dec_mipsr1.h silk/mips/sigproc_fix_mipsr1.h \ + celt/arch.h celt/bands.h celt/celt.h celt/cpu_support.h \ + include/opus_types.h include/opus_defines.h \ + include/opus_custom.h celt/cwrs.h celt/ecintrin.h \ + celt/entcode.h celt/entdec.h celt/entenc.h celt/fixed_debug.h \ + celt/fixed_generic.h celt/float_cast.h celt/_kiss_fft_guts.h \ + celt/kiss_fft.h celt/laplace.h celt/mathops.h celt/mdct.h \ + celt/mfrngcod.h celt/modes.h celt/os_support.h celt/pitch.h \ + celt/celt_lpc.h celt/x86/celt_lpc_sse.h celt/quant_bands.h \ + celt/rate.h celt/stack_alloc.h celt/vq.h \ + celt/static_modes_float.h celt/static_modes_fixed.h \ + celt/static_modes_float_arm_ne10.h \ + celt/static_modes_fixed_arm_ne10.h celt/arm/armcpu.h \ + celt/arm/fixed_armv4.h celt/arm/fixed_armv5e.h \ + celt/arm/fixed_arm64.h celt/arm/kiss_fft_armv4.h \ + celt/arm/kiss_fft_armv5e.h celt/arm/pitch_arm.h \ + celt/arm/fft_arm.h celt/arm/mdct_arm.h celt/mips/celt_mipsr1.h \ + celt/mips/fixed_generic_mipsr1.h celt/mips/kiss_fft_mipsr1.h \ + celt/mips/mdct_mipsr1.h celt/mips/pitch_mipsr1.h \ + celt/mips/vq_mipsr1.h celt/x86/pitch_sse.h celt/x86/vq_sse.h \ + celt/x86/x86_arch_macros.h celt/x86/x86cpu.h dnn/lpcnet.h \ + dnn/burg.h dnn/common.h dnn/freq.h dnn/fargan.h \ + dnn/fargan_data.h dnn/lpcnet_private.h dnn/nnet.h \ + dnn/plc_data.h dnn/vec.h dnn/vec_avx.h dnn/vec_neon.h \ + dnn/pitchdnn.h dnn/pitchdnn_data.h dnn/x86/dnn_x86.h \ + dnn/nnet_arch.h dnn/arm/dnn_arm.h dnn/dred_coding.h \ + dnn/dred_config.h dnn/dred_decoder.h dnn/dred_encoder.h \ + dnn/dred_rdovae.h dnn/dred_rdovae_constants.h \ + dnn/dred_rdovae_enc.h dnn/dred_rdovae_enc_data.h \ + dnn/dred_rdovae_dec.h dnn/dred_rdovae_dec_data.h \ + dnn/dred_rdovae_stats_data.h dnn/osce.h dnn/osce_config.h \ + dnn/osce_structs.h dnn/osce_features.h dnn/nndsp.h \ + dnn/lace_data.h dnn/nolace_data.h dnn/lossgen.h \ + dnn/lossgen_data.h am__pkginclude_HEADERS_DIST = include/opus.h \ include/opus_multistream.h include/opus_types.h \ include/opus_defines.h include/opus_projection.h \ @@ -1032,8 +1317,8 @@ am__recursive_targets = \ AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope check recheck distdir distdir-am dist dist-all \ distcheck -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ - $(LISP)config.h.in +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ + config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. @@ -1050,9 +1335,6 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -CSCOPE = cscope am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no @@ -1208,7 +1490,9 @@ am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) +@ENABLE_DRED_TRUE@@EXTRA_PROGRAMS_TRUE@am__EXEEXT_4 = tests/test_opus_dred$(EXEEXT) TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver @@ -1231,6 +1515,7 @@ TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/celt_headers.mk \ $(srcdir)/celt_sources.mk $(srcdir)/config.h.in \ + $(srcdir)/lpcnet_headers.mk $(srcdir)/lpcnet_sources.mk \ $(srcdir)/opus-uninstalled.pc.in $(srcdir)/opus.pc.in \ $(srcdir)/opus_headers.mk $(srcdir)/opus_sources.mk \ $(srcdir)/silk_headers.mk $(srcdir)/silk_sources.mk \ @@ -1275,6 +1560,8 @@ am__relativize = \ DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip +# Exists only to be overridden by the user if desired. +AM_DISTCHECK_DVI_TARGET = dvi distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' @@ -1284,6 +1571,7 @@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ARM2GNU_PARAMS = @ARM2GNU_PARAMS@ +ARM_DOTPROD_INTR_CFLAGS = @ARM_DOTPROD_INTR_CFLAGS@ ARM_NEON_INTR_CFLAGS = @ARM_NEON_INTR_CFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -1297,6 +1585,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -1307,6 +1597,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ @@ -1339,6 +1630,8 @@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ 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_MEDIA = @OPUS_ARM_MAY_HAVE_MEDIA@ OPUS_ARM_MAY_HAVE_NEON = @OPUS_ARM_MAY_HAVE_NEON@ @@ -1347,7 +1640,7 @@ OPUS_HAVE_RTCD = @OPUS_HAVE_RTCD@ OPUS_LT_AGE = @OPUS_LT_AGE@ OPUS_LT_CURRENT = @OPUS_LT_CURRENT@ 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_SSE4_1_CFLAGS = @OPUS_X86_SSE4_1_CFLAGS@ OPUS_X86_SSE_CFLAGS = @OPUS_X86_SSE_CFLAGS@ @@ -1368,7 +1661,7 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ -X86_AVX_CFLAGS = @X86_AVX_CFLAGS@ +X86_AVX2_CFLAGS = @X86_AVX2_CFLAGS@ X86_SSE2_CFLAGS = @X86_SSE2_CFLAGS@ X86_SSE4_1_CFLAGS = @X86_SSE4_1_CFLAGS@ X86_SSE_CFLAGS = @X86_SSE_CFLAGS@ @@ -1430,15 +1723,17 @@ ACLOCAL_AMFLAGS = -I m4 lib_LTLIBRARIES = libopus.la DIST_SUBDIRS = doc 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 CELT_SOURCES = celt/bands.c celt/celt.c celt/celt_encoder.c \ celt/celt_decoder.c celt/cwrs.c celt/entcode.c celt/entdec.c \ celt/entenc.c celt/kiss_fft.c celt/laplace.c celt/mathops.c \ celt/mdct.c celt/modes.c celt/pitch.c celt/celt_lpc.c \ - celt/quant_bands.c celt/rate.c celt/vq.c $(am__append_7) \ - $(am__append_9) $(am__append_10) $(am__append_11) \ - $(am__append_12) $(am__append_14) $(am__append_16) + celt/quant_bands.c celt/rate.c celt/vq.c $(am__append_11) \ + $(am__append_14) $(am__append_15) $(am__append_17) \ + $(am__append_20) $(am__append_22) $(am__append_27) \ + $(am__append_29) CELT_SOURCES_X86_RTCD = \ celt/x86/x86cpu.c \ celt/x86/x86_celt_map.c @@ -1454,6 +1749,9 @@ CELT_SOURCES_SSE4_1 = \ celt/x86/celt_lpc_sse4_1.c \ celt/x86/pitch_sse4_1.c +CELT_SOURCES_AVX2 = \ +celt/x86/pitch_avx.c + CELT_SOURCES_ARM_RTCD = \ celt/arm/armcpu.c \ celt/arm/arm_celt_map.c @@ -1472,6 +1770,49 @@ CELT_SOURCES_ARM_NE10 = \ celt/arm/celt_fft_ne10.c \ celt/arm/celt_mdct_ne10.c +DEEP_PLC_SOURCES = \ +dnn/burg.c \ +dnn/freq.c \ +dnn/fargan.c \ +dnn/fargan_data.c \ +dnn/lpcnet_enc.c \ +dnn/lpcnet_plc.c \ +dnn/lpcnet_tables.c \ +dnn/nnet.c \ +dnn/nnet_default.c \ +dnn/plc_data.c \ +dnn/parse_lpcnet_weights.c \ +dnn/pitchdnn.c \ +dnn/pitchdnn_data.c + +DRED_SOURCES = \ +dnn/dred_rdovae_enc.c \ +dnn/dred_rdovae_enc_data.c \ +dnn/dred_rdovae_dec.c \ +dnn/dred_rdovae_dec_data.c \ +dnn/dred_rdovae_stats_data.c \ +dnn/dred_encoder.c \ +dnn/dred_coding.c \ +dnn/dred_decoder.c + +OSCE_SOURCES = \ +dnn/osce.c \ +dnn/osce_features.c \ +dnn/nndsp.c \ +dnn/lace_data.c \ +dnn/nolace_data.c + +LOSSGEN_SOURCES = \ +dnn/lossgen.c \ +dnn/lossgen_data.c + +DNN_SOURCES_X86_RTCD = dnn/x86/x86_dnn_map.c +DNN_SOURCES_AVX2 = dnn/x86/nnet_avx2.c +DNN_SOURCES_SSE4_1 = dnn/x86/nnet_sse4_1.c +DNN_SOURCES_SSE2 = dnn/x86/nnet_sse2.c +DNN_SOURCES_ARM_RTCD = dnn/arm/arm_dnn_map.c +DNN_SOURCES_DOTPROD = dnn/arm/nnet_dotprod.c +DNN_SOURCES_NEON = dnn/arm/nnet_neon.c SILK_SOURCES = silk/CNG.c silk/code_signs.c silk/init_decoder.c \ silk/decode_core.c silk/decode_frame.c \ silk/decode_parameters.c silk/decode_indices.c \ @@ -1503,9 +1844,10 @@ SILK_SOURCES = silk/CNG.c silk/code_signs.c silk/init_decoder.c \ silk/sigm_Q15.c silk/sort.c silk/sum_sqr_shift.c \ silk/stereo_decode_pred.c silk/stereo_encode_pred.c \ silk/stereo_find_predictor.c silk/stereo_quant_pred.c \ - silk/LPC_fit.c $(am__append_1) $(am__append_2) $(am__append_3) \ - $(am__append_4) $(am__append_5) $(am__append_8) \ - $(am__append_13) $(am__append_15) + silk/LPC_fit.c $(am__append_4) $(am__append_5) $(am__append_6) \ + $(am__append_7) $(am__append_8) $(am__append_9) \ + $(am__append_12) $(am__append_19) $(am__append_23) \ + $(am__append_28) SILK_SOURCES_X86_RTCD = \ silk/x86/x86_silk_map.c @@ -1515,6 +1857,9 @@ silk/x86/NSQ_del_dec_sse4_1.c \ silk/x86/VAD_sse4_1.c \ silk/x86/VQ_WMat_EC_sse4_1.c +SILK_SOURCES_AVX2 = \ +silk/x86/NSQ_del_dec_avx2.c + SILK_SOURCES_ARM_RTCD = \ silk/arm/arm_silk_map.c @@ -1586,16 +1931,24 @@ silk/float/scale_vector_FLP.c \ silk/float/schur_FLP.c \ silk/float/sort_FLP.c +SILK_SOURCES_FLOAT_AVX2 = \ +silk/float/x86/inner_product_FLP_avx2.c + OPUS_SOURCES = src/opus.c src/opus_decoder.c src/opus_encoder.c \ - src/opus_multistream.c src/opus_multistream_encoder.c \ - src/opus_multistream_decoder.c src/repacketizer.c \ - src/opus_projection_encoder.c src/opus_projection_decoder.c \ - src/mapping_matrix.c $(am__append_6) + src/extensions.c src/opus_multistream.c \ + src/opus_multistream_encoder.c src/opus_multistream_decoder.c \ + src/repacketizer.c src/opus_projection_encoder.c \ + src/opus_projection_decoder.c src/mapping_matrix.c \ + $(am__append_10) OPUS_SOURCES_FLOAT = \ src/analysis.c \ src/mlp.c \ src/mlp_data.c +LPCNET_SOURCES = $(am__append_1) $(am__append_2) $(am__append_3) \ + $(am__append_13) $(am__append_16) $(am__append_18) \ + $(am__append_21) $(am__append_24) $(am__append_25) \ + $(am__append_26) @CPU_ARM_TRUE@@OPUS_ARM_EXTERNAL_ASM_TRUE@noinst_LTLIBRARIES = libarmasm.la @CPU_ARM_TRUE@@OPUS_ARM_EXTERNAL_ASM_TRUE@libarmasm_la_SOURCES = $(CELT_SOURCES_ARM_ASM:.s=-gnu.S) @CPU_ARM_TRUE@@OPUS_ARM_EXTERNAL_ASM_TRUE@BUILT_SOURCES = $(CELT_SOURCES_ARM_ASM:.s=-gnu.S) \ @@ -1657,8 +2010,54 @@ celt/mips/pitch_mipsr1.h \ celt/mips/vq_mipsr1.h \ celt/x86/pitch_sse.h \ celt/x86/vq_sse.h \ +celt/x86/x86_arch_macros.h \ celt/x86/x86cpu.h +DEEP_PLC_HEAD = \ +dnn/lpcnet.h \ +dnn/burg.h \ +dnn/common.h \ +dnn/freq.h \ +dnn/fargan.h \ +dnn/fargan_data.h \ +dnn/lpcnet_private.h \ +dnn/nnet.h \ +dnn/plc_data.h \ +dnn/vec.h \ +dnn/vec_avx.h \ +dnn/vec_neon.h \ +dnn/pitchdnn.h \ +dnn/pitchdnn_data.h \ +dnn/x86/dnn_x86.h \ +dnn/nnet_arch.h \ +dnn/arm/dnn_arm.h + +DRED_HEAD = \ +dnn/dred_coding.h \ +dnn/dred_config.h \ +dnn/dred_decoder.h \ +dnn/dred_encoder.h \ +dnn/dred_rdovae.h \ +dnn/dred_rdovae_constants.h \ +dnn/dred_rdovae_enc.h \ +dnn/dred_rdovae_enc_data.h \ +dnn/dred_rdovae_dec.h \ +dnn/dred_rdovae_dec_data.h \ +dnn/dred_rdovae_stats_data.h + +OSCE_HEAD = \ +dnn/osce.h \ +dnn/osce_config.h \ +dnn/osce_structs.h \ +dnn/osce_features.h \ +dnn/nndsp.h \ +dnn/lace_data.h \ +dnn/nolace_data.h + +LOSSGEN_HEAD = \ +dnn/lossgen.h \ +dnn/lossgen_data.h + SILK_HEAD = \ silk/debug.h \ silk/control.h \ @@ -1711,17 +2110,19 @@ include/opus_projection.h \ src/opus_private.h \ src/analysis.h \ src/mapping_matrix.h \ -src/mlp.h \ -src/tansig_table.h +src/mlp.h -libopus_la_SOURCES = $(CELT_SOURCES) $(SILK_SOURCES) $(OPUS_SOURCES) +LPCNET_HEAD = $(am__append_30) $(am__append_31) $(am__append_32) \ + $(am__append_33) +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_LIBADD = $(NE10_LIBS) $(LIBM) $(am__append_17) +libopus_la_LIBADD = $(NE10_LIBS) $(LIBM) $(am__append_34) pkginclude_HEADERS = include/opus.h include/opus_multistream.h \ include/opus_types.h include/opus_defines.h \ - include/opus_projection.h $(am__append_24) -noinst_HEADERS = $(OPUS_HEAD) $(SILK_HEAD) $(CELT_HEAD) -@EXTRA_PROGRAMS_TRUE@opus_demo_SOURCES = src/opus_demo.c + include/opus_projection.h $(am__append_43) +noinst_HEADERS = $(OPUS_HEAD) $(SILK_HEAD) $(CELT_HEAD) $(LPCNET_HEAD) +@EXTRA_PROGRAMS_TRUE@opus_demo_SOURCES = src/opus_demo.c \ +@EXTRA_PROGRAMS_TRUE@ $(am__append_35) @EXTRA_PROGRAMS_TRUE@opus_demo_LDADD = libopus.la $(NE10_LIBS) $(LIBM) @EXTRA_PROGRAMS_TRUE@repacketizer_demo_SOURCES = src/repacketizer_demo.c @EXTRA_PROGRAMS_TRUE@repacketizer_demo_LDADD = libopus.la $(NE10_LIBS) $(LIBM) @@ -1737,40 +2138,59 @@ noinst_HEADERS = $(OPUS_HEAD) $(SILK_HEAD) $(CELT_HEAD) @EXTRA_PROGRAMS_TRUE@tests_test_opus_decode_LDADD = libopus.la $(NE10_LIBS) $(LIBM) @EXTRA_PROGRAMS_TRUE@tests_test_opus_padding_SOURCES = tests/test_opus_padding.c tests/test_opus_common.h @EXTRA_PROGRAMS_TRUE@tests_test_opus_padding_LDADD = libopus.la $(NE10_LIBS) $(LIBM) +@EXTRA_PROGRAMS_TRUE@tests_test_opus_dred_SOURCES = tests/test_opus_dred.c tests/test_opus_common.h +@EXTRA_PROGRAMS_TRUE@tests_test_opus_dred_LDADD = libopus.la $(NE10_LIBS) $(LIBM) @EXTRA_PROGRAMS_TRUE@CELT_OBJ = $(CELT_SOURCES:.c=.lo) @EXTRA_PROGRAMS_TRUE@SILK_OBJ = $(SILK_SOURCES:.c=.lo) +@EXTRA_PROGRAMS_TRUE@LPCNET_OBJ = $(LPCNET_SOURCES:.c=.lo) @EXTRA_PROGRAMS_TRUE@OPUS_OBJ = $(OPUS_SOURCES:.c=.lo) +@EXTRA_PROGRAMS_TRUE@tests_test_opus_extensions_SOURCES = tests/test_opus_extensions.c tests/test_opus_common.h +@EXTRA_PROGRAMS_TRUE@tests_test_opus_extensions_LDADD = $(OPUS_OBJ) \ +@EXTRA_PROGRAMS_TRUE@ $(SILK_OBJ) $(LPCNET_OBJ) $(CELT_OBJ) \ +@EXTRA_PROGRAMS_TRUE@ $(NE10_LIBS) $(LIBM) $(am__append_36) @EXTRA_PROGRAMS_TRUE@tests_test_opus_projection_SOURCES = tests/test_opus_projection.c tests/test_opus_common.h @EXTRA_PROGRAMS_TRUE@tests_test_opus_projection_LDADD = $(OPUS_OBJ) \ -@EXTRA_PROGRAMS_TRUE@ $(SILK_OBJ) $(CELT_OBJ) $(NE10_LIBS) \ -@EXTRA_PROGRAMS_TRUE@ $(LIBM) $(am__append_18) +@EXTRA_PROGRAMS_TRUE@ $(SILK_OBJ) $(LPCNET_OBJ) $(CELT_OBJ) \ +@EXTRA_PROGRAMS_TRUE@ $(NE10_LIBS) $(LIBM) $(am__append_37) @EXTRA_PROGRAMS_TRUE@silk_tests_test_unit_LPC_inv_pred_gain_SOURCES = silk/tests/test_unit_LPC_inv_pred_gain.c @EXTRA_PROGRAMS_TRUE@silk_tests_test_unit_LPC_inv_pred_gain_LDADD = \ -@EXTRA_PROGRAMS_TRUE@ $(SILK_OBJ) $(CELT_OBJ) $(NE10_LIBS) \ -@EXTRA_PROGRAMS_TRUE@ $(LIBM) $(am__append_19) +@EXTRA_PROGRAMS_TRUE@ $(SILK_OBJ) $(LPCNET_OBJ) $(CELT_OBJ) \ +@EXTRA_PROGRAMS_TRUE@ $(NE10_LIBS) $(LIBM) $(am__append_38) @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_cwrs32_SOURCES = celt/tests/test_unit_cwrs32.c @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_cwrs32_LDADD = $(LIBM) @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_dft_SOURCES = celt/tests/test_unit_dft.c @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_dft_LDADD = $(CELT_OBJ) \ -@EXTRA_PROGRAMS_TRUE@ $(NE10_LIBS) $(LIBM) $(am__append_20) +@EXTRA_PROGRAMS_TRUE@ $(LPCNET_OBJ) $(NE10_LIBS) $(LIBM) \ +@EXTRA_PROGRAMS_TRUE@ $(am__append_39) @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_entropy_SOURCES = celt/tests/test_unit_entropy.c @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_entropy_LDADD = $(LIBM) @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_laplace_SOURCES = celt/tests/test_unit_laplace.c @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_laplace_LDADD = $(LIBM) @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_mathops_SOURCES = celt/tests/test_unit_mathops.c @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_mathops_LDADD = $(CELT_OBJ) \ -@EXTRA_PROGRAMS_TRUE@ $(NE10_LIBS) $(LIBM) $(am__append_21) +@EXTRA_PROGRAMS_TRUE@ $(LPCNET_OBJ) $(NE10_LIBS) $(LIBM) \ +@EXTRA_PROGRAMS_TRUE@ $(am__append_40) @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_mdct_SOURCES = celt/tests/test_unit_mdct.c @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_mdct_LDADD = $(CELT_OBJ) \ -@EXTRA_PROGRAMS_TRUE@ $(NE10_LIBS) $(LIBM) $(am__append_22) +@EXTRA_PROGRAMS_TRUE@ $(LPCNET_OBJ) $(NE10_LIBS) $(LIBM) \ +@EXTRA_PROGRAMS_TRUE@ $(am__append_41) @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_rotation_SOURCES = celt/tests/test_unit_rotation.c @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_rotation_LDADD = \ -@EXTRA_PROGRAMS_TRUE@ $(CELT_OBJ) $(NE10_LIBS) $(LIBM) \ -@EXTRA_PROGRAMS_TRUE@ $(am__append_23) +@EXTRA_PROGRAMS_TRUE@ $(CELT_OBJ) $(LPCNET_OBJ) $(NE10_LIBS) \ +@EXTRA_PROGRAMS_TRUE@ $(LIBM) $(am__append_42) @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_types_SOURCES = celt/tests/test_unit_types.c @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_types_LDADD = $(LIBM) @CUSTOM_MODES_TRUE@@EXTRA_PROGRAMS_TRUE@opus_custom_demo_SOURCES = celt/opus_custom_demo.c @CUSTOM_MODES_TRUE@@EXTRA_PROGRAMS_TRUE@opus_custom_demo_LDADD = libopus.la $(LIBM) +@ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@fargan_demo_SOURCES = dnn/fargan_demo.c +@ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@fargan_demo_LDADD = $(LPCNET_OBJ) $(CELT_OBJ) $(LIBM) +@ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@dump_data_SOURCES = dnn/dump_data.c +@ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@dump_data_LDADD = $(LPCNET_OBJ) $(CELT_OBJ) $(LIBM) +@ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@dump_weights_blob_SOURCES = dnn/write_lpcnet_weights.c +@ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@dump_weights_blob_LDADD = $(LIBM) +@ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@dump_weights_blob_CFLAGS = $(AM_CFLAGS) -DDUMP_BINARY_WEIGHTS +@ENABLE_LOSSGEN_TRUE@@EXTRA_PROGRAMS_TRUE@lossgen_demo_SOURCES = dnn/lossgen_demo.c $(LOSSGEN_SOURCES) +@ENABLE_LOSSGEN_TRUE@@EXTRA_PROGRAMS_TRUE@lossgen_demo_LDADD = $(LIBM) EXTRA_DIST = opus.pc.in \ opus-uninstalled.pc.in \ opus.m4 \ @@ -1784,6 +2204,7 @@ EXTRA_DIST = opus.pc.in \ cmake/OpusFunctions.cmake \ cmake/OpusPackageVersion.cmake \ cmake/OpusSources.cmake \ + cmake/README.md \ cmake/RunTest.cmake \ cmake/config.h.cmake.in \ cmake/vla.c \ @@ -1791,11 +2212,14 @@ EXTRA_DIST = opus.pc.in \ cmake/cpu_info_by_c.c \ meson/get-version.py \ meson/read-sources-list.py \ + meson/README.md \ meson.build \ meson_options.txt \ include/meson.build \ celt/meson.build \ celt/tests/meson.build \ + dnn/meson.build \ + dnn/README.md \ silk/meson.build \ silk/tests/meson.build \ src/meson.build \ @@ -1803,21 +2227,7 @@ EXTRA_DIST = opus.pc.in \ doc/meson.build \ tests/run_vectors.sh \ celt/arm/arm2gnu.pl \ - 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 + celt/arm/celt_pitch_xcorr_arm.s pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = opus.pc @@ -1830,15 +2240,25 @@ OPT_UNIT_TEST_OBJ = $(celt_tests_test_unit_mathops_SOURCES:.c=.o) \ $(silk_tests_test_unit_LPC_inv_pred_gain_SOURCES:.c=.o) @HAVE_SSE_TRUE@SSE_OBJ = $(CELT_SOURCES_SSE:.c=.lo) -@HAVE_SSE2_TRUE@SSE2_OBJ = $(CELT_SOURCES_SSE2:.c=.lo) +@HAVE_SSE2_TRUE@SSE2_OBJ = $(CELT_SOURCES_SSE2:.c=.lo) \ +@HAVE_SSE2_TRUE@ $(DNN_SOURCES_SSE2:.c=.lo) + @HAVE_SSE4_1_TRUE@SSE4_1_OBJ = $(CELT_SOURCES_SSE4_1:.c=.lo) \ +@HAVE_SSE4_1_TRUE@ $(DNN_SOURCES_SSE4_1:.c=.lo) \ @HAVE_SSE4_1_TRUE@ $(SILK_SOURCES_SSE4_1:.c=.lo) \ @HAVE_SSE4_1_TRUE@ $(SILK_SOURCES_FIXED_SSE4_1:.c=.lo) +@HAVE_AVX2_TRUE@AVX2_OBJ = $(CELT_SOURCES_AVX2:.c=.lo) \ +@HAVE_AVX2_TRUE@ $(SILK_SOURCES_AVX2:.c=.lo) \ +@HAVE_AVX2_TRUE@ $(SILK_SOURCES_FLOAT_AVX2:.c=.lo) \ +@HAVE_AVX2_TRUE@ $(DNN_SOURCES_AVX2:.c=.lo) + @HAVE_ARM_NEON_INTR_TRUE@ARM_NEON_INTR_OBJ = $(CELT_SOURCES_ARM_NEON_INTR:.c=.lo) \ @HAVE_ARM_NEON_INTR_TRUE@ $(SILK_SOURCES_ARM_NEON_INTR:.c=.lo) \ +@HAVE_ARM_NEON_INTR_TRUE@ $(DNN_SOURCES_NEON:.c=.lo) \ @HAVE_ARM_NEON_INTR_TRUE@ $(SILK_SOURCES_FIXED_ARM_NEON_INTR:.c=.lo) +@HAVE_ARM_DOTPROD_TRUE@ARM_DOTPROD_OBJ = $(DNN_SOURCES_DOTPROD:.c=.lo) all: $(BUILT_SOURCES) config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -1846,7 +2266,7 @@ all: $(BUILT_SOURCES) config.h .SUFFIXES: .S .c .lo .log .o .obj .test .test$(EXEEXT) .trs am--refresh: Makefile @: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/celt_sources.mk $(srcdir)/silk_sources.mk $(srcdir)/opus_sources.mk $(srcdir)/celt_headers.mk $(srcdir)/silk_headers.mk $(srcdir)/opus_headers.mk $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/celt_sources.mk $(srcdir)/lpcnet_sources.mk $(srcdir)/silk_sources.mk $(srcdir)/opus_sources.mk $(srcdir)/celt_headers.mk $(srcdir)/lpcnet_headers.mk $(srcdir)/silk_headers.mk $(srcdir)/opus_headers.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -1868,7 +2288,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ esac; -$(srcdir)/celt_sources.mk $(srcdir)/silk_sources.mk $(srcdir)/opus_sources.mk $(srcdir)/celt_headers.mk $(srcdir)/silk_headers.mk $(srcdir)/opus_headers.mk $(am__empty): +$(srcdir)/celt_sources.mk $(srcdir)/lpcnet_sources.mk $(srcdir)/silk_sources.mk $(srcdir)/opus_sources.mk $(srcdir)/celt_headers.mk $(srcdir)/lpcnet_headers.mk $(srcdir)/silk_headers.mk $(srcdir)/opus_headers.mk $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck @@ -2012,6 +2432,8 @@ celt/x86/celt_lpc_sse4_1.lo: celt/x86/$(am__dirstamp) \ celt/x86/$(DEPDIR)/$(am__dirstamp) celt/x86/pitch_sse4_1.lo: celt/x86/$(am__dirstamp) \ celt/x86/$(DEPDIR)/$(am__dirstamp) +celt/x86/pitch_avx.lo: celt/x86/$(am__dirstamp) \ + celt/x86/$(DEPDIR)/$(am__dirstamp) celt/arm/armcpu.lo: celt/arm/$(am__dirstamp) \ celt/arm/$(DEPDIR)/$(am__dirstamp) celt/arm/arm_celt_map.lo: celt/arm/$(am__dirstamp) \ @@ -2317,8 +2739,19 @@ silk/float/schur_FLP.lo: silk/float/$(am__dirstamp) \ silk/float/$(DEPDIR)/$(am__dirstamp) silk/float/sort_FLP.lo: silk/float/$(am__dirstamp) \ silk/float/$(DEPDIR)/$(am__dirstamp) +silk/float/x86/$(am__dirstamp): + @$(MKDIR_P) silk/float/x86 + @: > silk/float/x86/$(am__dirstamp) +silk/float/x86/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) silk/float/x86/$(DEPDIR) + @: > silk/float/x86/$(DEPDIR)/$(am__dirstamp) +silk/float/x86/inner_product_FLP_avx2.lo: \ + silk/float/x86/$(am__dirstamp) \ + silk/float/x86/$(DEPDIR)/$(am__dirstamp) silk/x86/x86_silk_map.lo: silk/x86/$(am__dirstamp) \ silk/x86/$(DEPDIR)/$(am__dirstamp) +silk/x86/NSQ_del_dec_avx2.lo: silk/x86/$(am__dirstamp) \ + silk/x86/$(DEPDIR)/$(am__dirstamp) silk/arm/$(am__dirstamp): @$(MKDIR_P) silk/arm @: > silk/arm/$(am__dirstamp) @@ -2335,6 +2768,73 @@ silk/arm/NSQ_del_dec_neon_intr.lo: silk/arm/$(am__dirstamp) \ silk/arm/$(DEPDIR)/$(am__dirstamp) silk/arm/NSQ_neon.lo: silk/arm/$(am__dirstamp) \ silk/arm/$(DEPDIR)/$(am__dirstamp) +dnn/$(am__dirstamp): + @$(MKDIR_P) dnn + @: > dnn/$(am__dirstamp) +dnn/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) dnn/$(DEPDIR) + @: > dnn/$(DEPDIR)/$(am__dirstamp) +dnn/burg.lo: dnn/$(am__dirstamp) dnn/$(DEPDIR)/$(am__dirstamp) +dnn/freq.lo: dnn/$(am__dirstamp) dnn/$(DEPDIR)/$(am__dirstamp) +dnn/fargan.lo: dnn/$(am__dirstamp) dnn/$(DEPDIR)/$(am__dirstamp) +dnn/fargan_data.lo: dnn/$(am__dirstamp) dnn/$(DEPDIR)/$(am__dirstamp) +dnn/lpcnet_enc.lo: dnn/$(am__dirstamp) dnn/$(DEPDIR)/$(am__dirstamp) +dnn/lpcnet_plc.lo: dnn/$(am__dirstamp) dnn/$(DEPDIR)/$(am__dirstamp) +dnn/lpcnet_tables.lo: dnn/$(am__dirstamp) \ + dnn/$(DEPDIR)/$(am__dirstamp) +dnn/nnet.lo: dnn/$(am__dirstamp) dnn/$(DEPDIR)/$(am__dirstamp) +dnn/nnet_default.lo: dnn/$(am__dirstamp) dnn/$(DEPDIR)/$(am__dirstamp) +dnn/plc_data.lo: dnn/$(am__dirstamp) dnn/$(DEPDIR)/$(am__dirstamp) +dnn/parse_lpcnet_weights.lo: dnn/$(am__dirstamp) \ + dnn/$(DEPDIR)/$(am__dirstamp) +dnn/pitchdnn.lo: dnn/$(am__dirstamp) dnn/$(DEPDIR)/$(am__dirstamp) +dnn/pitchdnn_data.lo: dnn/$(am__dirstamp) \ + dnn/$(DEPDIR)/$(am__dirstamp) +dnn/dred_rdovae_enc.lo: dnn/$(am__dirstamp) \ + dnn/$(DEPDIR)/$(am__dirstamp) +dnn/dred_rdovae_enc_data.lo: dnn/$(am__dirstamp) \ + dnn/$(DEPDIR)/$(am__dirstamp) +dnn/dred_rdovae_dec.lo: dnn/$(am__dirstamp) \ + dnn/$(DEPDIR)/$(am__dirstamp) +dnn/dred_rdovae_dec_data.lo: dnn/$(am__dirstamp) \ + dnn/$(DEPDIR)/$(am__dirstamp) +dnn/dred_rdovae_stats_data.lo: dnn/$(am__dirstamp) \ + dnn/$(DEPDIR)/$(am__dirstamp) +dnn/dred_encoder.lo: dnn/$(am__dirstamp) dnn/$(DEPDIR)/$(am__dirstamp) +dnn/dred_coding.lo: dnn/$(am__dirstamp) dnn/$(DEPDIR)/$(am__dirstamp) +dnn/dred_decoder.lo: dnn/$(am__dirstamp) dnn/$(DEPDIR)/$(am__dirstamp) +dnn/osce.lo: dnn/$(am__dirstamp) dnn/$(DEPDIR)/$(am__dirstamp) +dnn/osce_features.lo: dnn/$(am__dirstamp) \ + dnn/$(DEPDIR)/$(am__dirstamp) +dnn/nndsp.lo: dnn/$(am__dirstamp) dnn/$(DEPDIR)/$(am__dirstamp) +dnn/lace_data.lo: dnn/$(am__dirstamp) dnn/$(DEPDIR)/$(am__dirstamp) +dnn/nolace_data.lo: dnn/$(am__dirstamp) dnn/$(DEPDIR)/$(am__dirstamp) +dnn/x86/$(am__dirstamp): + @$(MKDIR_P) dnn/x86 + @: > dnn/x86/$(am__dirstamp) +dnn/x86/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) dnn/x86/$(DEPDIR) + @: > dnn/x86/$(DEPDIR)/$(am__dirstamp) +dnn/x86/x86_dnn_map.lo: dnn/x86/$(am__dirstamp) \ + dnn/x86/$(DEPDIR)/$(am__dirstamp) +dnn/x86/nnet_sse2.lo: dnn/x86/$(am__dirstamp) \ + dnn/x86/$(DEPDIR)/$(am__dirstamp) +dnn/x86/nnet_sse4_1.lo: dnn/x86/$(am__dirstamp) \ + dnn/x86/$(DEPDIR)/$(am__dirstamp) +dnn/x86/nnet_avx2.lo: dnn/x86/$(am__dirstamp) \ + dnn/x86/$(DEPDIR)/$(am__dirstamp) +dnn/arm/$(am__dirstamp): + @$(MKDIR_P) dnn/arm + @: > dnn/arm/$(am__dirstamp) +dnn/arm/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) dnn/arm/$(DEPDIR) + @: > dnn/arm/$(DEPDIR)/$(am__dirstamp) +dnn/arm/arm_dnn_map.lo: dnn/arm/$(am__dirstamp) \ + dnn/arm/$(DEPDIR)/$(am__dirstamp) +dnn/arm/nnet_dotprod.lo: dnn/arm/$(am__dirstamp) \ + dnn/arm/$(DEPDIR)/$(am__dirstamp) +dnn/arm/nnet_neon.lo: dnn/arm/$(am__dirstamp) \ + dnn/arm/$(DEPDIR)/$(am__dirstamp) src/$(am__dirstamp): @$(MKDIR_P) src @: > src/$(am__dirstamp) @@ -2344,6 +2844,7 @@ src/$(DEPDIR)/$(am__dirstamp): src/opus.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/opus_decoder.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/opus_encoder.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) +src/extensions.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/opus_multistream.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/opus_multistream_encoder.lo: src/$(am__dirstamp) \ @@ -2417,6 +2918,34 @@ celt/tests/test_unit_types.$(OBJEXT): celt/tests/$(am__dirstamp) \ celt/tests/test_unit_types$(EXEEXT): $(celt_tests_test_unit_types_OBJECTS) $(celt_tests_test_unit_types_DEPENDENCIES) $(EXTRA_celt_tests_test_unit_types_DEPENDENCIES) celt/tests/$(am__dirstamp) @rm -f celt/tests/test_unit_types$(EXEEXT) $(AM_V_CCLD)$(LINK) $(celt_tests_test_unit_types_OBJECTS) $(celt_tests_test_unit_types_LDADD) $(LIBS) +dnn/dump_data.$(OBJEXT): dnn/$(am__dirstamp) \ + dnn/$(DEPDIR)/$(am__dirstamp) + +dump_data$(EXEEXT): $(dump_data_OBJECTS) $(dump_data_DEPENDENCIES) $(EXTRA_dump_data_DEPENDENCIES) + @rm -f dump_data$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(dump_data_OBJECTS) $(dump_data_LDADD) $(LIBS) +dnn/dump_weights_blob-write_lpcnet_weights.$(OBJEXT): \ + dnn/$(am__dirstamp) dnn/$(DEPDIR)/$(am__dirstamp) + +dump_weights_blob$(EXEEXT): $(dump_weights_blob_OBJECTS) $(dump_weights_blob_DEPENDENCIES) $(EXTRA_dump_weights_blob_DEPENDENCIES) + @rm -f dump_weights_blob$(EXEEXT) + $(AM_V_CCLD)$(dump_weights_blob_LINK) $(dump_weights_blob_OBJECTS) $(dump_weights_blob_LDADD) $(LIBS) +dnn/fargan_demo.$(OBJEXT): dnn/$(am__dirstamp) \ + dnn/$(DEPDIR)/$(am__dirstamp) + +fargan_demo$(EXEEXT): $(fargan_demo_OBJECTS) $(fargan_demo_DEPENDENCIES) $(EXTRA_fargan_demo_DEPENDENCIES) + @rm -f fargan_demo$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fargan_demo_OBJECTS) $(fargan_demo_LDADD) $(LIBS) +dnn/lossgen_demo.$(OBJEXT): dnn/$(am__dirstamp) \ + dnn/$(DEPDIR)/$(am__dirstamp) +dnn/lossgen.$(OBJEXT): dnn/$(am__dirstamp) \ + dnn/$(DEPDIR)/$(am__dirstamp) +dnn/lossgen_data.$(OBJEXT): dnn/$(am__dirstamp) \ + dnn/$(DEPDIR)/$(am__dirstamp) + +lossgen_demo$(EXEEXT): $(lossgen_demo_OBJECTS) $(lossgen_demo_DEPENDENCIES) $(EXTRA_lossgen_demo_DEPENDENCIES) + @rm -f lossgen_demo$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lossgen_demo_OBJECTS) $(lossgen_demo_LDADD) $(LIBS) src/opus_compare.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) @@ -2472,6 +3001,12 @@ tests/test_opus_decode.$(OBJEXT): tests/$(am__dirstamp) \ tests/test_opus_decode$(EXEEXT): $(tests_test_opus_decode_OBJECTS) $(tests_test_opus_decode_DEPENDENCIES) $(EXTRA_tests_test_opus_decode_DEPENDENCIES) tests/$(am__dirstamp) @rm -f tests/test_opus_decode$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_test_opus_decode_OBJECTS) $(tests_test_opus_decode_LDADD) $(LIBS) +tests/test_opus_dred.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) + +tests/test_opus_dred$(EXEEXT): $(tests_test_opus_dred_OBJECTS) $(tests_test_opus_dred_DEPENDENCIES) $(EXTRA_tests_test_opus_dred_DEPENDENCIES) tests/$(am__dirstamp) + @rm -f tests/test_opus_dred$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(tests_test_opus_dred_OBJECTS) $(tests_test_opus_dred_LDADD) $(LIBS) tests/test_opus_encode.$(OBJEXT): tests/$(am__dirstamp) \ tests/$(DEPDIR)/$(am__dirstamp) tests/opus_encode_regressions.$(OBJEXT): tests/$(am__dirstamp) \ @@ -2480,6 +3015,12 @@ tests/opus_encode_regressions.$(OBJEXT): tests/$(am__dirstamp) \ tests/test_opus_encode$(EXEEXT): $(tests_test_opus_encode_OBJECTS) $(tests_test_opus_encode_DEPENDENCIES) $(EXTRA_tests_test_opus_encode_DEPENDENCIES) tests/$(am__dirstamp) @rm -f tests/test_opus_encode$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_test_opus_encode_OBJECTS) $(tests_test_opus_encode_LDADD) $(LIBS) +tests/test_opus_extensions.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) + +tests/test_opus_extensions$(EXEEXT): $(tests_test_opus_extensions_OBJECTS) $(tests_test_opus_extensions_DEPENDENCIES) $(EXTRA_tests_test_opus_extensions_DEPENDENCIES) tests/$(am__dirstamp) + @rm -f tests/test_opus_extensions$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(tests_test_opus_extensions_OBJECTS) $(tests_test_opus_extensions_LDADD) $(LIBS) tests/test_opus_padding.$(OBJEXT): tests/$(am__dirstamp) \ tests/$(DEPDIR)/$(am__dirstamp) @@ -2514,6 +3055,12 @@ mostlyclean-compile: -rm -f celt/tests/*.$(OBJEXT) -rm -f celt/x86/*.$(OBJEXT) -rm -f celt/x86/*.lo + -rm -f dnn/*.$(OBJEXT) + -rm -f dnn/*.lo + -rm -f dnn/arm/*.$(OBJEXT) + -rm -f dnn/arm/*.lo + -rm -f dnn/x86/*.$(OBJEXT) + -rm -f dnn/x86/*.lo -rm -f doc/*.$(OBJEXT) -rm -f silk/*.$(OBJEXT) -rm -f silk/*.lo @@ -2527,6 +3074,8 @@ mostlyclean-compile: -rm -f silk/fixed/x86/*.lo -rm -f silk/float/*.$(OBJEXT) -rm -f silk/float/*.lo + -rm -f silk/float/x86/*.$(OBJEXT) + -rm -f silk/float/x86/*.lo -rm -f silk/tests/*.$(OBJEXT) -rm -f silk/x86/*.$(OBJEXT) -rm -f silk/x86/*.lo @@ -2572,12 +3121,52 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@celt/tests/$(DEPDIR)/test_unit_rotation.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@celt/tests/$(DEPDIR)/test_unit_types.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@celt/x86/$(DEPDIR)/celt_lpc_sse4_1.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@celt/x86/$(DEPDIR)/pitch_avx.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@celt/x86/$(DEPDIR)/pitch_sse.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@celt/x86/$(DEPDIR)/pitch_sse2.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@celt/x86/$(DEPDIR)/pitch_sse4_1.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@celt/x86/$(DEPDIR)/vq_sse2.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@celt/x86/$(DEPDIR)/x86_celt_map.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@celt/x86/$(DEPDIR)/x86cpu.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/burg.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/dred_coding.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/dred_decoder.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/dred_encoder.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/dred_rdovae_dec.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/dred_rdovae_dec_data.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/dred_rdovae_enc.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/dred_rdovae_enc_data.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/dred_rdovae_stats_data.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/dump_data.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/dump_weights_blob-write_lpcnet_weights.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/fargan.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/fargan_data.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/fargan_demo.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/freq.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/lace_data.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/lossgen.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/lossgen_data.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/lossgen_demo.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/lpcnet_enc.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/lpcnet_plc.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/lpcnet_tables.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/nndsp.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/nnet.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/nnet_default.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/nolace_data.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/osce.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/osce_features.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/parse_lpcnet_weights.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/pitchdnn.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/pitchdnn_data.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/plc_data.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/arm/$(DEPDIR)/arm_dnn_map.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/arm/$(DEPDIR)/nnet_dotprod.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/arm/$(DEPDIR)/nnet_neon.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/x86/$(DEPDIR)/nnet_avx2.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/x86/$(DEPDIR)/nnet_sse2.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/x86/$(DEPDIR)/nnet_sse4_1.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/x86/$(DEPDIR)/x86_dnn_map.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@doc/$(DEPDIR)/trivial_example.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/A2NLSF.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/CNG.Plo@am__quote@ # am--include-marker @@ -2715,13 +3304,16 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@silk/float/$(DEPDIR)/sort_FLP.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@silk/float/$(DEPDIR)/warped_autocorrelation_FLP.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@silk/float/$(DEPDIR)/wrappers_FLP.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@silk/float/x86/$(DEPDIR)/inner_product_FLP_avx2.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@silk/tests/$(DEPDIR)/test_unit_LPC_inv_pred_gain.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@silk/x86/$(DEPDIR)/NSQ_del_dec_avx2.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@silk/x86/$(DEPDIR)/NSQ_del_dec_sse4_1.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@silk/x86/$(DEPDIR)/NSQ_sse4_1.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@silk/x86/$(DEPDIR)/VAD_sse4_1.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@silk/x86/$(DEPDIR)/VQ_WMat_EC_sse4_1.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@silk/x86/$(DEPDIR)/x86_silk_map.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/analysis.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/extensions.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/mapping_matrix.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/mlp.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/mlp_data.Plo@am__quote@ # am--include-marker @@ -2740,7 +3332,9 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/opus_encode_regressions.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test_opus_api.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test_opus_decode.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test_opus_dred.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test_opus_encode.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test_opus_extensions.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test_opus_padding.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test_opus_projection.Po@am__quote@ # am--include-marker @@ -2798,6 +3392,20 @@ am--depfiles: $(am__depfiles_remade) @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< +dnn/dump_weights_blob-write_lpcnet_weights.o: dnn/write_lpcnet_weights.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dump_weights_blob_CFLAGS) $(CFLAGS) -MT dnn/dump_weights_blob-write_lpcnet_weights.o -MD -MP -MF dnn/$(DEPDIR)/dump_weights_blob-write_lpcnet_weights.Tpo -c -o dnn/dump_weights_blob-write_lpcnet_weights.o `test -f 'dnn/write_lpcnet_weights.c' || echo '$(srcdir)/'`dnn/write_lpcnet_weights.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) dnn/$(DEPDIR)/dump_weights_blob-write_lpcnet_weights.Tpo dnn/$(DEPDIR)/dump_weights_blob-write_lpcnet_weights.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dnn/write_lpcnet_weights.c' object='dnn/dump_weights_blob-write_lpcnet_weights.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dump_weights_blob_CFLAGS) $(CFLAGS) -c -o dnn/dump_weights_blob-write_lpcnet_weights.o `test -f 'dnn/write_lpcnet_weights.c' || echo '$(srcdir)/'`dnn/write_lpcnet_weights.c + +dnn/dump_weights_blob-write_lpcnet_weights.obj: dnn/write_lpcnet_weights.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dump_weights_blob_CFLAGS) $(CFLAGS) -MT dnn/dump_weights_blob-write_lpcnet_weights.obj -MD -MP -MF dnn/$(DEPDIR)/dump_weights_blob-write_lpcnet_weights.Tpo -c -o dnn/dump_weights_blob-write_lpcnet_weights.obj `if test -f 'dnn/write_lpcnet_weights.c'; then $(CYGPATH_W) 'dnn/write_lpcnet_weights.c'; else $(CYGPATH_W) '$(srcdir)/dnn/write_lpcnet_weights.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) dnn/$(DEPDIR)/dump_weights_blob-write_lpcnet_weights.Tpo dnn/$(DEPDIR)/dump_weights_blob-write_lpcnet_weights.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dnn/write_lpcnet_weights.c' object='dnn/dump_weights_blob-write_lpcnet_weights.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dump_weights_blob_CFLAGS) $(CFLAGS) -c -o dnn/dump_weights_blob-write_lpcnet_weights.obj `if test -f 'dnn/write_lpcnet_weights.c'; then $(CYGPATH_W) 'dnn/write_lpcnet_weights.c'; else $(CYGPATH_W) '$(srcdir)/dnn/write_lpcnet_weights.c'; fi` + mostlyclean-libtool: -rm -f *.lo @@ -2807,12 +3415,16 @@ clean-libtool: -rm -rf celt/arm/.libs celt/arm/_libs -rm -rf celt/tests/.libs celt/tests/_libs -rm -rf celt/x86/.libs celt/x86/_libs + -rm -rf dnn/.libs dnn/_libs + -rm -rf dnn/arm/.libs dnn/arm/_libs + -rm -rf dnn/x86/.libs dnn/x86/_libs -rm -rf silk/.libs silk/_libs -rm -rf silk/arm/.libs silk/arm/_libs -rm -rf silk/fixed/.libs silk/fixed/_libs -rm -rf silk/fixed/arm/.libs silk/fixed/arm/_libs -rm -rf silk/fixed/x86/.libs silk/fixed/x86/_libs -rm -rf silk/float/.libs silk/float/_libs + -rm -rf silk/float/x86/.libs silk/float/x86/_libs -rm -rf silk/tests/.libs silk/tests/_libs -rm -rf silk/x86/.libs silk/x86/_libs -rm -rf src/.libs src/_libs @@ -3097,7 +3709,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ @@ -3215,6 +3827,13 @@ tests/test_opus_encode.log: tests/test_opus_encode$(EXEEXT) --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/test_opus_extensions.log: tests/test_opus_extensions$(EXEEXT) + @p='tests/test_opus_extensions$(EXEEXT)'; \ + b='tests/test_opus_extensions'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) tests/test_opus_padding.log: tests/test_opus_padding$(EXEEXT) @p='tests/test_opus_padding$(EXEEXT)'; \ b='tests/test_opus_padding'; \ @@ -3229,6 +3848,13 @@ tests/test_opus_projection.log: tests/test_opus_projection$(EXEEXT) --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/test_opus_dred.log: tests/test_opus_dred$(EXEEXT) + @p='tests/test_opus_dred$(EXEEXT)'; \ + b='tests/test_opus_dred'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) .test.log: @p='$<'; \ $(am__set_b); \ @@ -3243,7 +3869,6 @@ tests/test_opus_projection.log: tests/test_opus_projection$(EXEEXT) @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -3330,6 +3955,10 @@ dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) +dist-zstd: distdir + tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst + $(am__post_remove_distdir) + dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @@ -3372,6 +4001,8 @@ distcheck: dist eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ + *.tar.zst*) \ + zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) @@ -3387,7 +4018,7 @@ distcheck: dist $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ @@ -3451,7 +4082,8 @@ installdirs-am: done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive -install-exec: install-exec-recursive +install-exec: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive @@ -3488,6 +4120,12 @@ distclean-generic: -rm -f celt/tests/$(am__dirstamp) -rm -f celt/x86/$(DEPDIR)/$(am__dirstamp) -rm -f celt/x86/$(am__dirstamp) + -rm -f dnn/$(DEPDIR)/$(am__dirstamp) + -rm -f dnn/$(am__dirstamp) + -rm -f dnn/arm/$(DEPDIR)/$(am__dirstamp) + -rm -f dnn/arm/$(am__dirstamp) + -rm -f dnn/x86/$(DEPDIR)/$(am__dirstamp) + -rm -f dnn/x86/$(am__dirstamp) -rm -f doc/$(DEPDIR)/$(am__dirstamp) -rm -f doc/$(am__dirstamp) -rm -f silk/$(DEPDIR)/$(am__dirstamp) @@ -3502,6 +4140,8 @@ distclean-generic: -rm -f silk/fixed/x86/$(am__dirstamp) -rm -f silk/float/$(DEPDIR)/$(am__dirstamp) -rm -f silk/float/$(am__dirstamp) + -rm -f silk/float/x86/$(DEPDIR)/$(am__dirstamp) + -rm -f silk/float/x86/$(am__dirstamp) -rm -f silk/tests/$(DEPDIR)/$(am__dirstamp) -rm -f silk/tests/$(am__dirstamp) -rm -f silk/x86/$(DEPDIR)/$(am__dirstamp) @@ -3557,12 +4197,52 @@ distclean: distclean-recursive -rm -f celt/tests/$(DEPDIR)/test_unit_rotation.Po -rm -f celt/tests/$(DEPDIR)/test_unit_types.Po -rm -f celt/x86/$(DEPDIR)/celt_lpc_sse4_1.Plo + -rm -f celt/x86/$(DEPDIR)/pitch_avx.Plo -rm -f celt/x86/$(DEPDIR)/pitch_sse.Plo -rm -f celt/x86/$(DEPDIR)/pitch_sse2.Plo -rm -f celt/x86/$(DEPDIR)/pitch_sse4_1.Plo -rm -f celt/x86/$(DEPDIR)/vq_sse2.Plo -rm -f celt/x86/$(DEPDIR)/x86_celt_map.Plo -rm -f celt/x86/$(DEPDIR)/x86cpu.Plo + -rm -f dnn/$(DEPDIR)/burg.Plo + -rm -f dnn/$(DEPDIR)/dred_coding.Plo + -rm -f dnn/$(DEPDIR)/dred_decoder.Plo + -rm -f dnn/$(DEPDIR)/dred_encoder.Plo + -rm -f dnn/$(DEPDIR)/dred_rdovae_dec.Plo + -rm -f dnn/$(DEPDIR)/dred_rdovae_dec_data.Plo + -rm -f dnn/$(DEPDIR)/dred_rdovae_enc.Plo + -rm -f dnn/$(DEPDIR)/dred_rdovae_enc_data.Plo + -rm -f dnn/$(DEPDIR)/dred_rdovae_stats_data.Plo + -rm -f dnn/$(DEPDIR)/dump_data.Po + -rm -f dnn/$(DEPDIR)/dump_weights_blob-write_lpcnet_weights.Po + -rm -f dnn/$(DEPDIR)/fargan.Plo + -rm -f dnn/$(DEPDIR)/fargan_data.Plo + -rm -f dnn/$(DEPDIR)/fargan_demo.Po + -rm -f dnn/$(DEPDIR)/freq.Plo + -rm -f dnn/$(DEPDIR)/lace_data.Plo + -rm -f dnn/$(DEPDIR)/lossgen.Po + -rm -f dnn/$(DEPDIR)/lossgen_data.Po + -rm -f dnn/$(DEPDIR)/lossgen_demo.Po + -rm -f dnn/$(DEPDIR)/lpcnet_enc.Plo + -rm -f dnn/$(DEPDIR)/lpcnet_plc.Plo + -rm -f dnn/$(DEPDIR)/lpcnet_tables.Plo + -rm -f dnn/$(DEPDIR)/nndsp.Plo + -rm -f dnn/$(DEPDIR)/nnet.Plo + -rm -f dnn/$(DEPDIR)/nnet_default.Plo + -rm -f dnn/$(DEPDIR)/nolace_data.Plo + -rm -f dnn/$(DEPDIR)/osce.Plo + -rm -f dnn/$(DEPDIR)/osce_features.Plo + -rm -f dnn/$(DEPDIR)/parse_lpcnet_weights.Plo + -rm -f dnn/$(DEPDIR)/pitchdnn.Plo + -rm -f dnn/$(DEPDIR)/pitchdnn_data.Plo + -rm -f dnn/$(DEPDIR)/plc_data.Plo + -rm -f dnn/arm/$(DEPDIR)/arm_dnn_map.Plo + -rm -f dnn/arm/$(DEPDIR)/nnet_dotprod.Plo + -rm -f dnn/arm/$(DEPDIR)/nnet_neon.Plo + -rm -f dnn/x86/$(DEPDIR)/nnet_avx2.Plo + -rm -f dnn/x86/$(DEPDIR)/nnet_sse2.Plo + -rm -f dnn/x86/$(DEPDIR)/nnet_sse4_1.Plo + -rm -f dnn/x86/$(DEPDIR)/x86_dnn_map.Plo -rm -f doc/$(DEPDIR)/trivial_example.Po -rm -f silk/$(DEPDIR)/A2NLSF.Plo -rm -f silk/$(DEPDIR)/CNG.Plo @@ -3700,13 +4380,16 @@ distclean: distclean-recursive -rm -f silk/float/$(DEPDIR)/sort_FLP.Plo -rm -f silk/float/$(DEPDIR)/warped_autocorrelation_FLP.Plo -rm -f silk/float/$(DEPDIR)/wrappers_FLP.Plo + -rm -f silk/float/x86/$(DEPDIR)/inner_product_FLP_avx2.Plo -rm -f silk/tests/$(DEPDIR)/test_unit_LPC_inv_pred_gain.Po + -rm -f silk/x86/$(DEPDIR)/NSQ_del_dec_avx2.Plo -rm -f silk/x86/$(DEPDIR)/NSQ_del_dec_sse4_1.Plo -rm -f silk/x86/$(DEPDIR)/NSQ_sse4_1.Plo -rm -f silk/x86/$(DEPDIR)/VAD_sse4_1.Plo -rm -f silk/x86/$(DEPDIR)/VQ_WMat_EC_sse4_1.Plo -rm -f silk/x86/$(DEPDIR)/x86_silk_map.Plo -rm -f src/$(DEPDIR)/analysis.Plo + -rm -f src/$(DEPDIR)/extensions.Plo -rm -f src/$(DEPDIR)/mapping_matrix.Plo -rm -f src/$(DEPDIR)/mlp.Plo -rm -f src/$(DEPDIR)/mlp_data.Plo @@ -3725,7 +4408,9 @@ distclean: distclean-recursive -rm -f tests/$(DEPDIR)/opus_encode_regressions.Po -rm -f tests/$(DEPDIR)/test_opus_api.Po -rm -f tests/$(DEPDIR)/test_opus_decode.Po + -rm -f tests/$(DEPDIR)/test_opus_dred.Po -rm -f tests/$(DEPDIR)/test_opus_encode.Po + -rm -f tests/$(DEPDIR)/test_opus_extensions.Po -rm -f tests/$(DEPDIR)/test_opus_padding.Po -rm -f tests/$(DEPDIR)/test_opus_projection.Po -rm -f Makefile @@ -3811,12 +4496,52 @@ maintainer-clean: maintainer-clean-recursive -rm -f celt/tests/$(DEPDIR)/test_unit_rotation.Po -rm -f celt/tests/$(DEPDIR)/test_unit_types.Po -rm -f celt/x86/$(DEPDIR)/celt_lpc_sse4_1.Plo + -rm -f celt/x86/$(DEPDIR)/pitch_avx.Plo -rm -f celt/x86/$(DEPDIR)/pitch_sse.Plo -rm -f celt/x86/$(DEPDIR)/pitch_sse2.Plo -rm -f celt/x86/$(DEPDIR)/pitch_sse4_1.Plo -rm -f celt/x86/$(DEPDIR)/vq_sse2.Plo -rm -f celt/x86/$(DEPDIR)/x86_celt_map.Plo -rm -f celt/x86/$(DEPDIR)/x86cpu.Plo + -rm -f dnn/$(DEPDIR)/burg.Plo + -rm -f dnn/$(DEPDIR)/dred_coding.Plo + -rm -f dnn/$(DEPDIR)/dred_decoder.Plo + -rm -f dnn/$(DEPDIR)/dred_encoder.Plo + -rm -f dnn/$(DEPDIR)/dred_rdovae_dec.Plo + -rm -f dnn/$(DEPDIR)/dred_rdovae_dec_data.Plo + -rm -f dnn/$(DEPDIR)/dred_rdovae_enc.Plo + -rm -f dnn/$(DEPDIR)/dred_rdovae_enc_data.Plo + -rm -f dnn/$(DEPDIR)/dred_rdovae_stats_data.Plo + -rm -f dnn/$(DEPDIR)/dump_data.Po + -rm -f dnn/$(DEPDIR)/dump_weights_blob-write_lpcnet_weights.Po + -rm -f dnn/$(DEPDIR)/fargan.Plo + -rm -f dnn/$(DEPDIR)/fargan_data.Plo + -rm -f dnn/$(DEPDIR)/fargan_demo.Po + -rm -f dnn/$(DEPDIR)/freq.Plo + -rm -f dnn/$(DEPDIR)/lace_data.Plo + -rm -f dnn/$(DEPDIR)/lossgen.Po + -rm -f dnn/$(DEPDIR)/lossgen_data.Po + -rm -f dnn/$(DEPDIR)/lossgen_demo.Po + -rm -f dnn/$(DEPDIR)/lpcnet_enc.Plo + -rm -f dnn/$(DEPDIR)/lpcnet_plc.Plo + -rm -f dnn/$(DEPDIR)/lpcnet_tables.Plo + -rm -f dnn/$(DEPDIR)/nndsp.Plo + -rm -f dnn/$(DEPDIR)/nnet.Plo + -rm -f dnn/$(DEPDIR)/nnet_default.Plo + -rm -f dnn/$(DEPDIR)/nolace_data.Plo + -rm -f dnn/$(DEPDIR)/osce.Plo + -rm -f dnn/$(DEPDIR)/osce_features.Plo + -rm -f dnn/$(DEPDIR)/parse_lpcnet_weights.Plo + -rm -f dnn/$(DEPDIR)/pitchdnn.Plo + -rm -f dnn/$(DEPDIR)/pitchdnn_data.Plo + -rm -f dnn/$(DEPDIR)/plc_data.Plo + -rm -f dnn/arm/$(DEPDIR)/arm_dnn_map.Plo + -rm -f dnn/arm/$(DEPDIR)/nnet_dotprod.Plo + -rm -f dnn/arm/$(DEPDIR)/nnet_neon.Plo + -rm -f dnn/x86/$(DEPDIR)/nnet_avx2.Plo + -rm -f dnn/x86/$(DEPDIR)/nnet_sse2.Plo + -rm -f dnn/x86/$(DEPDIR)/nnet_sse4_1.Plo + -rm -f dnn/x86/$(DEPDIR)/x86_dnn_map.Plo -rm -f doc/$(DEPDIR)/trivial_example.Po -rm -f silk/$(DEPDIR)/A2NLSF.Plo -rm -f silk/$(DEPDIR)/CNG.Plo @@ -3954,13 +4679,16 @@ maintainer-clean: maintainer-clean-recursive -rm -f silk/float/$(DEPDIR)/sort_FLP.Plo -rm -f silk/float/$(DEPDIR)/warped_autocorrelation_FLP.Plo -rm -f silk/float/$(DEPDIR)/wrappers_FLP.Plo + -rm -f silk/float/x86/$(DEPDIR)/inner_product_FLP_avx2.Plo -rm -f silk/tests/$(DEPDIR)/test_unit_LPC_inv_pred_gain.Po + -rm -f silk/x86/$(DEPDIR)/NSQ_del_dec_avx2.Plo -rm -f silk/x86/$(DEPDIR)/NSQ_del_dec_sse4_1.Plo -rm -f silk/x86/$(DEPDIR)/NSQ_sse4_1.Plo -rm -f silk/x86/$(DEPDIR)/VAD_sse4_1.Plo -rm -f silk/x86/$(DEPDIR)/VQ_WMat_EC_sse4_1.Plo -rm -f silk/x86/$(DEPDIR)/x86_silk_map.Plo -rm -f src/$(DEPDIR)/analysis.Plo + -rm -f src/$(DEPDIR)/extensions.Plo -rm -f src/$(DEPDIR)/mapping_matrix.Plo -rm -f src/$(DEPDIR)/mlp.Plo -rm -f src/$(DEPDIR)/mlp_data.Plo @@ -3979,7 +4707,9 @@ maintainer-clean: maintainer-clean-recursive -rm -f tests/$(DEPDIR)/opus_encode_regressions.Po -rm -f tests/$(DEPDIR)/test_opus_api.Po -rm -f tests/$(DEPDIR)/test_opus_decode.Po + -rm -f tests/$(DEPDIR)/test_opus_dred.Po -rm -f tests/$(DEPDIR)/test_opus_encode.Po + -rm -f tests/$(DEPDIR)/test_opus_extensions.Po -rm -f tests/$(DEPDIR)/test_opus_padding.Po -rm -f tests/$(DEPDIR)/test_opus_projection.Po -rm -f Makefile @@ -4003,7 +4733,7 @@ uninstall-am: uninstall-libLTLIBRARIES uninstall-local \ uninstall-pkgincludeHEADERS .MAKE: $(am__recursive_targets) all check check-am install install-am \ - install-strip + install-exec install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \ am--depfiles am--refresh check check-TESTS check-am clean \ @@ -4011,7 +4741,7 @@ uninstall-am: uninstall-libLTLIBRARIES uninstall-local \ clean-local clean-noinstLTLIBRARIES clean-noinstPROGRAMS \ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ dist-gzip dist-hook dist-lzip dist-shar dist-tarZ dist-xz \ - dist-zip distcheck distclean distclean-compile \ + dist-zip dist-zstd distcheck distclean distclean-compile \ distclean-generic distclean-hdr distclean-libtool \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ @@ -4113,8 +4843,10 @@ $(CELT_SOURCES_ARM_ASM:%.s=%-gnu.S): $(top_srcdir)/celt/arm/arm2gnu.pl @HAVE_SSE_TRUE@$(SSE_OBJ): CFLAGS += $(OPUS_X86_SSE_CFLAGS) @HAVE_SSE2_TRUE@$(SSE2_OBJ): CFLAGS += $(OPUS_X86_SSE2_CFLAGS) @HAVE_SSE4_1_TRUE@$(SSE4_1_OBJ): CFLAGS += $(OPUS_X86_SSE4_1_CFLAGS) +@HAVE_AVX2_TRUE@$(AVX2_OBJ): CFLAGS += $(OPUS_X86_AVX2_CFLAGS) @HAVE_ARM_NEON_INTR_TRUE@$(ARM_NEON_INTR_OBJ): CFLAGS += \ @HAVE_ARM_NEON_INTR_TRUE@ $(OPUS_ARM_NEON_INTR_CFLAGS) $(NE10_CFLAGS) +@HAVE_ARM_DOTPROD_TRUE@$(ARM_DOTPROD_OBJ): CFLAGS += $(ARM_DOTPROD_INTR_CFLAGS) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/src/libs/opus/Makefile.mips b/src/libs/opus/Makefile.mips index e9bfc22e..8e8f837c 100644 --- a/src/libs/opus/Makefile.mips +++ b/src/libs/opus/Makefile.mips @@ -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_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_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSPADDING_SRCS_C)) OPUSCOMPARE_SRCS_C = src/opus_compare.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 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) $(LINK.o.cmdline) +test_opus_extensions$(EXESUFFIX): $(TESTOPUSEXTENSIONS_OBJS) $(TARGET) + $(LINK.o.cmdline) + test_opus_padding$(EXESUFFIX): $(TESTOPUSPADDING_OBJS) $(TARGET) $(LINK.o.cmdline) @@ -154,8 +160,10 @@ force: clean: rm -f opus_demo$(EXESUFFIX) opus_compare$(EXESUFFIX) $(TARGET) \ 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) \ - $(TESTOPUSDECODE_OBJS) $(TESTOPUSENCODE_OBJS) $(TESTOPUSPADDING_OBJS) + $(TESTOPUSDECODE_OBJS) $(TESTOPUSENCODE_OBJS) \ + $(TESTOPUSEXTENSIONS_OBJS) $(TESTOPUSPADDING_OBJS) .PHONY: all lib clean force check diff --git a/src/libs/opus/Makefile.unix b/src/libs/opus/Makefile.unix index 90a48f0c..5a09194f 100644 --- a/src/libs/opus/Makefile.unix +++ b/src/libs/opus/Makefile.unix @@ -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_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_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSPADDING_SRCS_C)) OPUSCOMPARE_SRCS_C = src/opus_compare.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 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) $(LINK.o.cmdline) +test_opus_extensions$(EXESUFFIX): $(TESTOPUSEXTENSIONS_OBJS) $(TARGET) + $(LINK.o.cmdline) + test_opus_padding$(EXESUFFIX): $(TESTOPUSPADDING_OBJS) $(TARGET) $(LINK.o.cmdline) @@ -152,8 +158,10 @@ force: clean: rm -f opus_demo$(EXESUFFIX) opus_compare$(EXESUFFIX) $(TARGET) \ 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) \ - $(TESTOPUSDECODE_OBJS) $(TESTOPUSENCODE_OBJS) $(TESTOPUSPADDING_OBJS) + $(TESTOPUSDECODE_OBJS) $(TESTOPUSENCODE_OBJS) \ + $(TESTOPUSEXTENSIONS_OBJS) $(TESTOPUSPADDING_OBJS) .PHONY: all lib clean force check diff --git a/src/libs/opus/README b/src/libs/opus/README index 4b13076f..bcf2376d 100644 --- a/src/libs/opus/README +++ b/src/libs/opus/README @@ -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 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 tools should not be used for Opus file distribution: They include additional debugging data and cannot support seeking. @@ -39,6 +39,28 @@ Opus-tools can be found at: or on the main Opus website: 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 == 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 % 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) % sudo make install @@ -133,6 +157,10 @@ To run compare the code to these test vectors: % tar -zxf opus_testvectors-rfc8251.tar.gz % ./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 == This implementation uses floating-point by default but can be compiled to diff --git a/src/libs/opus/aclocal.m4 b/src/libs/opus/aclocal.m4 index 56c7b91f..64459b75 100644 --- a/src/libs/opus/aclocal.m4 +++ b/src/libs/opus/aclocal.m4 @@ -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 # 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_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, -[m4_warning([this file was generated for autoconf 2.69. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],, +[m4_warning([this file was generated for autoconf 2.71. 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. 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 # gives unlimited permission to copy and/or distribute it, @@ -35,7 +35,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.16' 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. -m4_if([$1], [1.16.1], [], +m4_if([$1], [1.16.5], [], [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. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 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_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # 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 # 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 -*- -# 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 # gives unlimited permission to copy and/or distribute it, @@ -130,7 +130,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd` # 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 # 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.]]) 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 # 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 -*- -# 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 # gives unlimited permission to copy and/or distribute it, @@ -391,7 +391,9 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], done if test $am_rc -ne 0; then 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 the package (albeit without support for automatic dependency tracking).]) fi @@ -418,7 +420,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # 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 # 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. AC_DEFUN([AM_INIT_AUTOMAKE], [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 the ones we care about. 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 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 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],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl @@ -534,6 +540,20 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [m4_define([AC_PROG_OBJCXX], 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 dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This @@ -615,7 +635,7 @@ for _am_header in $config_headers :; do done 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 # gives unlimited permission to copy and/or distribute it, @@ -636,7 +656,7 @@ if test x"${install_sh+set}" != xset; then fi 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 # 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 -*- # 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 # 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 -*- -# 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 # 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 -*- -# 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 # 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_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac + MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then @@ -775,7 +790,7 @@ fi # 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 # gives unlimited permission to copy and/or distribute it, @@ -804,7 +819,7 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [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 # gives unlimited permission to copy and/or distribute it, @@ -851,7 +866,7 @@ AC_LANG_POP([C])]) # For backward compatibility. 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 # 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 -*- -# 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 # gives unlimited permission to copy and/or distribute it, @@ -951,7 +966,7 @@ AC_CONFIG_COMMANDS_PRE( 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 # gives unlimited permission to copy and/or distribute it, @@ -1011,7 +1026,7 @@ AC_SUBST([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 # gives unlimited permission to copy and/or distribute it, @@ -1039,7 +1054,7 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 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 # 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 -*- -# 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 # gives unlimited permission to copy and/or distribute it, diff --git a/src/libs/opus/celt/arm/arm_celt_map.c b/src/libs/opus/celt/arm/arm_celt_map.c index ca988b66..cbaea495 100644 --- a/src/libs/opus/celt/arm/arm_celt_map.c +++ b/src/libs/opus/celt/arm/arm_celt_map.c @@ -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, /* EDSP */ 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, @@ -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, /* EDSP */ dual_inner_prod_c, /* Media */ - dual_inner_prod_neon /* NEON */ + dual_inner_prod_neon,/* NEON */ + dual_inner_prod_neon /* DOTPROD */ }; # endif @@ -61,7 +63,8 @@ opus_val32 (*const CELT_PITCH_XCORR_IMPL[OPUS_ARCHMASK+1])(const opus_val16 *, celt_pitch_xcorr_c, /* ARMv4 */ MAY_HAVE_EDSP(celt_pitch_xcorr), /* EDSP */ 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 @@ -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, /* EDSP */ 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 /* FIXED_POINT */ @@ -90,6 +94,7 @@ void (*const XCORR_KERNEL_IMPL[OPUS_ARCHMASK + 1])( xcorr_kernel_c, /* EDSP */ xcorr_kernel_c, /* Media */ xcorr_kernel_neon_fixed, /* Neon */ + xcorr_kernel_neon_fixed /* DOTPROD */ }; #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, /* EDSP */ 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) = { opus_fft_free_arch_c, /* ARMv4 */ opus_fft_free_arch_c, /* EDSP */ 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 */ @@ -118,7 +125,8 @@ void (*const OPUS_FFT[OPUS_ARCHMASK+1])(const kiss_fft_state *cfg, opus_fft_c, /* ARMv4 */ opus_fft_c, /* EDSP */ 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, @@ -127,7 +135,8 @@ void (*const OPUS_IFFT[OPUS_ARCHMASK+1])(const kiss_fft_state *cfg, opus_ifft_c, /* ARMv4 */ opus_ifft_c, /* EDSP */ 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, @@ -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, /* EDSP */ 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, @@ -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, /* EDSP */ 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 */ diff --git a/src/libs/opus/celt/arm/armcpu.c b/src/libs/opus/celt/arm/armcpu.c index c7d16e6d..6785121a 100644 --- a/src/libs/opus/celt/arm/armcpu.c +++ b/src/libs/opus/celt/arm/armcpu.c @@ -43,6 +43,7 @@ #define OPUS_CPU_ARM_EDSP_FLAG (1< -opus_uint32 opus_cpu_capabilities(void) +static opus_uint32 opus_cpu_capabilities(void) { opus_uint32 flags = 0; FILE *cpuinfo; @@ -126,6 +127,14 @@ opus_uint32 opus_cpu_capabilities(void) p = strstr(buf, " neon"); if(p != NULL && (p[5] == ' ' || p[5] == '\n')) 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 @@ -144,10 +153,92 @@ opus_uint32 opus_cpu_capabilities(void) # 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); } return flags; } + +#elif defined(__APPLE__) +#include +#include + +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 + +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 /* 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 @@ -180,7 +271,13 @@ static int opus_select_arch_impl(void) } 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; } diff --git a/src/libs/opus/celt/arm/armcpu.h b/src/libs/opus/celt/arm/armcpu.h index 820262ff..6d5803d8 100644 --- a/src/libs/opus/celt/arm/armcpu.h +++ b/src/libs/opus/celt/arm/armcpu.h @@ -46,6 +46,12 @@ # define MAY_HAVE_NEON(name) MAY_HAVE_MEDIA(name) # 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) # define PRESUME_EDSP(name) name ## _edsp # else @@ -64,6 +70,12 @@ # define PRESUME_NEON(name) PRESUME_MEDIA(name) # 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) int opus_select_arch(void); @@ -71,6 +83,7 @@ int opus_select_arch(void); #define OPUS_ARCH_ARM_EDSP (1) #define OPUS_ARCH_ARM_MEDIA (2) #define OPUS_ARCH_ARM_NEON (3) +#define OPUS_ARCH_ARM_DOTPROD (4) # endif diff --git a/src/libs/opus/celt/arm/celt_neon_intr.c b/src/libs/opus/celt/arm/celt_neon_intr.c index effda769..250f8362 100644 --- a/src/libs/opus/celt/arm/celt_neon_intr.c +++ b/src/libs/opus/celt/arm/celt_neon_intr.c @@ -38,6 +38,8 @@ #include "../pitch.h" #if defined(FIXED_POINT) +#include + void xcorr_kernel_neon_fixed(const opus_val16 * x, const opus_val16 * y, opus_val32 sum[4], int len) { 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); 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] */ 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; y += 8; } - - for (; j < len; j++) - { - int16x4_t x0 = vld1_dup_s16(x); /* load next x */ + if (j + 4 < len) { + /* Load x[0...3] */ + int16x4_t x0 = vld1_s16(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); - - int16x4_t y4 = vld1_dup_s16(y); /* load next y */ - y0 = vext_s16(y0, y4, 1); + int16x4_t y1 = vext_s16(y0, y4, 1); + /* Replace bottom copy of {y[5], y[4]} in y4 with {y[3], y[2]} from y0, + 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; x++; - y++; } - - vst1q_s32(sum, a); + /* Load last x. */ + int16x4_t x0 = vld1_dup_s16(x); + int32x4_t a0 = vmlal_s16(a, y0, x0); + vst1q_s32(sum, a0); } #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 * --------------------------------- diff --git a/src/libs/opus/celt/arm/pitch_neon_intr.c b/src/libs/opus/celt/arm/pitch_neon_intr.c index 35cc46e2..43885f52 100644 --- a/src/libs/opus/celt/arm/pitch_neon_intr.c +++ b/src/libs/opus/celt/arm/pitch_neon_intr.c @@ -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 /* This part of code simulates floating-point NEON operations. */ diff --git a/src/libs/opus/celt/bands.c b/src/libs/opus/celt/bands.c index 5320ffab..6785e08e 100644 --- a/src/libs/opus/celt/bands.c +++ b/src/libs/opus/celt/bands.c @@ -1450,7 +1450,7 @@ void quant_all_bands(int encode, const CELTMode *m, int start, int end, if (encode && resynth) lowband_scratch = _lowband_scratch; 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(Y_save, resynth_alloc, celt_norm); ALLOC(X_save2, resynth_alloc, celt_norm); diff --git a/src/libs/opus/celt/celt.h b/src/libs/opus/celt/celt.h index 24b6b2b5..2f501951 100644 --- a/src/libs/opus/celt/celt.h +++ b/src/libs/opus/celt/celt.h @@ -42,6 +42,10 @@ #include "entdec.h" #include "arch.h" +#ifdef ENABLE_DEEP_PLC +#include "lpcnet.h" +#endif + #ifdef __cplusplus extern "C" { #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_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 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, 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); #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[], 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 #ifdef __cplusplus diff --git a/src/libs/opus/celt/celt_decoder.c b/src/libs/opus/celt/celt_decoder.c index 883dae15..743c2031 100644 --- a/src/libs/opus/celt/celt_decoder.c +++ b/src/libs/opus/celt/celt_decoder.c @@ -51,6 +51,11 @@ #include "celt_lpc.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 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. */ @@ -59,9 +64,6 @@ pitch of 480 Hz. */ #define PLC_PITCH_LAG_MIN (100) -#if defined(SMALL_FOOTPRINT) && defined(FIXED_POINT) -#define NORM_ALIASING_HACK -#endif /**********************************************************************/ /* */ /* DECODER */ @@ -69,6 +71,9 @@ /**********************************************************************/ #define DECODE_BUFFER_SIZE 2048 +#define PLC_UPDATE_FRAMES 4 +#define PLC_UPDATE_SAMPLES (PLC_UPDATE_FRAMES*FRAME_SIZE) + /** Decoder state @brief Decoder state */ @@ -82,6 +87,7 @@ struct OpusCustomDecoder { int start, end; int signalling; int disable_inv; + int complexity; int arch; /* Everything beyond this point gets cleared on a reset */ @@ -98,11 +104,18 @@ struct OpusCustomDecoder { opus_val16 postfilter_gain_old; int postfilter_tapset; int postfilter_tapset_old; + int prefilter_and_fold; 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) */ - /* opus_val16 lpc[], Size = channels*LPC_ORDER */ + /* opus_val16 lpc[], Size = channels*CELT_LPC_ORDER */ /* opus_val16 oldEBands[], Size = 2*mode->nbEBands */ /* opus_val16 oldLogE[], 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) + (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); return size; } @@ -499,7 +512,100 @@ static int celt_plc_pitch_search(celt_sig *decode_mem[2], int C, int arch) 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 (++cpostfilter_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;iwindow[i], etmp[overlap-1-i]) + + MULT16_32_Q15(mode->window[overlap-i-1], etmp[i]); + } + } while (++cfec_read_pos; + tmp_fec_skip = lpcnet->fec_skip; + for (i=0;ifec_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 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; } while (++c_decode_mem+(DECODE_BUFFER_SIZE+overlap)*C); - oldBandE = lpc+C*LPC_ORDER; + oldBandE = lpc+C*CELT_LPC_ORDER; oldLogE = oldBandE + 2*nbEBands; oldLogE2 = oldLogE + 2*nbEBands; backgroundLogE = oldLogE2 + 2*nbEBands; loss_duration = st->loss_duration; 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; +#endif if (noise_based) { /* Noise-based PLC/CNG */ -#ifdef NORM_ALIASING_HACK - celt_norm *X; -#else VARDECL(celt_norm, X); -#endif opus_uint32 seed; int end; int effEnd; @@ -550,18 +656,16 @@ static void celt_decode_lost(CELTDecoder * OPUS_RESTRICT st, int N, int LM) end = st->end; 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 */ -#endif c=0; do { OPUS_MOVE(decode_mem[c], decode_mem[c]+N, - DECODE_BUFFER_SIZE-N+(overlap>>1)); + DECODE_BUFFER_SIZE-N+overlap); } while (++cprefilter_and_fold) { + prefilter_and_fold(st, N); + } + /* Energy decay */ decay = loss_duration==0 ? QCONST16(1.5f, DB_SHIFT) : QCONST16(.5f, DB_SHIFT); c=0; do @@ -590,6 +694,9 @@ static void celt_decode_lost(CELTDecoder * OPUS_RESTRICT st, int N, int LM) st->rng = seed; 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 { int exc_length; /* 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 fade = Q15ONE; int pitch_index; - VARDECL(opus_val32, etmp); VARDECL(opus_val16, _exc); VARDECL(opus_val16, fir_tmp); 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); } else { 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. */ exc_length = IMIN(2*pitch_index, MAX_PERIOD); - ALLOC(etmp, overlap, opus_val32); - ALLOC(_exc, MAX_PERIOD+LPC_ORDER, opus_val16); + ALLOC(_exc, MAX_PERIOD+CELT_LPC_ORDER, opus_val16); ALLOC(fir_tmp, exc_length, opus_val16); - exc = _exc+LPC_ORDER; + exc = _exc+CELT_LPC_ORDER; window = mode->window; c=0; do { opus_val16 decay; @@ -628,16 +736,16 @@ static void celt_decode_lost(CELTDecoder * OPUS_RESTRICT st, int N, int LM) int j; buf = decode_mem[c]; - for (i=0;iarch); + CELT_LPC_ORDER, MAX_PERIOD, st->arch); /* Add a noise floor of -40 dB. */ #ifdef FIXED_POINT 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; #endif /* 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));*/ #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; #endif } - _celt_lpc(lpc+c*LPC_ORDER, ac, LPC_ORDER); + _celt_lpc(lpc+c*CELT_LPC_ORDER, ac, CELT_LPC_ORDER); #ifdef FIXED_POINT /* For fixed-point, apply bandwidth expansion until we can guarantee that 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) { opus_val16 tmp=Q15ONE; opus_val32 sum=QCONST16(1., SIG_SHIFT); - for (i=0;iarch); + celt_fir(exc+MAX_PERIOD-exc_length, lpc+c*CELT_LPC_ORDER, + fir_tmp, exc_length, CELT_LPC_ORDER, st->arch); 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); } { - opus_val16 lpc_mem[LPC_ORDER]; + opus_val16 lpc_mem[CELT_LPC_ORDER]; /* Copy the last decoded samples (prior to the overlap region) to synthesis filter memory so we can have a continuous signal. */ - for (i=0;iarch); #ifdef FIXED_POINT 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;iloaded && (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 (++cplc_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;iplc_preemphasis_mem; + st->plc_preemphasis_mem = tmp; + } + overlap_mem = st->plc_preemphasis_mem; + for (i=0;iprefilter_and_fold = 1; } /* 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; } -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) +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 c, i, N; int spread_decision; opus_int32 bits; ec_dec _dec; -#ifdef NORM_ALIASING_HACK - celt_norm *X; -#else VARDECL(celt_norm, X); -#endif VARDECL(int, fine_quant); VARDECL(int, pulses); VARDECL(int, cap); @@ -881,7 +1031,7 @@ int celt_decode_with_ec(CELTDecoder * OPUS_RESTRICT st, const unsigned char *dat frame_size *= st->downsample; 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; oldLogE2 = oldLogE + 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) { - 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); RESTORE_STACK; 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 * 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) { @@ -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) */ 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;iprefilter_and_fold) { + prefilter_and_fold(st, N); + } celt_synthesis(mode, X, out_syn, oldBandE, start, effEnd, 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); st->loss_duration = 0; + st->prefilter_and_fold = 0; RESTORE_STACK; if (ec_tell(dec) > 8*len) 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; } +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 @@ -1254,6 +1450,26 @@ int opus_custom_decoder_ctl(CELTDecoder * OPUS_RESTRICT st, int request, ...) va_start(ap, 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: { 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; opus_val16 *lpc, *oldBandE, *oldLogE, *oldLogE2; 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; oldLogE2 = oldLogE + 2*st->mode->nbEBands; OPUS_CLEAR((char*)&st->DECODER_RESET_START, diff --git a/src/libs/opus/celt/celt_encoder.c b/src/libs/opus/celt/celt_encoder.c index 637d442c..7f32a801 100644 --- a/src/libs/opus/celt/celt_encoder.c +++ b/src/libs/opus/celt/celt_encoder.c @@ -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) */ for (i=0;i 50 && LM>=1 && !lfe) + /* Make sure that dynamic allocation can't make us bust the budget. + 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; c=0;do @@ -1042,30 +1057,38 @@ static opus_val16 dynalloc_analysis(const opus_val16 *bandLogE, const opus_val16 opus_val16 offset; opus_val16 tmp; 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 bandLogE2[c*nbEBands+i-1]+QCONST16(.5f,DB_SHIFT)) + if (bandLogE3[i] > bandLogE3[i-1]+QCONST16(.5f,DB_SHIFT)) 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--) - 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. The "offset" value controls how conservative we are -- a higher offset reduces the impact of the median filter and makes dynalloc use more bits. */ offset = QCONST16(1.f, DB_SHIFT); for (i=2;ibitrate*frame_size; if (tell>1) - tmp += tell; + tmp += tell*mode->Fs; if (st->bitrate!=OPUS_BITRATE_MAX) + { nbCompressedBytes = IMAX(2, IMIN(nbCompressedBytes, (tmp+4*mode->Fs)/(8*mode->Fs)-!!st->signalling)); + ec_enc_shrink(enc, nbCompressedBytes); + } effectiveBytes = nbCompressedBytes - nbFilledBytes; } 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(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, 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) { 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 { @@ -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); 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, - mode->window, overlap); + mode->window, overlap, st->arch); if (LM!=0) 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, - mode->window, overlap); + mode->window, overlap, st->arch); } while (++cupsample, 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_gain_old = st->prefilter_gain; st->prefilter_tapset_old = st->prefilter_tapset; diff --git a/src/libs/opus/celt/celt_lpc.c b/src/libs/opus/celt/celt_lpc.c index f91721bc..fabca65c 100644 --- a/src/libs/opus/celt/celt_lpc.c +++ b/src/libs/opus/celt/celt_lpc.c @@ -44,7 +44,7 @@ int p opus_val32 r; opus_val32 error = ac[0]; #ifdef FIXED_POINT - opus_val32 lpc[LPC_ORDER]; + opus_val32 lpc[CELT_LPC_ORDER]; #else float *lpc = _lpc; #endif @@ -158,7 +158,17 @@ void celt_fir_c( sum[1] = SHL32(EXTEND32(x[i+1]), SIG_SHIFT); sum[2] = SHL32(EXTEND32(x[i+2]), 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+1] = SROUND16(sum[1], 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[2]=_x[i+2]; 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 */ y[i+ord ] = -SROUND16(sum[0],SIG_SHIFT); _y[i ] = sum[0]; diff --git a/src/libs/opus/celt/celt_lpc.h b/src/libs/opus/celt/celt_lpc.h index a4c5fd6e..97dee82f 100644 --- a/src/libs/opus/celt/celt_lpc.h +++ b/src/libs/opus/celt/celt_lpc.h @@ -35,7 +35,7 @@ #include "x86/celt_lpc_sse.h" #endif -#define LPC_ORDER 24 +#define CELT_LPC_ORDER 24 void _celt_lpc(opus_val16 *_lpc, const opus_val32 *ac, int p); diff --git a/src/libs/opus/celt/cpu_support.h b/src/libs/opus/celt/cpu_support.h index 7b5c56ca..9f13d8ae 100644 --- a/src/libs/opus/celt/cpu_support.h +++ b/src/libs/opus/celt/cpu_support.h @@ -35,19 +35,20 @@ (defined(OPUS_ARM_ASM) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR)) #include "arm/armcpu.h" -/* We currently support 4 ARM variants: +/* We currently support 5 ARM variants: * arch[0] -> ARMv4 * arch[1] -> ARMv5E * arch[2] -> ARMv6 * arch[3] -> NEON + * arch[4] -> NEON+DOTPROD */ -#define OPUS_ARCHMASK 3 +#define OPUS_ARCHMASK 7 #elif 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_AVX) && !defined(OPUS_X86_PRESUME_AVX))) + (defined(OPUS_X86_MAY_HAVE_AVX2) && !defined(OPUS_X86_PRESUME_AVX2))) #include "x86/x86cpu.h" /* We currently support 5 x86 variants: diff --git a/src/libs/opus/celt/entdec.c b/src/libs/opus/celt/entdec.c index 0b3433ed..027aa24b 100644 --- a/src/libs/opus/celt/entdec.c +++ b/src/libs/opus/celt/entdec.c @@ -195,6 +195,27 @@ int ec_dec_icdf(ec_dec *_this,const unsigned char *_icdf,unsigned _ftb){ 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(dval=d-s; + _this->rng=t-s; + ec_dec_normalize(_this); + return ret; +} + opus_uint32 ec_dec_uint(ec_dec *_this,opus_uint32 _ft){ unsigned ft; unsigned s; diff --git a/src/libs/opus/celt/entdec.h b/src/libs/opus/celt/entdec.h index 025fc187..c81f26fd 100644 --- a/src/libs/opus/celt/entdec.h +++ b/src/libs/opus/celt/entdec.h @@ -81,6 +81,16 @@ int ec_dec_bit_logp(ec_dec *_this,unsigned _logp); Return: The decoded symbol s.*/ 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. The bits must have been encoded with ec_enc_uint(). No call to ec_dec_update() is necessary after this call. diff --git a/src/libs/opus/celt/entenc.c b/src/libs/opus/celt/entenc.c index f1750d25..69c6f835 100644 --- a/src/libs/opus/celt/entenc.c +++ b/src/libs/opus/celt/entenc.c @@ -172,6 +172,17 @@ void ec_enc_icdf(ec_enc *_this,int _s,const unsigned char *_icdf,unsigned _ftb){ 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){ unsigned ft; unsigned fl; diff --git a/src/libs/opus/celt/entenc.h b/src/libs/opus/celt/entenc.h index f502eaf6..010874bb 100644 --- a/src/libs/opus/celt/entenc.h +++ b/src/libs/opus/celt/entenc.h @@ -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.*/ 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. _fl: The integer to encode. _ft: The number of integers that can be encoded (one more than the max). diff --git a/src/libs/opus/celt/laplace.c b/src/libs/opus/celt/laplace.c index a7bca874..21809666 100644 --- a/src/libs/opus/celt/laplace.c +++ b/src/libs/opus/celt/laplace.c @@ -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); 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 +#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 #include -/** 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 static OPUS_INLINE void *opus_alloc (size_t size) { @@ -49,7 +49,15 @@ static OPUS_INLINE void *opus_alloc (size_t size) } #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 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 -/** 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 static OPUS_INLINE void opus_free (void *ptr) { diff --git a/src/libs/opus/celt/pitch.c b/src/libs/opus/celt/pitch.c index 7998db41..e33c60a3 100644 --- a/src/libs/opus/celt/pitch.c +++ b/src/libs/opus/celt/pitch.c @@ -262,7 +262,16 @@ celt_pitch_xcorr_c(const opus_val16 *_x, const opus_val16 *_y, for (i=0;iHW_SSE = (info[3] & (1 << 25)) != 0; cpu_feature->HW_SSE2 = (info[3] & (1 << 26)) != 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 { cpu_feature->HW_SSE = 0; cpu_feature->HW_SSE2 = 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++; - if (!cpu_feature.HW_AVX) + if (!cpu_feature.HW_AVX2) { return arch; } diff --git a/src/libs/opus/celt/x86/x86cpu.h b/src/libs/opus/celt/x86/x86cpu.h index 04e80489..1e5b6a4c 100644 --- a/src/libs/opus/celt/x86/x86cpu.h +++ b/src/libs/opus/celt/x86/x86cpu.h @@ -46,28 +46,67 @@ # define MAY_HAVE_SSE4_1(name) name ## _c # endif -# if defined(OPUS_X86_MAY_HAVE_AVX) -# define MAY_HAVE_AVX(name) name ## _avx +# if defined(OPUS_X86_MAY_HAVE_AVX2) +# define MAY_HAVE_AVX2(name) name ## _avx2 # else -# define MAY_HAVE_AVX(name) name ## _c +# define MAY_HAVE_AVX2(name) name ## _c # 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); # endif +# if defined(OPUS_X86_MAY_HAVE_SSE2) +# include "opus_defines.h" + /*MOVD should not impose any alignment restrictions, but the C standard does, and UBSan will report errors if we actually make unaligned accesses. Use this to work around those restrictions (which should hopefully all get - optimized to a single MOVD instruction).*/ -#define OP_LOADU_EPI32(x) \ - (int)((*(unsigned char *)(x) | *((unsigned char *)(x) + 1) << 8U |\ - *((unsigned char *)(x) + 2) << 16U | (opus_uint32)*((unsigned char *)(x) + 3) << 24U)) + optimized to a single MOVD instruction). + GCC implemented _mm_loadu_si32() since GCC 11; HOWEVER, there is a bug! + https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99754 + 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 + ).*/ +# 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 +# include -#define OP_CVTEPI8_EPI32_M32(x) \ - (_mm_cvtepi8_epi32(_mm_cvtsi32_si128(OP_LOADU_EPI32(x)))) +# ifdef _mm_loadu_si32 +# 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 +# endif -#define OP_CVTEPI16_EPI32_M64(x) \ - (_mm_cvtepi16_epi32(_mm_loadl_epi64((__m128i *)(x)))) +# define OP_CVTEPI8_EPI32_M32(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 diff --git a/src/libs/opus/celt_headers.mk b/src/libs/opus/celt_headers.mk index 706185da..94a65573 100644 --- a/src/libs/opus/celt_headers.mk +++ b/src/libs/opus/celt_headers.mk @@ -50,4 +50,5 @@ celt/mips/pitch_mipsr1.h \ celt/mips/vq_mipsr1.h \ celt/x86/pitch_sse.h \ celt/x86/vq_sse.h \ +celt/x86/x86_arch_macros.h \ celt/x86/x86cpu.h diff --git a/src/libs/opus/celt_sources.mk b/src/libs/opus/celt_sources.mk index d6b6765b..6b73d48e 100644 --- a/src/libs/opus/celt_sources.mk +++ b/src/libs/opus/celt_sources.mk @@ -33,6 +33,9 @@ CELT_SOURCES_SSE4_1 = \ celt/x86/celt_lpc_sse4_1.c \ celt/x86/pitch_sse4_1.c +CELT_SOURCES_AVX2 = \ +celt/x86/pitch_avx.c + CELT_SOURCES_ARM_RTCD = \ celt/arm/armcpu.c \ celt/arm/arm_celt_map.c diff --git a/src/libs/opus/cmake/OpusConfig.cmake b/src/libs/opus/cmake/OpusConfig.cmake index b82307a1..9fd814cb 100644 --- a/src/libs/opus/cmake/OpusConfig.cmake +++ b/src/libs/opus/cmake/OpusConfig.cmake @@ -102,7 +102,10 @@ if(MINGW) 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) include(CheckCCompilerFlag) foreach(WARNING_FLAG ${WARNING_LIST}) diff --git a/src/libs/opus/cmake/OpusFunctions.cmake b/src/libs/opus/cmake/OpusFunctions.cmake index 3f22ad81..a265c47f 100644 --- a/src/libs/opus/cmake/OpusFunctions.cmake +++ b/src/libs/opus/cmake/OpusFunctions.cmake @@ -47,10 +47,12 @@ function(check_flag NAME FLAG) endfunction() 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 -# system is guaranteed to have SSE support then OPUS_PRESUME_SSE can be used to -# skip SSE runtime check + +# This function determines if the compiler has support for SSE, SSE2, SSE4.1, AVX, +# AVX2 and FMA. Should the target systems potentially lack SSE support, the +# 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) message(STATUS "Check SIMD support by compiler") check_include_file(xmmintrin.h HAVE_XMMINTRIN_H) # SSE1 @@ -111,20 +113,20 @@ function(opus_detect_sse COMPILER_SUPPORT_SIMD) PARENT_SCOPE) endif() - check_include_file(immintrin.h HAVE_IMMINTRIN_H) # AVX + check_include_file(immintrin.h HAVE_IMMINTRIN_H) # AVX2 if(HAVE_IMMINTRIN_H) if(MSVC) - check_flag(AVX /arch:AVX) + check_flag(AVX2 /arch:AVX2) else() - check_flag(AVX -mavx) + check_flag(AVX2 -mavx2 -mfma -mavx) endif() else() - set(AVX_SUPPORTED + set(AVX2_SUPPORTED 0 PARENT_SCOPE) 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) else() 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) message( FATAL_ERROR - "No files parsed succesfully from ${SOURCE_GROUP} in ${MAKE_FILE}") + "No files parsed successfully from ${SOURCE_GROUP} in ${MAKE_FILE}") endif() # remove trailing whitespaces diff --git a/src/libs/opus/cmake/OpusSources.cmake b/src/libs/opus/cmake/OpusSources.cmake index b47f8c69..0cf24557 100644 --- a/src/libs/opus/cmake/OpusSources.cmake +++ b/src/libs/opus/cmake/OpusSources.cmake @@ -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_FIXED_SSE4_1 silk_sources.mk 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_NEON_INTR silk_sources.mk 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_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_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_ASM celt_sources.mk celt_sources_arm_asm) 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) 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_custom_demo_SOURCES Makefile.am opus_custom_demo_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_encode_SOURCES Makefile.am 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 test_opus_decode_sources) get_opus_sources(tests_test_opus_padding_SOURCES Makefile.am test_opus_padding_sources) +get_opus_sources(tests_test_opus_dred_SOURCES Makefile.am + test_opus_dred_sources) diff --git a/src/libs/opus/compile b/src/libs/opus/compile index 99e50524..df363c8f 100755 --- a/src/libs/opus/compile +++ b/src/libs/opus/compile @@ -3,7 +3,7 @@ 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 . # # This program is free software; you can redistribute it and/or modify @@ -53,7 +53,7 @@ func_file_conv () MINGW*) file_conv=mingw ;; - CYGWIN*) + CYGWIN* | MSYS*) file_conv=cygwin ;; *) @@ -67,7 +67,7 @@ func_file_conv () mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; - cygwin/*) + cygwin/* | msys/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) diff --git a/src/libs/opus/config.guess b/src/libs/opus/config.guess index f50dcdb6..7f76b622 100755 --- a/src/libs/opus/config.guess +++ b/src/libs/opus/config.guess @@ -1,12 +1,14 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2018 Free Software Foundation, Inc. +# Copyright 1992-2022 Free Software Foundation, Inc. -timestamp='2018-02-24' +# shellcheck disable=SC2006,SC2268 # see below for rationale + +timestamp='2022-01-09' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or +# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -27,11 +29,19 @@ timestamp='2018-02-24' # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess # # Please send patches to . +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + + me=`echo "$0" | sed -e 's,.*/,,'` usage="\ @@ -50,7 +60,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2018 Free Software Foundation, Inc. +Copyright 1992-2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -84,7 +94,8 @@ if test $# != 0; then exit 1 fi -trap 'exit 1' 1 2 15 +# Just in case it came from the environment. +GUESS= # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires @@ -96,73 +107,90 @@ trap 'exit 1' 1 2 15 # Portable tmp directory creation inspired by the Autoconf team. -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > "$dummy.c" ; - for c in cc gcc c89 c99 ; do - if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' +tmp= +# shellcheck disable=SC2172 +trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 + +set_cc_for_build() { + # prevent multiple calls if $tmp is already set + test "$tmp" && return 0 + : "${TMPDIR=/tmp}" + # shellcheck disable=SC2039,SC3028 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } + dummy=$tmp/dummy + case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in + ,,) echo "int x;" > "$dummy.c" + for driver in cc gcc c89 c99 ; do + if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD=$driver + break + fi + done + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; + esac +} # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then +if test -f /.attbin/uname ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -case "$UNAME_SYSTEM" in +case $UNAME_SYSTEM in Linux|GNU|GNU/*) - # If the system lacks a compiler, then just pick glibc. - # We could probably try harder. - LIBC=gnu + LIBC=unknown - eval "$set_cc_for_build" + set_cc_for_build cat <<-EOF > "$dummy.c" #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc - #else + #elif defined(__GLIBC__) LIBC=gnu + #else + #include + /* First heuristic to detect musl libc. */ + #ifdef __DEFINED_va_list + LIBC=musl + #endif #endif EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + eval "$cc_set_libc" - # If ldd exists, use it to detect musl libc. - if command -v ldd >/dev/null && \ - ldd --version 2>&1 | grep -q ^musl - then - LIBC=musl + # Second heuristic to detect musl libc. + if [ "$LIBC" = unknown ] && + command -v ldd >/dev/null && + ldd --version 2>&1 | grep -q ^musl; then + LIBC=musl + fi + + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + if [ "$LIBC" = unknown ]; then + LIBC=gnu fi ;; esac # Note: order is significant - the case branches are not exclusive. -case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in +case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, @@ -174,12 +202,12 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ - "/sbin/$sysctl" 2>/dev/null || \ - "/usr/sbin/$sysctl" 2>/dev/null || \ + /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ echo unknown)` - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in + aarch64eb) machine=aarch64_be-unknown ;; armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; @@ -188,18 +216,18 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in earmv*) arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` - machine="${arch}${endian}"-unknown + machine=${arch}${endian}-unknown ;; - *) machine="$UNAME_MACHINE_ARCH"-unknown ;; + *) machine=$UNAME_MACHINE_ARCH-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently (or will in the future) and ABI. - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in earm*) os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval "$set_cc_for_build" + set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then @@ -215,7 +243,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in ;; esac # Determine ABI tags. - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` @@ -226,7 +254,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. - case "$UNAME_VERSION" in + case $UNAME_VERSION in Debian*) release='-gnu' ;; @@ -237,45 +265,57 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "$machine-${os}${release}${abi}" - exit ;; + GUESS=$machine-${os}${release}${abi-} + ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE + ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE + ;; + *:SecBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE + ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE + ;; *:MidnightBSD:*:*) - echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE + ;; *:ekkoBSD:*:*) - echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE + ;; *:SolidBSD:*:*) - echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE + ;; + *:OS108:*:*) + GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE + ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE + ;; *:MirBSD:*:*) - echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE + ;; *:Sortix:*:*) - echo "$UNAME_MACHINE"-unknown-sortix - exit ;; + GUESS=$UNAME_MACHINE-unknown-sortix + ;; + *:Twizzler:*:*) + GUESS=$UNAME_MACHINE-unknown-twizzler + ;; *:Redox:*:*) - echo "$UNAME_MACHINE"-unknown-redox - exit ;; + GUESS=$UNAME_MACHINE-unknown-redox + ;; mips:OSF1:*.*) - echo mips-dec-osf1 - exit ;; + GUESS=mips-dec-osf1 + ;; alpha:OSF1:*:*) + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + trap '' 0 case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` @@ -289,7 +329,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in + case $ALPHA_CPU_TYPE in "EV4 (21064)") UNAME_MACHINE=alpha ;; "EV4.5 (21064)") @@ -326,117 +366,121 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. - exitcode=$? - trap '' 0 - exit $exitcode ;; + OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + GUESS=$UNAME_MACHINE-dec-osf$OSF_REL + ;; Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; + GUESS=m68k-unknown-sysv4 + ;; *:[Aa]miga[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-amigaos - exit ;; + GUESS=$UNAME_MACHINE-unknown-amigaos + ;; *:[Mm]orph[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-morphos - exit ;; + GUESS=$UNAME_MACHINE-unknown-morphos + ;; *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; + GUESS=i370-ibm-openedition + ;; *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; + GUESS=s390-ibm-zvmoe + ;; *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; + GUESS=powerpc-ibm-os400 + ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix"$UNAME_RELEASE" - exit ;; + GUESS=arm-acorn-riscix$UNAME_RELEASE + ;; arm*:riscos:*:*|arm*:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; + GUESS=arm-unknown-riscos + ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; + GUESS=hppa1.1-hitachi-hiuxmpp + ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; + case `(/bin/universe) 2>/dev/null` in + att) GUESS=pyramid-pyramid-sysv3 ;; + *) GUESS=pyramid-pyramid-bsd ;; + esac + ;; NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; + GUESS=pyramid-pyramid-svr4 + ;; DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; + GUESS=sparc-icl-nx6 + ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; + sparc) GUESS=sparc-icl-nx7 ;; + esac + ;; s390x:SunOS:*:*) - echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL + ;; sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-hal-solaris2$SUN_REL + ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-sun-solaris2$SUN_REL + ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux"$UNAME_RELEASE" - exit ;; + GUESS=i386-pc-auroraux$UNAME_RELEASE + ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval "$set_cc_for_build" + set_cc_for_build SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH=x86_64 fi fi - echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=$SUN_ARCH-pc-solaris2$SUN_REL + ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-sun-solaris3$SUN_REL + ;; sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in + case `/usr/bin/arch -k` in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` + GUESS=sparc-sun-sunos$SUN_REL + ;; sun3*:SunOS:*:*) - echo m68k-sun-sunos"$UNAME_RELEASE" - exit ;; + GUESS=m68k-sun-sunos$UNAME_RELEASE + ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 - case "`/bin/arch`" in + case `/bin/arch` in sun3) - echo m68k-sun-sunos"$UNAME_RELEASE" + GUESS=m68k-sun-sunos$UNAME_RELEASE ;; sun4) - echo sparc-sun-sunos"$UNAME_RELEASE" + GUESS=sparc-sun-sunos$UNAME_RELEASE ;; esac - exit ;; + ;; aushp:SunOS:*:*) - echo sparc-auspex-sunos"$UNAME_RELEASE" - exit ;; + GUESS=sparc-auspex-sunos$UNAME_RELEASE + ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor @@ -446,43 +490,43 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-milan-mint$UNAME_RELEASE + ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-hades-mint$UNAME_RELEASE + ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-unknown-mint$UNAME_RELEASE + ;; m68k:machten:*:*) - echo m68k-apple-machten"$UNAME_RELEASE" - exit ;; + GUESS=m68k-apple-machten$UNAME_RELEASE + ;; powerpc:machten:*:*) - echo powerpc-apple-machten"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-apple-machten$UNAME_RELEASE + ;; RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; + GUESS=mips-dec-mach_bsd4.3 + ;; RISC*:ULTRIX:*:*) - echo mips-dec-ultrix"$UNAME_RELEASE" - exit ;; + GUESS=mips-dec-ultrix$UNAME_RELEASE + ;; VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix"$UNAME_RELEASE" - exit ;; + GUESS=vax-dec-ultrix$UNAME_RELEASE + ;; 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix"$UNAME_RELEASE" - exit ;; + GUESS=clipper-intergraph-clix$UNAME_RELEASE + ;; mips:*:*:UMIPS | mips:*:*:RISCos) - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ @@ -508,78 +552,79 @@ EOF dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos"$UNAME_RELEASE" - exit ;; + GUESS=mips-mips-riscos$UNAME_RELEASE + ;; Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; + GUESS=powerpc-motorola-powermax + ;; Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; + GUESS=powerpc-harris-powermax + ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; + GUESS=powerpc-harris-powermax + ;; Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; + GUESS=powerpc-harris-powerunix + ;; m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; + GUESS=m88k-harris-cxux7 + ;; m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; + GUESS=m88k-motorola-sysv4 + ;; m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; + GUESS=m88k-motorola-sysv3 + ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] + if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 then - if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ - [ "$TARGET_BINARY_INTERFACE"x = x ] + if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ + test "$TARGET_BINARY_INTERFACE"x = x then - echo m88k-dg-dgux"$UNAME_RELEASE" + GUESS=m88k-dg-dgux$UNAME_RELEASE else - echo m88k-dg-dguxbcs"$UNAME_RELEASE" + GUESS=m88k-dg-dguxbcs$UNAME_RELEASE fi else - echo i586-dg-dgux"$UNAME_RELEASE" + GUESS=i586-dg-dgux$UNAME_RELEASE fi - exit ;; + ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; + GUESS=m88k-dolphin-sysv3 + ;; M88*:*:R3*:*) # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; + GUESS=m88k-motorola-sysv3 + ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; + GUESS=m88k-tektronix-sysv3 + ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; + GUESS=m68k-tektronix-bsd + ;; *:IRIX*:*:*) - echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" - exit ;; + IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` + GUESS=mips-sgi-irix$IRIX_REL + ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id + ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; + GUESS=i386-ibm-aix + ;; ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then + if test -x /usr/bin/oslevel ; then IBM_REV=`/usr/bin/oslevel` else - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi - echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" - exit ;; + GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV + ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include @@ -593,16 +638,16 @@ EOF EOF if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then - echo "$SYSTEM_NAME" + GUESS=$SYSTEM_NAME else - echo rs6000-ibm-aix3.2.5 + GUESS=rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 + GUESS=rs6000-ibm-aix3.2.4 else - echo rs6000-ibm-aix3.2 + GUESS=rs6000-ibm-aix3.2 fi - exit ;; + ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then @@ -610,57 +655,57 @@ EOF else IBM_ARCH=powerpc fi - if [ -x /usr/bin/lslpp ] ; then - IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + if test -x /usr/bin/lslpp ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi - echo "$IBM_ARCH"-ibm-aix"$IBM_REV" - exit ;; + GUESS=$IBM_ARCH-ibm-aix$IBM_REV + ;; *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; + GUESS=rs6000-ibm-aix + ;; ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) - echo romp-ibm-bsd4.4 - exit ;; + GUESS=romp-ibm-bsd4.4 + ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 + GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to + ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; + GUESS=rs6000-bull-bosx + ;; DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; + GUESS=m68k-bull-sysv3 + ;; 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; + GUESS=m68k-hp-bsd + ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; + GUESS=m68k-hp-bsd4.4 + ;; 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` - case "$UNAME_MACHINE" in + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` + case $UNAME_MACHINE in 9000/31?) HP_ARCH=m68000 ;; 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then + if test -x /usr/bin/getconf; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "$sc_cpu_version" in + case $sc_cpu_version in 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 - case "$sc_kernel_bits" in + case $sc_kernel_bits in 32) HP_ARCH=hppa2.0n ;; 64) HP_ARCH=hppa2.0w ;; '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi - if [ "$HP_ARCH" = "" ]; then - eval "$set_cc_for_build" + if test "$HP_ARCH" = ""; then + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE @@ -698,9 +743,9 @@ EOF test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if [ "$HP_ARCH" = hppa2.0w ] + if test "$HP_ARCH" = hppa2.0w then - eval "$set_cc_for_build" + set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler @@ -719,14 +764,14 @@ EOF HP_ARCH=hppa64 fi fi - echo "$HP_ARCH"-hp-hpux"$HPUX_REV" - exit ;; + GUESS=$HP_ARCH-hp-hpux$HPUX_REV + ;; ia64:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux"$HPUX_REV" - exit ;; + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` + GUESS=ia64-hp-hpux$HPUX_REV + ;; 3050*:HI-UX:*:*) - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include int @@ -754,36 +799,36 @@ EOF EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; + GUESS=unknown-hitachi-hiuxwe2 + ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) - echo hppa1.1-hp-bsd - exit ;; + GUESS=hppa1.1-hp-bsd + ;; 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; + GUESS=hppa1.0-hp-bsd + ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; + GUESS=hppa1.0-hp-mpeix + ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) - echo hppa1.1-hp-osf - exit ;; + GUESS=hppa1.1-hp-osf + ;; hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; + GUESS=hppa1.0-hp-osf + ;; i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo "$UNAME_MACHINE"-unknown-osf1mk + if test -x /usr/sbin/sysversion ; then + GUESS=$UNAME_MACHINE-unknown-osf1mk else - echo "$UNAME_MACHINE"-unknown-osf1 + GUESS=$UNAME_MACHINE-unknown-osf1 fi - exit ;; + ;; parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; + GUESS=hppa1.1-hp-lites + ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; + GUESS=c1-convex-bsd + ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd @@ -791,17 +836,18 @@ EOF fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; + GUESS=c34-convex-bsd + ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; + GUESS=c38-convex-bsd + ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; + GUESS=c4-convex-bsd + ;; CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=ymp-cray-unicos$CRAY_REL + ;; CRAY*[A-Z]90:*:*:*) echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ @@ -809,103 +855,129 @@ EOF -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) - echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=t90-cray-unicos$CRAY_REL + ;; CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=alphaev5-cray-unicosmk$CRAY_REL + ;; CRAY*SV1:*:*:*) - echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=sv1-cray-unicos$CRAY_REL + ;; *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=craynv-cray-unicosmp$CRAY_REL + ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE + ;; sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=sparc-unknown-bsdi$UNAME_RELEASE + ;; *:BSD/OS:*:*) - echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE + ;; + arm:FreeBSD:*:*) + UNAME_PROCESSOR=`uname -p` + set_cc_for_build + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi + else + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf + fi + ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` - case "$UNAME_PROCESSOR" in + case $UNAME_PROCESSOR in amd64) UNAME_PROCESSOR=x86_64 ;; i386) UNAME_PROCESSOR=i586 ;; esac - echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" - exit ;; + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL + ;; i*:CYGWIN*:*) - echo "$UNAME_MACHINE"-pc-cygwin - exit ;; + GUESS=$UNAME_MACHINE-pc-cygwin + ;; *:MINGW64*:*) - echo "$UNAME_MACHINE"-pc-mingw64 - exit ;; + GUESS=$UNAME_MACHINE-pc-mingw64 + ;; *:MINGW*:*) - echo "$UNAME_MACHINE"-pc-mingw32 - exit ;; + GUESS=$UNAME_MACHINE-pc-mingw32 + ;; *:MSYS*:*) - echo "$UNAME_MACHINE"-pc-msys - exit ;; + GUESS=$UNAME_MACHINE-pc-msys + ;; i*:PW*:*) - echo "$UNAME_MACHINE"-pc-pw32 - exit ;; + GUESS=$UNAME_MACHINE-pc-pw32 + ;; + *:SerenityOS:*:*) + GUESS=$UNAME_MACHINE-pc-serenity + ;; *:Interix*:*) - case "$UNAME_MACHINE" in + case $UNAME_MACHINE in x86) - echo i586-pc-interix"$UNAME_RELEASE" - exit ;; + GUESS=i586-pc-interix$UNAME_RELEASE + ;; authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix"$UNAME_RELEASE" - exit ;; + GUESS=x86_64-unknown-interix$UNAME_RELEASE + ;; IA64) - echo ia64-unknown-interix"$UNAME_RELEASE" - exit ;; + GUESS=ia64-unknown-interix$UNAME_RELEASE + ;; esac ;; i*:UWIN*:*) - echo "$UNAME_MACHINE"-pc-uwin - exit ;; + GUESS=$UNAME_MACHINE-pc-uwin + ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; + GUESS=x86_64-pc-cygwin + ;; prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=powerpcle-unknown-solaris2$SUN_REL + ;; *:GNU:*:*) # the GNU system - echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" - exit ;; + GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` + GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL + ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" - exit ;; - i*86:Minix:*:*) - echo "$UNAME_MACHINE"-pc-minix - exit ;; + GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC + ;; + *:Minix:*:*) + GUESS=$UNAME_MACHINE-unknown-minix + ;; aarch64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; @@ -916,187 +988,225 @@ EOF esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - arc:Linux:*:* | arceb:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; arm*:Linux:*:*) - eval "$set_cc_for_build" + set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi else - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf fi fi - exit ;; + ;; avr32*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; cris:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-axis-linux-$LIBC + ;; crisv32:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-axis-linux-$LIBC + ;; e2k:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; frv:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; hexagon:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; i*86:Linux:*:*) - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-pc-linux-$LIBC + ;; ia64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; k1om:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; m32r*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; m68*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; mips:Linux:*:* | mips64:Linux:*:*) - eval "$set_cc_for_build" + set_cc_for_build + IS_GLIBC=0 + test x"${LIBC}" = xgnu && IS_GLIBC=1 sed 's/^ //' << EOF > "$dummy.c" #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el + #undef mips + #undef mipsel + #undef mips64 + #undef mips64el + #if ${IS_GLIBC} && defined(_ABI64) + LIBCABI=gnuabi64 + #else + #if ${IS_GLIBC} && defined(_ABIN32) + LIBCABI=gnuabin32 + #else + LIBCABI=${LIBC} + #endif + #endif + + #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa64r6 + #else + #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa32r6 + #else + #if defined(__mips64) + CPU=mips64 + #else + CPU=mips + #endif + #endif + #endif + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el + MIPS_ENDIAN=el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} + MIPS_ENDIAN= #else - CPU= + MIPS_ENDIAN= #endif #endif EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" - test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } + cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` + eval "$cc_set_vars" + test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } ;; mips64el:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; openrisc*:Linux:*:*) - echo or1k-unknown-linux-"$LIBC" - exit ;; + GUESS=or1k-unknown-linux-$LIBC + ;; or32:Linux:*:* | or1k*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; padre:Linux:*:*) - echo sparc-unknown-linux-"$LIBC" - exit ;; + GUESS=sparc-unknown-linux-$LIBC + ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-"$LIBC" - exit ;; + GUESS=hppa64-unknown-linux-$LIBC + ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; - PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; - *) echo hppa-unknown-linux-"$LIBC" ;; + PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; + PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; + *) GUESS=hppa-unknown-linux-$LIBC ;; esac - exit ;; + ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpc64-unknown-linux-$LIBC + ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpc-unknown-linux-$LIBC + ;; ppc64le:Linux:*:*) - echo powerpc64le-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpc64le-unknown-linux-$LIBC + ;; ppcle:Linux:*:*) - echo powerpcle-unknown-linux-"$LIBC" - exit ;; - riscv32:Linux:*:* | riscv64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpcle-unknown-linux-$LIBC + ;; + riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; s390:Linux:*:* | s390x:Linux:*:*) - echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-ibm-linux-$LIBC + ;; sh64*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; sh*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; tile*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; vax:Linux:*:*) - echo "$UNAME_MACHINE"-dec-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-dec-linux-$LIBC + ;; x86_64:Linux:*:*) - if objdump -f /bin/sh | grep -q elf32-x86-64; then - echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32 - else - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + set_cc_for_build + LIBCABI=$LIBC + if test "$CC_FOR_BUILD" != no_compiler_found; then + if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_X32 >/dev/null + then + LIBCABI=${LIBC}x32 + fi fi - exit ;; + GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI + ;; xtensa*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; + GUESS=i386-sequent-sysv4 + ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. - echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" - exit ;; + GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION + ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. - echo "$UNAME_MACHINE"-pc-os2-emx - exit ;; + GUESS=$UNAME_MACHINE-pc-os2-emx + ;; i*86:XTS-300:*:STOP) - echo "$UNAME_MACHINE"-unknown-stop - exit ;; + GUESS=$UNAME_MACHINE-unknown-stop + ;; i*86:atheos:*:*) - echo "$UNAME_MACHINE"-unknown-atheos - exit ;; + GUESS=$UNAME_MACHINE-unknown-atheos + ;; i*86:syllable:*:*) - echo "$UNAME_MACHINE"-pc-syllable - exit ;; + GUESS=$UNAME_MACHINE-pc-syllable + ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=i386-unknown-lynxos$UNAME_RELEASE + ;; i*86:*DOS:*:*) - echo "$UNAME_MACHINE"-pc-msdosdjgpp - exit ;; + GUESS=$UNAME_MACHINE-pc-msdosdjgpp + ;; i*86:*:4.*:*) UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" + GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL else - echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" + GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL fi - exit ;; + ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in @@ -1104,12 +1214,12 @@ EOF *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac - echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" - exit ;; + GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 @@ -1119,11 +1229,11 @@ EOF && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 - echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" + GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL else - echo "$UNAME_MACHINE"-pc-sysv32 + GUESS=$UNAME_MACHINE-pc-sysv32 fi - exit ;; + ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about @@ -1131,31 +1241,31 @@ EOF # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; + GUESS=i586-pc-msdosdjgpp + ;; Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; + GUESS=i386-pc-mach3 + ;; paragon:*:*:*) - echo i860-intel-osf1 - exit ;; + GUESS=i860-intel-osf1 + ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 + GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 + GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 fi - exit ;; + ;; mini*:CTIX:SYS*5:*) # "miniframe" - echo m68010-convergent-sysv - exit ;; + GUESS=m68010-convergent-sysv + ;; mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; + GUESS=m68k-convergent-sysv + ;; M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; + GUESS=m68k-diab-dnix + ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) @@ -1180,249 +1290,404 @@ EOF /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=m68k-unknown-lynxos$UNAME_RELEASE + ;; mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; + GUESS=m68k-atari-sysv4 + ;; TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=sparc-unknown-lynxos$UNAME_RELEASE + ;; rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=rs6000-unknown-lynxos$UNAME_RELEASE + ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-unknown-lynxos$UNAME_RELEASE + ;; SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv"$UNAME_RELEASE" - exit ;; + GUESS=mips-dde-sysv$UNAME_RELEASE + ;; RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; + GUESS=mips-sni-sysv4 + ;; RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; + GUESS=mips-sni-sysv4 + ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo "$UNAME_MACHINE"-sni-sysv4 + GUESS=$UNAME_MACHINE-sni-sysv4 else - echo ns32k-sni-sysv + GUESS=ns32k-sni-sysv fi - exit ;; + ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says - echo i586-unisys-sysv4 - exit ;; + GUESS=i586-unisys-sysv4 + ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; + GUESS=hppa1.1-stratus-sysv4 + ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; + GUESS=i860-stratus-sysv4 + ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. - echo "$UNAME_MACHINE"-stratus-vos - exit ;; + GUESS=$UNAME_MACHINE-stratus-vos + ;; *:VOS:*:*) # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; + GUESS=hppa1.1-stratus-vos + ;; mc68*:A/UX:*:*) - echo m68k-apple-aux"$UNAME_RELEASE" - exit ;; + GUESS=m68k-apple-aux$UNAME_RELEASE + ;; news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; + GUESS=mips-sony-newsos6 + ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv"$UNAME_RELEASE" + if test -d /usr/nec; then + GUESS=mips-nec-sysv$UNAME_RELEASE else - echo mips-unknown-sysv"$UNAME_RELEASE" + GUESS=mips-unknown-sysv$UNAME_RELEASE fi - exit ;; + ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; + GUESS=powerpc-be-beos + ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; + GUESS=powerpc-apple-beos + ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; + GUESS=i586-pc-beos + ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; + GUESS=i586-pc-haiku + ;; x86_64:Haiku:*:*) - echo x86_64-unknown-haiku - exit ;; + GUESS=x86_64-unknown-haiku + ;; SX-4:SUPER-UX:*:*) - echo sx4-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx4-nec-superux$UNAME_RELEASE + ;; SX-5:SUPER-UX:*:*) - echo sx5-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx5-nec-superux$UNAME_RELEASE + ;; SX-6:SUPER-UX:*:*) - echo sx6-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx6-nec-superux$UNAME_RELEASE + ;; SX-7:SUPER-UX:*:*) - echo sx7-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx7-nec-superux$UNAME_RELEASE + ;; SX-8:SUPER-UX:*:*) - echo sx8-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx8-nec-superux$UNAME_RELEASE + ;; SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx8r-nec-superux$UNAME_RELEASE + ;; SX-ACE:SUPER-UX:*:*) - echo sxace-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sxace-nec-superux$UNAME_RELEASE + ;; Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-apple-rhapsody$UNAME_RELEASE + ;; *:Rhapsody:*:*) - echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE + ;; + arm64:Darwin:*:*) + GUESS=aarch64-apple-darwin$UNAME_RELEASE + ;; *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - eval "$set_cc_for_build" - if test "$UNAME_PROCESSOR" = unknown ; then - UNAME_PROCESSOR=powerpc + UNAME_PROCESSOR=`uname -p` + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; + esac + if command -v xcode-select > /dev/null 2> /dev/null && \ + ! xcode-select --print-path > /dev/null 2> /dev/null ; then + # Avoid executing cc if there is no toolchain installed as + # cc will be a stub that puts up a graphical alert + # prompting the user to install developer tools. + CC_FOR_BUILD=no_compiler_found + else + set_cc_for_build fi - if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=x86_64 ;; - powerpc) UNAME_PROCESSOR=powerpc64 ;; - esac - fi - # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc - if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_PPC >/dev/null - then - UNAME_PROCESSOR=powerpc - fi + if test "$CC_FOR_BUILD" != no_compiler_found; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc fi elif test "$UNAME_PROCESSOR" = i386 ; then - # Avoid executing cc on OS X 10.9, as it ships with a stub - # that puts up a graphical alert prompting to install - # developer tools. Any system running Mac OS X 10.7 or - # later (Darwin 11 and later) is required to have a 64-bit - # processor. This is not true of the ARM version of Darwin - # that Apple uses in portable devices. - UNAME_PROCESSOR=x86_64 + # uname -m returns i386 or x86_64 + UNAME_PROCESSOR=$UNAME_MACHINE fi - echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE + ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi - echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE + ;; *:QNX:*:4*) - echo i386-pc-qnx - exit ;; + GUESS=i386-pc-qnx + ;; NEO-*:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=neo-tandem-nsk$UNAME_RELEASE + ;; NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nse-tandem-nsk$UNAME_RELEASE + ;; NSR-*:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nsr-tandem-nsk$UNAME_RELEASE + ;; NSV-*:NONSTOP_KERNEL:*:*) - echo nsv-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nsv-tandem-nsk$UNAME_RELEASE + ;; NSX-*:NONSTOP_KERNEL:*:*) - echo nsx-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nsx-tandem-nsk$UNAME_RELEASE + ;; *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; + GUESS=mips-compaq-nonstopux + ;; BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; + GUESS=bs2000-siemens-sysv + ;; DS/*:UNIX_System_V:*:*) - echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE + ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. - if test "$cputype" = 386; then + if test "${cputype-}" = 386; then UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" + elif test "x${cputype-}" != x; then + UNAME_MACHINE=$cputype fi - echo "$UNAME_MACHINE"-unknown-plan9 - exit ;; + GUESS=$UNAME_MACHINE-unknown-plan9 + ;; *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; + GUESS=pdp10-unknown-tops10 + ;; *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; + GUESS=pdp10-unknown-tenex + ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; + GUESS=pdp10-dec-tops20 + ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; + GUESS=pdp10-xkl-tops20 + ;; *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; + GUESS=pdp10-unknown-tops20 + ;; *:ITS:*:*) - echo pdp10-unknown-its - exit ;; + GUESS=pdp10-unknown-its + ;; SEI:*:*:SEIUX) - echo mips-sei-seiux"$UNAME_RELEASE" - exit ;; + GUESS=mips-sei-seiux$UNAME_RELEASE + ;; *:DragonFly:*:*) - echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" - exit ;; + DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL + ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "$UNAME_MACHINE" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; + case $UNAME_MACHINE in + A*) GUESS=alpha-dec-vms ;; + I*) GUESS=ia64-dec-vms ;; + V*) GUESS=vax-dec-vms ;; esac ;; *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; + GUESS=i386-pc-xenix + ;; i*86:skyos:*:*) - echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" - exit ;; + SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` + GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL + ;; i*86:rdos:*:*) - echo "$UNAME_MACHINE"-pc-rdos - exit ;; - i*86:AROS:*:*) - echo "$UNAME_MACHINE"-pc-aros - exit ;; + GUESS=$UNAME_MACHINE-pc-rdos + ;; + i*86:Fiwix:*:*) + GUESS=$UNAME_MACHINE-pc-fiwix + ;; + *:AROS:*:*) + GUESS=$UNAME_MACHINE-unknown-aros + ;; x86_64:VMkernel:*:*) - echo "$UNAME_MACHINE"-unknown-esx - exit ;; + GUESS=$UNAME_MACHINE-unknown-esx + ;; amd64:Isilon\ OneFS:*:*) - echo x86_64-unknown-onefs - exit ;; + GUESS=x86_64-unknown-onefs + ;; + *:Unleashed:*:*) + GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE + ;; esac +# Do we have a guess based on uname results? +if test "x$GUESS" != x; then + echo "$GUESS" + exit +fi + +# No uname command or uname output not recognized. +set_cc_for_build +cat > "$dummy.c" < +#include +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#include +#if defined(_SIZE_T_) || defined(SIGLOST) +#include +#endif +#endif +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); +#endif + +#if defined (vax) +#if !defined (ultrix) +#include +#if defined (BSD) +#if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +#else +#if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#endif +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#else +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname un; + uname (&un); + printf ("vax-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("vax-dec-ultrix\n"); exit (0); +#endif +#endif +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname *un; + uname (&un); + printf ("mips-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("mips-dec-ultrix\n"); exit (0); +#endif +#endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. +test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } + echo "$0: unable to guess system type" >&2 -case "$UNAME_MACHINE:$UNAME_SYSTEM" in +case $UNAME_MACHINE:$UNAME_SYSTEM in mips:Linux | mips64:Linux) # If we got here on MIPS GNU/Linux, output extra information. cat >&2 <&2 < header file. */ -#undef HAVE_MEMORY_H - /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H +/* Define to 1 if you have the header file. */ +#undef HAVE_STDIO_H + /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H @@ -96,6 +117,9 @@ /* Use ARM NEON inline asm optimizations */ #undef OPUS_ARM_INLINE_NEON +/* Compiler supports Aarch64 DOTPROD Intrinsics */ +#undef OPUS_ARM_MAY_HAVE_DOTPROD + /* Define if assembler supports EDSP instructions */ #undef OPUS_ARM_MAY_HAVE_EDSP @@ -111,6 +135,9 @@ /* Define if binary requires Aarch64 Neon Intrinsics */ #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 */ #undef OPUS_ARM_PRESUME_EDSP @@ -132,8 +159,8 @@ /* Use run-time CPU capabilities detection */ #undef OPUS_HAVE_RTCD -/* Compiler supports X86 AVX Intrinsics */ -#undef OPUS_X86_MAY_HAVE_AVX +/* Compiler supports X86 AVX2 Intrinsics */ +#undef OPUS_X86_MAY_HAVE_AVX2 /* Compiler supports X86 SSE Intrinsics */ #undef OPUS_X86_MAY_HAVE_SSE @@ -144,8 +171,8 @@ /* Compiler supports X86 SSE4.1 Intrinsics */ #undef OPUS_X86_MAY_HAVE_SSE4_1 -/* Define if binary requires AVX intrinsics support */ -#undef OPUS_X86_PRESUME_AVX +/* Define if binary requires AVX2 intrinsics support */ +#undef OPUS_X86_PRESUME_AVX2 /* Define if binary requires SSE intrinsics support */ #undef OPUS_X86_PRESUME_SSE @@ -174,7 +201,9 @@ /* Define to the version of this package. */ #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 /* Make use of alloca */ diff --git a/src/libs/opus/config.sub b/src/libs/opus/config.sub index 1d8e98bc..dba16e84 100755 --- a/src/libs/opus/config.sub +++ b/src/libs/opus/config.sub @@ -1,12 +1,14 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2018 Free Software Foundation, Inc. +# Copyright 1992-2022 Free Software Foundation, Inc. -timestamp='2018-02-22' +# shellcheck disable=SC2006,SC2268 # see below for rationale + +timestamp='2022-01-03' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or +# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -33,7 +35,7 @@ timestamp='2018-02-22' # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub +# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -50,6 +52,13 @@ timestamp='2018-02-22' # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + me=`echo "$0" | sed -e 's,.*/,,'` usage="\ @@ -67,7 +76,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright 1992-2018 Free Software Foundation, Inc. +Copyright 1992-2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -89,7 +98,7 @@ while test $# -gt 0 ; do - ) # Use stdin as input. break ;; -* ) - echo "$me: invalid option $1$help" + echo "$me: invalid option $1$help" >&2 exit 1 ;; *local*) @@ -110,1223 +119,1186 @@ case $# in exit 1;; esac -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ - kopensolaris*-gnu* | cloudabi*-eabi* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - android-linux) - os=-linux-android - basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown - ;; - *) - basic_machine=`echo "$1" | sed 's/-[^-]*$//'` - if [ "$basic_machine" != "$1" ] - then os=`echo "$1" | sed 's/.*-/-/'` - else os=; fi - ;; -esac +# Split fields of configuration type +# shellcheck disable=SC2162 +saved_IFS=$IFS +IFS="-" read field1 field2 field3 field4 <&2 + exit 1 ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze*) - os= - basic_machine=$1 + *-*-*-*) + basic_machine=$field1-$field2 + basic_os=$field3-$field4 ;; - -bluegene*) - os=-cnk + *-*-*) + # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two + # parts + maybe_os=$field2-$field3 + case $maybe_os in + nto-qnx* | linux-* | uclinux-uclibc* \ + | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ + | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ + | storm-chaos* | os2-emx* | rtmk-nova*) + basic_machine=$field1 + basic_os=$maybe_os + ;; + android-linux) + basic_machine=$field1-unknown + basic_os=linux-android + ;; + *) + basic_machine=$field1-$field2 + basic_os=$field3 + ;; + esac ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 + *-*) + # A lone config we happen to match not fitting any pattern + case $field1-$field2 in + decstation-3100) + basic_machine=mips-dec + basic_os= + ;; + *-*) + # Second component is usually, but not always the OS + case $field2 in + # Prevent following clause from handling this valid os + sun*os*) + basic_machine=$field1 + basic_os=$field2 + ;; + zephyr*) + basic_machine=$field1-unknown + basic_os=$field2 + ;; + # Manufacturers + dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ + | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ + | unicom* | ibm* | next | hp | isi* | apollo | altos* \ + | convergent* | ncr* | news | 32* | 3600* | 3100* \ + | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ + | ultra | tti* | harris | dolphin | highlevel | gould \ + | cbm | ns | masscomp | apple | axis | knuth | cray \ + | microblaze* | sim | cisco \ + | oki | wec | wrs | winbond) + basic_machine=$field1-$field2 + basic_os= + ;; + *) + basic_machine=$field1 + basic_os=$field2 + ;; + esac + ;; + esac ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*178) - os=-lynxos178 - ;; - -lynx*5) - os=-lynxos5 - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint + *) + # Convert single-component short-hands not valid as part of + # multi-component configurations. + case $field1 in + 386bsd) + basic_machine=i386-pc + basic_os=bsd + ;; + a29khif) + basic_machine=a29k-amd + basic_os=udi + ;; + adobe68k) + basic_machine=m68010-adobe + basic_os=scout + ;; + alliant) + basic_machine=fx80-alliant + basic_os= + ;; + altos | altos3068) + basic_machine=m68k-altos + basic_os= + ;; + am29k) + basic_machine=a29k-none + basic_os=bsd + ;; + amdahl) + basic_machine=580-amdahl + basic_os=sysv + ;; + amiga) + basic_machine=m68k-unknown + basic_os= + ;; + amigaos | amigados) + basic_machine=m68k-unknown + basic_os=amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + basic_os=sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + basic_os=sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + basic_os=bsd + ;; + aros) + basic_machine=i386-pc + basic_os=aros + ;; + aux) + basic_machine=m68k-apple + basic_os=aux + ;; + balance) + basic_machine=ns32k-sequent + basic_os=dynix + ;; + blackfin) + basic_machine=bfin-unknown + basic_os=linux + ;; + cegcc) + basic_machine=arm-unknown + basic_os=cegcc + ;; + convex-c1) + basic_machine=c1-convex + basic_os=bsd + ;; + convex-c2) + basic_machine=c2-convex + basic_os=bsd + ;; + convex-c32) + basic_machine=c32-convex + basic_os=bsd + ;; + convex-c34) + basic_machine=c34-convex + basic_os=bsd + ;; + convex-c38) + basic_machine=c38-convex + basic_os=bsd + ;; + cray) + basic_machine=j90-cray + basic_os=unicos + ;; + crds | unos) + basic_machine=m68k-crds + basic_os= + ;; + da30) + basic_machine=m68k-da30 + basic_os= + ;; + decstation | pmax | pmin | dec3100 | decstatn) + basic_machine=mips-dec + basic_os= + ;; + delta88) + basic_machine=m88k-motorola + basic_os=sysv3 + ;; + dicos) + basic_machine=i686-pc + basic_os=dicos + ;; + djgpp) + basic_machine=i586-pc + basic_os=msdosdjgpp + ;; + ebmon29k) + basic_machine=a29k-amd + basic_os=ebmon + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + basic_os=ose + ;; + gmicro) + basic_machine=tron-gmicro + basic_os=sysv + ;; + go32) + basic_machine=i386-pc + basic_os=go32 + ;; + h8300hms) + basic_machine=h8300-hitachi + basic_os=hms + ;; + h8300xray) + basic_machine=h8300-hitachi + basic_os=xray + ;; + h8500hms) + basic_machine=h8500-hitachi + basic_os=hms + ;; + harris) + basic_machine=m88k-harris + basic_os=sysv3 + ;; + hp300 | hp300hpux) + basic_machine=m68k-hp + basic_os=hpux + ;; + hp300bsd) + basic_machine=m68k-hp + basic_os=bsd + ;; + hppaosf) + basic_machine=hppa1.1-hp + basic_os=osf + ;; + hppro) + basic_machine=hppa1.1-hp + basic_os=proelf + ;; + i386mach) + basic_machine=i386-mach + basic_os=mach + ;; + isi68 | isi) + basic_machine=m68k-isi + basic_os=sysv + ;; + m68knommu) + basic_machine=m68k-unknown + basic_os=linux + ;; + magnum | m3230) + basic_machine=mips-mips + basic_os=sysv + ;; + merlin) + basic_machine=ns32k-utek + basic_os=sysv + ;; + mingw64) + basic_machine=x86_64-pc + basic_os=mingw64 + ;; + mingw32) + basic_machine=i686-pc + basic_os=mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + basic_os=mingw32ce + ;; + monitor) + basic_machine=m68k-rom68k + basic_os=coff + ;; + morphos) + basic_machine=powerpc-unknown + basic_os=morphos + ;; + moxiebox) + basic_machine=moxie-unknown + basic_os=moxiebox + ;; + msdos) + basic_machine=i386-pc + basic_os=msdos + ;; + msys) + basic_machine=i686-pc + basic_os=msys + ;; + mvs) + basic_machine=i370-ibm + basic_os=mvs + ;; + nacl) + basic_machine=le32-unknown + basic_os=nacl + ;; + ncr3000) + basic_machine=i486-ncr + basic_os=sysv4 + ;; + netbsd386) + basic_machine=i386-pc + basic_os=netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + basic_os=linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + basic_os=newsos + ;; + news1000) + basic_machine=m68030-sony + basic_os=newsos + ;; + necv70) + basic_machine=v70-nec + basic_os=sysv + ;; + nh3000) + basic_machine=m68k-harris + basic_os=cxux + ;; + nh[45]000) + basic_machine=m88k-harris + basic_os=cxux + ;; + nindy960) + basic_machine=i960-intel + basic_os=nindy + ;; + mon960) + basic_machine=i960-intel + basic_os=mon960 + ;; + nonstopux) + basic_machine=mips-compaq + basic_os=nonstopux + ;; + os400) + basic_machine=powerpc-ibm + basic_os=os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + basic_os=ose + ;; + os68k) + basic_machine=m68k-none + basic_os=os68k + ;; + paragon) + basic_machine=i860-intel + basic_os=osf + ;; + parisc) + basic_machine=hppa-unknown + basic_os=linux + ;; + psp) + basic_machine=mipsallegrexel-sony + basic_os=psp + ;; + pw32) + basic_machine=i586-unknown + basic_os=pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + basic_os=rdos + ;; + rdos32) + basic_machine=i386-pc + basic_os=rdos + ;; + rom68k) + basic_machine=m68k-rom68k + basic_os=coff + ;; + sa29200) + basic_machine=a29k-amd + basic_os=udi + ;; + sei) + basic_machine=mips-sei + basic_os=seiux + ;; + sequent) + basic_machine=i386-sequent + basic_os= + ;; + sps7) + basic_machine=m68k-bull + basic_os=sysv2 + ;; + st2000) + basic_machine=m68k-tandem + basic_os= + ;; + stratus) + basic_machine=i860-stratus + basic_os=sysv4 + ;; + sun2) + basic_machine=m68000-sun + basic_os= + ;; + sun2os3) + basic_machine=m68000-sun + basic_os=sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + basic_os=sunos4 + ;; + sun3) + basic_machine=m68k-sun + basic_os= + ;; + sun3os3) + basic_machine=m68k-sun + basic_os=sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + basic_os=sunos4 + ;; + sun4) + basic_machine=sparc-sun + basic_os= + ;; + sun4os3) + basic_machine=sparc-sun + basic_os=sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + basic_os=sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + basic_os=solaris2 + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + basic_os= + ;; + sv1) + basic_machine=sv1-cray + basic_os=unicos + ;; + symmetry) + basic_machine=i386-sequent + basic_os=dynix + ;; + t3e) + basic_machine=alphaev5-cray + basic_os=unicos + ;; + t90) + basic_machine=t90-cray + basic_os=unicos + ;; + toad1) + basic_machine=pdp10-xkl + basic_os=tops20 + ;; + tpf) + basic_machine=s390x-ibm + basic_os=tpf + ;; + udi29k) + basic_machine=a29k-amd + basic_os=udi + ;; + ultra3) + basic_machine=a29k-nyu + basic_os=sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + basic_os=none + ;; + vaxv) + basic_machine=vax-dec + basic_os=sysv + ;; + vms) + basic_machine=vax-dec + basic_os=vms + ;; + vsta) + basic_machine=i386-pc + basic_os=vsta + ;; + vxworks960) + basic_machine=i960-wrs + basic_os=vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + basic_os=vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + basic_os=vxworks + ;; + xbox) + basic_machine=i686-pc + basic_os=mingw32 + ;; + ymp) + basic_machine=ymp-cray + basic_os=unicos + ;; + *) + basic_machine=$1 + basic_os= + ;; + esac ;; esac -# Decode aliases for certain CPU-COMPANY combinations. +# Decode 1-component or ad-hoc basic machines case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | aarch64 | aarch64_be \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arceb \ - | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ - | avr | avr32 \ - | ba \ - | be32 | be64 \ - | bfin \ - | c4x | c8051 | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | e2k | epiphany \ - | fido | fr30 | frv | ft32 \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | hexagon \ - | i370 | i860 | i960 | ia16 | ia64 \ - | ip2k | iq2000 \ - | k1om \ - | le32 | le64 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa32r6 | mipsisa32r6el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64r6 | mipsisa64r6el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipsr5900 | mipsr5900el \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nds32 | nds32le | nds32be \ - | nios | nios2 | nios2eb | nios2el \ - | ns16k | ns32k \ - | open8 | or1k | or1knd | or32 \ - | pdp10 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle \ - | pru \ - | pyramid \ - | riscv32 | riscv64 \ - | rl78 | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu \ - | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ - | visium \ - | wasm32 \ - | x86 | xc16x | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown + # Here we handle the default manufacturer of certain CPU types. It is in + # some cases the only manufacturer, in others, it is the most popular. + w89k) + cpu=hppa1.1 + vendor=winbond ;; - c54x) - basic_machine=tic54x-unknown + op50n) + cpu=hppa1.1 + vendor=oki ;; - c55x) - basic_machine=tic55x-unknown + op60c) + cpu=hppa1.1 + vendor=oki ;; - c6x) - basic_machine=tic6x-unknown + ibm*) + cpu=i370 + vendor=ibm + ;; + orion105) + cpu=clipper + vendor=highlevel + ;; + mac | mpw | mac-mpw) + cpu=m68k + vendor=apple + ;; + pmac | pmac-mpw) + cpu=powerpc + vendor=apple + ;; + + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + cpu=m68000 + vendor=att + ;; + 3b*) + cpu=we32k + vendor=att + ;; + bluegene*) + cpu=powerpc + vendor=ibm + basic_os=cnk + ;; + decsystem10* | dec10*) + cpu=pdp10 + vendor=dec + basic_os=tops10 + ;; + decsystem20* | dec20*) + cpu=pdp10 + vendor=dec + basic_os=tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + cpu=m68k + vendor=motorola + ;; + dpx2*) + cpu=m68k + vendor=bull + basic_os=sysv3 + ;; + encore | umax | mmax) + cpu=ns32k + vendor=encore + ;; + elxsi) + cpu=elxsi + vendor=elxsi + basic_os=${basic_os:-bsd} + ;; + fx2800) + cpu=i860 + vendor=alliant + ;; + genix) + cpu=ns32k + vendor=ns + ;; + h3050r* | hiux*) + cpu=hppa1.1 + vendor=hitachi + basic_os=hiuxwe2 + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + cpu=m68000 + vendor=hp + ;; + hp9k3[2-9][0-9]) + cpu=m68k + vendor=hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + cpu=hppa1.1 + vendor=hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + i*86v32) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=sysv32 + ;; + i*86v4*) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=sysv4 + ;; + i*86v) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=sysv + ;; + i*86sol2) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=solaris2 + ;; + j90 | j90-cray) + cpu=j90 + vendor=cray + basic_os=${basic_os:-unicos} + ;; + iris | iris4d) + cpu=mips + vendor=sgi + case $basic_os in + irix*) + ;; + *) + basic_os=irix4 + ;; + esac + ;; + miniframe) + cpu=m68000 + vendor=convergent + ;; + *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) + cpu=m68k + vendor=atari + basic_os=mint + ;; + news-3600 | risc-news) + cpu=mips + vendor=sony + basic_os=newsos + ;; + next | m*-next) + cpu=m68k + vendor=next + case $basic_os in + openstep*) + ;; + nextstep*) + ;; + ns2*) + basic_os=nextstep2 + ;; + *) + basic_os=nextstep3 + ;; + esac + ;; + np1) + cpu=np1 + vendor=gould + ;; + op50n-* | op60c-*) + cpu=hppa1.1 + vendor=oki + basic_os=proelf + ;; + pa-hitachi) + cpu=hppa1.1 + vendor=hitachi + basic_os=hiuxwe2 + ;; + pbd) + cpu=sparc + vendor=tti + ;; + pbb) + cpu=m68k + vendor=tti + ;; + pc532) + cpu=ns32k + vendor=pc532 + ;; + pn) + cpu=pn + vendor=gould + ;; + power) + cpu=power + vendor=ibm + ;; + ps2) + cpu=i386 + vendor=ibm + ;; + rm[46]00) + cpu=mips + vendor=siemens + ;; + rtpc | rtpc-*) + cpu=romp + vendor=ibm + ;; + sde) + cpu=mipsisa32 + vendor=sde + basic_os=${basic_os:-elf} + ;; + simso-wrs) + cpu=sparclite + vendor=wrs + basic_os=vxworks + ;; + tower | tower-32) + cpu=m68k + vendor=ncr + ;; + vpp*|vx|vx-*) + cpu=f301 + vendor=fujitsu + ;; + w65) + cpu=w65 + vendor=wdc + ;; + w89k-*) + cpu=hppa1.1 + vendor=winbond + basic_os=proelf + ;; + none) + cpu=none + vendor=none ;; leon|leon[3-9]) - basic_machine=sparc-$basic_machine + cpu=sparc + vendor=$basic_machine ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) - ;; - ms1) - basic_machine=mt-unknown + leon-*|leon[3-9]-*) + cpu=sparc + vendor=`echo "$basic_machine" | sed 's/-.*//'` ;; - strongarm | thumb | xscale) - basic_machine=arm-unknown + *-*) + # shellcheck disable=SC2162 + saved_IFS=$IFS + IFS="-" read cpu vendor <&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | aarch64-* | aarch64_be-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | ba-* \ - | be32-* | be64-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | c8051-* | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | e2k-* | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | hexagon-* \ - | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ - | ip2k-* | iq2000-* \ - | k1om-* \ - | le32-* | le64-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ - | microblaze-* | microblazeel-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa32r6-* | mipsisa32r6el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64r6-* | mipsisa64r6el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipsr5900-* | mipsr5900el-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* | nios2eb-* | nios2el-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | open8-* \ - | or1k*-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ - | pru-* \ - | pyramid-* \ - | riscv32-* | riscv64-* \ - | rl78-* | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ - | tahoe-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile*-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ - | vax-* \ - | visium-* \ - | wasm32-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-pc - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - asmjs) - basic_machine=asmjs-unknown - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux - ;; - bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c54x-*) - basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c55x-*) - basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c6x-*) - basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16 | cr16-*) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2*) - basic_machine=m68k-bull - os=-sysv3 - ;; - e500v[12]) - basic_machine=powerpc-unknown - os=$os"spe" - ;; - e500v[12]-*) - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=$os"spe" - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; - i*86v32) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - leon-*|leon[3-9]-*) - basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze*) - basic_machine=microblaze-xilinx - ;; - mingw64) - basic_machine=x86_64-pc - os=-mingw64 - ;; - mingw32) - basic_machine=i686-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - moxiebox) - basic_machine=moxie-unknown - os=-moxiebox - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` - ;; - msys) - basic_machine=i686-pc - os=-msys - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - nacl) - basic_machine=le32-unknown - os=-nacl - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - neo-tandem) - basic_machine=neo-tandem - ;; - nse-tandem) - basic_machine=nse-tandem - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - nsv-tandem) - basic_machine=nsv-tandem - ;; - nsx-tandem) - basic_machine=nsx-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 + cpu=$basic_machine + vendor=pc ;; + # These rules are duplicated from below for sake of the special case above; + # i.e. things that normalized to x86 arches should also default to "pc" pc98) - basic_machine=i386-pc + cpu=i386 + vendor=pc ;; - pc98-*) - basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` + x64 | amd64) + cpu=x86_64 + vendor=pc ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc + # Recognize the basic CPU types without company name. + *) + cpu=$basic_machine + vendor=unknown ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc +esac + +unset -v basic_machine + +# Decode basic machines in the full and proper CPU-Company form. +case $cpu-$vendor in + # Here we handle the default manufacturer of certain CPU types in canonical form. It is in + # some cases the only manufacturer, in others, it is the most popular. + craynv-unknown) + vendor=cray + basic_os=${basic_os:-unicosmp} ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc + c90-unknown | c90-cray) + vendor=cray + basic_os=${Basic_os:-unicos} ;; - pentium4) - basic_machine=i786-pc + fx80-unknown) + vendor=alliant ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` + romp-unknown) + vendor=ibm ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` + mmix-unknown) + vendor=knuth ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` + microblaze-unknown | microblazeel-unknown) + vendor=xilinx ;; - pentium4-*) - basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` + rs6000-unknown) + vendor=ibm ;; - pn) - basic_machine=pn-gould + vax-unknown) + vendor=dec ;; - power) basic_machine=power-ibm + pdp11-unknown) + vendor=dec ;; - ppc | ppcbe) basic_machine=powerpc-unknown + we32k-unknown) + vendor=att ;; - ppc-* | ppcbe-*) - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` + cydra-unknown) + vendor=cydrome ;; - ppcle | powerpclittle) - basic_machine=powerpcle-unknown + i370-ibm*) + vendor=ibm ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` + orion-unknown) + vendor=highlevel ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos | rdos64) - basic_machine=x86_64-pc - os=-rdos - ;; - rdos32) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - strongarm-* | thumb-*) - basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tile*) - basic_machine=$basic_machine-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - x64) - basic_machine=x86_64-pc - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - xscale-* | xscalee[bl]-*) - basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - none) - basic_machine=none-none - os=-none + xps-unknown | xps100-unknown) + cpu=xps100 + vendor=honeywell ;; -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond + # Here we normalize CPU types with a missing or matching vendor + armh-unknown | armh-alt) + cpu=armv7l + vendor=alt + basic_os=${basic_os:-linux-gnueabihf} ;; - op50n) - basic_machine=hppa1.1-oki + dpx20-unknown | dpx20-bull) + cpu=rs6000 + vendor=bull + basic_os=${basic_os:-bosx} ;; - op60c) - basic_machine=hppa1.1-oki + + # Here we normalize CPU types irrespective of the vendor + amd64-*) + cpu=x86_64 ;; - romp) - basic_machine=romp-ibm + blackfin-*) + cpu=bfin + basic_os=linux ;; - mmix) - basic_machine=mmix-knuth + c54x-*) + cpu=tic54x ;; - rs6000) - basic_machine=rs6000-ibm + c55x-*) + cpu=tic55x ;; - vax) - basic_machine=vax-dec + c6x-*) + cpu=tic6x ;; - pdp11) - basic_machine=pdp11-dec + e500v[12]-*) + cpu=powerpc + basic_os=${basic_os}"spe" ;; - we32k) - basic_machine=we32k-att + mips3*-*) + cpu=mips64 ;; - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown + ms1-*) + cpu=mt ;; - cydra) - basic_machine=cydra-cydrome + m68knommu-*) + cpu=m68k + basic_os=linux ;; - orion) - basic_machine=orion-highlevel + m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*) + cpu=s12z ;; - orion105) - basic_machine=clipper-highlevel + openrisc-*) + cpu=or32 ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple + parisc-*) + cpu=hppa + basic_os=linux ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + cpu=i586 ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. + pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*) + cpu=i686 ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + cpu=i686 + ;; + pentium4-*) + cpu=i786 + ;; + pc98-*) + cpu=i386 + ;; + ppc-* | ppcbe-*) + cpu=powerpc + ;; + ppcle-* | powerpclittle-*) + cpu=powerpcle + ;; + ppc64-*) + cpu=powerpc64 + ;; + ppc64le-* | powerpc64little-*) + cpu=powerpc64le + ;; + sb1-*) + cpu=mipsisa64sb1 + ;; + sb1el-*) + cpu=mipsisa64sb1el + ;; + sh5e[lb]-*) + cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'` + ;; + spur-*) + cpu=spur + ;; + strongarm-* | thumb-*) + cpu=arm + ;; + tx39-*) + cpu=mipstx39 + ;; + tx39el-*) + cpu=mipstx39el + ;; + x64-*) + cpu=x86_64 + ;; + xscale-* | xscalee[bl]-*) + cpu=`echo "$cpu" | sed 's/^xscale/arm/'` + ;; + arm64-* | aarch64le-*) + cpu=aarch64 + ;; + + # Recognize the canonical CPU Types that limit and/or modify the + # company names they are paired with. + cr16-*) + basic_os=${basic_os:-elf} + ;; + crisv32-* | etraxfs*-*) + cpu=crisv32 + vendor=axis + ;; + cris-* | etrax*-*) + cpu=cris + vendor=axis + ;; + crx-*) + basic_os=${basic_os:-elf} + ;; + neo-tandem) + cpu=neo + vendor=tandem + ;; + nse-tandem) + cpu=nse + vendor=tandem + ;; + nsr-tandem) + cpu=nsr + vendor=tandem + ;; + nsv-tandem) + cpu=nsv + vendor=tandem + ;; + nsx-tandem) + cpu=nsx + vendor=tandem + ;; + mipsallegrexel-sony) + cpu=mipsallegrexel + vendor=sony + ;; + tile*-*) + basic_os=${basic_os:-linux-gnu} + ;; + *) - echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 - exit 1 + # Recognize the canonical CPU types that are allowed with any + # company name. + case $cpu in + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | abacus \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ + | alphapca5[67] | alpha64pca5[67] \ + | am33_2.0 \ + | amdgcn \ + | arc | arceb | arc32 | arc64 \ + | arm | arm[lb]e | arme[lb] | armv* \ + | avr | avr32 \ + | asmjs \ + | ba \ + | be32 | be64 \ + | bfin | bpf | bs2000 \ + | c[123]* | c30 | [cjt]90 | c4x \ + | c8051 | clipper | craynv | csky | cydra \ + | d10v | d30v | dlx | dsp16xx \ + | e2k | elxsi | epiphany \ + | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \ + | h8300 | h8500 \ + | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i*86 | i860 | i960 | ia16 | ia64 \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | loongarch32 | loongarch64 | loongarchx32 \ + | m32c | m32r | m32rle \ + | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ + | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \ + | m88110 | m88k | maxq | mb | mcore | mep | metag \ + | microblaze | microblazeel \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64eb | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r3 | mipsisa32r3el \ + | mipsisa32r5 | mipsisa32r5el \ + | mipsisa32r6 | mipsisa32r6el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r3 | mipsisa64r3el \ + | mipsisa64r5 | mipsisa64r5el \ + | mipsisa64r6 | mipsisa64r6el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mmix \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nfp \ + | nios | nios2 | nios2eb | nios2el \ + | none | np1 | ns16k | ns32k | nvptx \ + | open8 \ + | or1k* \ + | or32 \ + | orion \ + | picochip \ + | pdp10 | pdp11 | pj | pjl | pn | power \ + | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \ + | pru \ + | pyramid \ + | riscv | riscv32 | riscv32be | riscv64 | riscv64be \ + | rl78 | romp | rs6000 | rx \ + | s390 | s390x \ + | score \ + | sh | shl \ + | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \ + | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \ + | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \ + | spu \ + | tahoe \ + | thumbv7* \ + | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \ + | tron \ + | ubicom32 \ + | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ + | vax \ + | visium \ + | w65 \ + | wasm32 | wasm64 \ + | we32k \ + | x86 | x86_64 | xc16x | xgate | xps100 \ + | xstormy16 | xtensa* \ + | ymp \ + | z8k | z80) + ;; + + *) + echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2 + exit 1 + ;; + esac ;; esac # Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` +case $vendor in + digital*) + vendor=dec ;; - *-commodore*) - basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` + commodore*) + vendor=cbm ;; *) ;; @@ -1334,203 +1306,215 @@ esac # Decode manufacturer-specific aliases for certain operating systems. -if [ x"$os" != x"" ] +if test x$basic_os != x then + +# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just +# set os. +case $basic_os in + gnu/linux*) + kernel=linux + os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` + ;; + os2-emx) + kernel=os2 + os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` + ;; + nto-qnx*) + kernel=nto + os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` + ;; + *-*) + # shellcheck disable=SC2162 + saved_IFS=$IFS + IFS="-" read kernel os <&2 - exit 1 + # No normalization, but not necessarily accepted, that comes below. ;; esac + else # Here we handle the default operating systems that come with various machines. @@ -1543,258 +1527,363 @@ else # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. -case $basic_machine in +kernel= +case $cpu-$vendor in score-*) - os=-elf + os=elf ;; spu-*) - os=-elf + os=elf ;; *-acorn) - os=-riscix1.2 + os=riscix1.2 ;; arm*-rebel) - os=-linux + kernel=linux + os=gnu ;; arm*-semi) - os=-aout + os=aout ;; c4x-* | tic4x-*) - os=-coff + os=coff ;; c8051-*) - os=-elf + os=elf + ;; + clipper-intergraph) + os=clix ;; hexagon-*) - os=-elf + os=elf ;; tic54x-*) - os=-coff + os=coff ;; tic55x-*) - os=-coff + os=coff ;; tic6x-*) - os=-coff + os=coff ;; # This must come before the *-dec entry. pdp10-*) - os=-tops20 + os=tops20 ;; pdp11-*) - os=-none + os=none ;; *-dec | vax-*) - os=-ultrix4.2 + os=ultrix4.2 ;; m68*-apollo) - os=-domain + os=domain ;; i386-sun) - os=-sunos4.0.2 + os=sunos4.0.2 ;; m68000-sun) - os=-sunos3 + os=sunos3 ;; m68*-cisco) - os=-aout + os=aout ;; mep-*) - os=-elf + os=elf ;; mips*-cisco) - os=-elf + os=elf ;; mips*-*) - os=-elf + os=elf ;; or32-*) - os=-coff + os=coff ;; *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 + os=sysv3 ;; sparc-* | *-sun) - os=-sunos4.1.1 + os=sunos4.1.1 ;; pru-*) - os=-elf + os=elf ;; *-be) - os=-beos + os=beos ;; *-ibm) - os=-aix + os=aix ;; *-knuth) - os=-mmixware + os=mmixware ;; *-wec) - os=-proelf + os=proelf ;; *-winbond) - os=-proelf + os=proelf ;; *-oki) - os=-proelf + os=proelf ;; *-hp) - os=-hpux + os=hpux ;; *-hitachi) - os=-hiux + os=hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv + os=sysv ;; *-cbm) - os=-amigaos + os=amigaos ;; *-dg) - os=-dgux + os=dgux ;; *-dolphin) - os=-sysv3 + os=sysv3 ;; m68k-ccur) - os=-rtu + os=rtu ;; m88k-omron*) - os=-luna + os=luna ;; *-next) - os=-nextstep + os=nextstep ;; *-sequent) - os=-ptx + os=ptx ;; *-crds) - os=-unos + os=unos ;; *-ns) - os=-genix + os=genix ;; i370-*) - os=-mvs + os=mvs ;; *-gould) - os=-sysv + os=sysv ;; *-highlevel) - os=-bsd + os=bsd ;; *-encore) - os=-bsd + os=bsd ;; *-sgi) - os=-irix + os=irix ;; *-siemens) - os=-sysv4 + os=sysv4 ;; *-masscomp) - os=-rtu + os=rtu ;; f30[01]-fujitsu | f700-fujitsu) - os=-uxpv + os=uxpv ;; *-rom68k) - os=-coff + os=coff ;; *-*bug) - os=-coff + os=coff ;; *-apple) - os=-macos + os=macos ;; *-atari*) - os=-mint + os=mint + ;; + *-wrs) + os=vxworks ;; *) - os=-none + os=none ;; esac + fi +# Now, validate our (potentially fixed-up) OS. +case $os in + # Sometimes we do "kernel-libc", so those need to count as OSes. + musl* | newlib* | relibc* | uclibc*) + ;; + # Likewise for "kernel-abi" + eabi* | gnueabi*) + ;; + # VxWorks passes extra cpu info in the 4th filed. + simlinux | simwindows | spe) + ;; + # Now accept the basic system types. + # The portable systems comes first. + # Each alternative MUST end in a * to match a version number. + gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ + | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \ + | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ + | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \ + | hiux* | abug | nacl* | netware* | windows* \ + | os9* | macos* | osx* | ios* \ + | mpw* | magic* | mmixware* | mon960* | lnews* \ + | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ + | aos* | aros* | cloudabi* | sortix* | twizzler* \ + | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ + | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ + | mirbsd* | netbsd* | dicos* | openedition* | ose* \ + | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \ + | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \ + | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ + | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ + | udi* | lites* | ieee* | go32* | aux* | hcos* \ + | chorusrdb* | cegcc* | glidix* | serenity* \ + | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ + | midipix* | mingw32* | mingw64* | mint* \ + | uxpv* | beos* | mpeix* | udk* | moxiebox* \ + | interix* | uwin* | mks* | rhapsody* | darwin* \ + | openstep* | oskit* | conix* | pw32* | nonstopux* \ + | storm-chaos* | tops10* | tenex* | tops20* | its* \ + | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \ + | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \ + | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ + | skyos* | haiku* | rdos* | toppers* | drops* | es* \ + | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ + | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ + | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \ + | fiwix* ) + ;; + # This one is extra strict with allowed versions + sco3.2v2 | sco3.2v[4-9]* | sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + ;; + none) + ;; + *) + echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2 + exit 1 + ;; +esac + +# As a final step for OS-related things, validate the OS-kernel combination +# (given a valid OS), if there is a kernel. +case $kernel-$os in + linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \ + | linux-musl* | linux-relibc* | linux-uclibc* ) + ;; + uclinux-uclibc* ) + ;; + -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* ) + # These are just libc implementations, not actual OSes, and thus + # require a kernel. + echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2 + exit 1 + ;; + kfreebsd*-gnu* | kopensolaris*-gnu*) + ;; + vxworks-simlinux | vxworks-simwindows | vxworks-spe) + ;; + nto-qnx*) + ;; + os2-emx) + ;; + *-eabi* | *-gnueabi*) + ;; + -*) + # Blank kernel with real OS is always fine. + ;; + *-*) + echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2 + exit 1 + ;; +esac + # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) +case $vendor in + unknown) + case $cpu-$os in + *-riscix*) vendor=acorn ;; - -sunos*) + *-sunos*) vendor=sun ;; - -cnk*|-aix*) + *-cnk* | *-aix*) vendor=ibm ;; - -beos*) + *-beos*) vendor=be ;; - -hpux*) + *-hpux*) vendor=hp ;; - -mpeix*) + *-mpeix*) vendor=hp ;; - -hiux*) + *-hiux*) vendor=hitachi ;; - -unos*) + *-unos*) vendor=crds ;; - -dgux*) + *-dgux*) vendor=dg ;; - -luna*) + *-luna*) vendor=omron ;; - -genix*) + *-genix*) vendor=ns ;; - -mvs* | -opened*) + *-clix*) + vendor=intergraph + ;; + *-mvs* | *-opened*) vendor=ibm ;; - -os400*) + *-os400*) vendor=ibm ;; - -ptx*) + s390-* | s390x-*) + vendor=ibm + ;; + *-ptx*) vendor=sequent ;; - -tpf*) + *-tpf*) vendor=ibm ;; - -vxsim* | -vxworks* | -windiss*) + *-vxsim* | *-vxworks* | *-windiss*) vendor=wrs ;; - -aux*) + *-aux*) vendor=apple ;; - -hms*) + *-hms*) vendor=hitachi ;; - -mpw* | -macos*) + *-mpw* | *-macos*) vendor=apple ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) vendor=atari ;; - -vos*) + *-vos*) vendor=stratus ;; esac - basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` ;; esac -echo "$basic_machine$os" +echo "$cpu-$vendor-${kernel:+$kernel-}$os" exit # Local variables: -# eval: (add-hook 'write-file-functions 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" diff --git a/src/libs/opus/configure b/src/libs/opus/configure index 56dcc860..4ca76b50 100755 --- a/src/libs/opus/configure +++ b/src/libs/opus/configure @@ -1,11 +1,12 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for opus 1.4. +# Generated by GNU Autoconf 2.71 for opus 1.5.2. # # Report bugs to . # # -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, +# Inc. # # # This configure script is free software; the Free Software Foundation @@ -16,14 +17,16 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +as_nop=: +if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else +else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -33,46 +36,46 @@ esac fi + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then +if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -81,13 +84,6 @@ if test "${PATH_SEPARATOR+set}" != set; then fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -96,8 +92,12 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS @@ -109,30 +109,10 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. @@ -154,20 +134,22 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + as_bourne_compatible="as_nop=: +if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else +else \$as_nop case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( @@ -187,12 +169,15 @@ as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : +if ( set x; as_fn_ret_success y && test x = \"\$1\" ) +then : -else +else \$as_nop exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 +blah=\$(echo \$(echo blah)) +test x\"\$blah\" = xblah || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO @@ -207,30 +192,38 @@ test -x / || exit 1" test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : + if (eval "$as_required") 2>/dev/null +then : as_have_required=yes -else +else $as_nop as_have_required=no fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null +then : -else +else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base + as_shell=$as_dir$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null +then : break 2 fi fi @@ -238,14 +231,21 @@ fi esac as_found=false done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } IFS=$as_save_IFS +if $as_found +then : + +else $as_nop + if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi +fi - if test "x$CONFIG_SHELL" != x; then : + if test "x$CONFIG_SHELL" != x +then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also @@ -263,18 +263,19 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." + if test x$as_have_required = xno +then : + printf "%s\n" "$0: This script requires a shell more modern than all" + printf "%s\n" "$0: the shells that I found on your system." + if test ${ZSH_VERSION+y} ; then + printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" + printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." else - $as_echo "$0: Please tell bug-autoconf@gnu.org and opus@xiph.org + printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and opus@xiph.org $0: about your system, including any error possibly output $0: before this message. Then install a modern shell, or $0: manually run the script under such a shell if you do @@ -302,6 +303,7 @@ as_fn_unset () } as_unset=as_fn_unset + # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -319,6 +321,14 @@ as_fn_exit () as_fn_set_status $1 exit $1 } # as_fn_exit +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -333,7 +343,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -342,7 +352,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | +printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -381,12 +391,13 @@ as_fn_executable_p () # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : eval 'as_fn_append () { eval $1+=\$2 }' -else +else $as_nop as_fn_append () { eval $1=\$$1\$2 @@ -398,18 +409,27 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else +else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- @@ -421,9 +441,9 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $2" >&2 + printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -450,7 +470,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -494,7 +514,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall @@ -508,6 +528,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits exit } + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -521,6 +545,13 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + + rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -590,48 +621,44 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='opus' PACKAGE_TARNAME='opus' -PACKAGE_VERSION='1.4' -PACKAGE_STRING='opus 1.4' +PACKAGE_VERSION='1.5.2' +PACKAGE_STRING='opus 1.5.2' PACKAGE_BUGREPORT='opus@xiph.org' PACKAGE_URL='' ac_unique_file="src/opus_encoder.c" # Factoring default headers for most tests. ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include +#include +#ifdef HAVE_STDIO_H +# include #endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS +#ifdef HAVE_STDLIB_H # include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif #endif #ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif # include #endif -#ifdef HAVE_STRINGS_H -# include -#endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif #ifdef HAVE_UNISTD_H # include #endif" +ac_header_c_list= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS @@ -641,6 +668,8 @@ EXTRA_PROGRAMS_FALSE EXTRA_PROGRAMS_TRUE HAVE_DOXYGEN_FALSE HAVE_DOXYGEN_TRUE +ENABLE_OSCE_FALSE +ENABLE_OSCE_TRUE HAVE_DOT HAVE_DOXYGEN OPUS_HAVE_RTCD @@ -652,23 +681,27 @@ HAVE_ARM_NE10_FALSE HAVE_ARM_NE10_TRUE HAVE_ARM_NEON_INTR_FALSE HAVE_ARM_NEON_INTR_TRUE +HAVE_ARM_DOTPROD_FALSE +HAVE_ARM_DOTPROD_TRUE CPU_ARM_FALSE CPU_ARM_TRUE -OPUS_X86_AVX_CFLAGS +OPUS_X86_AVX2_CFLAGS OPUS_X86_SSE4_1_CFLAGS OPUS_X86_SSE2_CFLAGS OPUS_X86_SSE_CFLAGS +OPUS_ARM_DOTPROD_INTR_CFLAGS NE10_LIBS NE10_CFLAGS HAVE_ARM_NE10 OPUS_ARM_NEON_INTR_CFLAGS +ARM_DOTPROD_INTR_CFLAGS ARM_NEON_INTR_CFLAGS -X86_AVX_CFLAGS +X86_AVX2_CFLAGS X86_SSE4_1_CFLAGS X86_SSE2_CFLAGS X86_SSE_CFLAGS -HAVE_AVX_FALSE -HAVE_AVX_TRUE +HAVE_AVX2_FALSE +HAVE_AVX2_TRUE HAVE_SSE4_1_FALSE HAVE_SSE4_1_TRUE HAVE_SSE2_FALSE @@ -676,6 +709,8 @@ HAVE_SSE2_TRUE HAVE_SSE_FALSE HAVE_SSE_TRUE ARM2GNU_PARAMS +CPP +OPUS_ARM_MAY_HAVE_DOTPROD OPUS_ARM_MAY_HAVE_NEON OPUS_ARM_MAY_HAVE_MEDIA OPUS_ARM_MAY_HAVE_EDSP @@ -684,6 +719,12 @@ OPUS_ARM_EXTERNAL_ASM_TRUE HAVE_PERL OPUS_ARM_INLINE_ASM_FALSE OPUS_ARM_INLINE_ASM_TRUE +ENABLE_LOSSGEN_FALSE +ENABLE_LOSSGEN_TRUE +ENABLE_DEEP_PLC_FALSE +ENABLE_DEEP_PLC_TRUE +ENABLE_DRED_FALSE +ENABLE_DRED_TRUE CUSTOM_MODES_FALSE CUSTOM_MODES_TRUE DISABLE_FLOAT_API_FALSE @@ -696,7 +737,6 @@ am__fastdepCCAS_TRUE CCASDEPMODE CCASFLAGS CCAS -CPP LT_SYS_LIBRARY_PATH OTOOL64 OTOOL @@ -746,6 +786,9 @@ build MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE +CSCOPE +ETAGS +CTAGS am__untar am__tar AMTAR @@ -834,6 +877,9 @@ enable_fixed_point enable_fixed_point_debug enable_float_api enable_custom_modes +enable_dred +enable_deep_plc +enable_lossgen enable_float_approx enable_asm enable_rtcd @@ -846,6 +892,10 @@ enable_hardening enable_fuzzing enable_check_asm enable_doc +enable_dot_product +enable_dnn_debug_float +enable_osce_training_data +enable_osce enable_extra_programs enable_rfc8251 enable_stack_protector @@ -859,14 +909,15 @@ LDFLAGS LIBS CPPFLAGS LT_SYS_LIBRARY_PATH -CPP CCAS CCASFLAGS +CPP X86_SSE_CFLAGS X86_SSE2_CFLAGS X86_SSE4_1_CFLAGS -X86_AVX_CFLAGS -ARM_NEON_INTR_CFLAGS' +X86_AVX2_CFLAGS +ARM_NEON_INTR_CFLAGS +ARM_DOTPROD_INTR_CFLAGS' # Initialize some variables set by options. @@ -935,8 +986,6 @@ do *) ac_optarg=yes ;; esac - # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; @@ -977,9 +1026,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1003,9 +1052,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1216,9 +1265,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1232,9 +1281,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1278,9 +1327,9 @@ Try \`$0 --help' for more information" *) # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; @@ -1296,7 +1345,7 @@ if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1360,7 +1409,7 @@ $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | +printf "%s\n" X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1417,7 +1466,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures opus 1.4 to adapt to many kinds of systems. +\`configure' configures opus 1.5.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1488,7 +1537,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of opus 1.4:";; + short | recursive ) echo "Configuration of opus 1.5.2:";; esac cat <<\_ACEOF @@ -1517,6 +1566,9 @@ Optional Features: --disable-float-api compile without the floating point API (for machines with no float library) --enable-custom-modes enable non-Opus modes, e.g. 44.1 kHz & 2^n frames + --enable-dred Use Deep REDundancy (DRED) + --enable-deep-plc Use deep PLC for SILK + --enable-lossgen Build opus_demo with packet loss simulator --enable-float-approx enable fast approximations for floating point --disable-asm Disable assembly optimizations --disable-rtcd Disable run-time CPU capabilities detection @@ -1529,6 +1581,12 @@ Optional Features: --enable-check-asm enable bit-exactness checks between optimized and c implementations --disable-doc Do not build API documentation + --disable-dot-product Disable dot product implementation + --enable-dnn-debug-float + Use floating-point DNN computation everywhere + --enable-osce-training-data + enables feature output for SILK enhancement + --enable-osce enables speech coding enhancement --disable-extra-programs Do not build extra programs (demo and tests) --disable-rfc8251 Disable bitstream fixes from RFC 8251 @@ -1564,20 +1622,24 @@ Some influential environment variables: you have headers in a nonstandard directory LT_SYS_LIBRARY_PATH User-defined run-time library search path. - CPP C preprocessor CCAS assembler compiler command (defaults to CC) CCASFLAGS assembler compiler flags (defaults to CFLAGS) + CPP C preprocessor X86_SSE_CFLAGS C compiler flags to compile SSE intrinsics [default=-msse] X86_SSE2_CFLAGS C compiler flags to compile SSE2 intrinsics [default=-msse2] X86_SSE4_1_CFLAGS C compiler flags to compile SSE4.1 intrinsics [default=-msse4.1] - X86_AVX_CFLAGS - C compiler flags to compile AVX intrinsics [default=-mavx] + X86_AVX2_CFLAGS + C compiler flags to compile AVX2 intrinsics [default=-mavx -mfma + -mavx2] ARM_NEON_INTR_CFLAGS C compiler flags to compile ARM NEON intrinsics [default=-mfpu=neon / -mfpu=neon -mfloat-abi=softfp] + ARM_DOTPROD_INTR_CFLAGS + C compiler flags to compile ARM DOTPROD intrinsics + [default="-march=armv8.2-a+dotprod"] Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1598,9 +1660,9 @@ if test "$ac_init_help" = "recursive"; then case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1628,7 +1690,8 @@ esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. + # Check for configure.gnu first; this name is used for a wrapper for + # Metaconfig's "Configure" on case-insensitive file systems. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive @@ -1636,7 +1699,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix echo && $SHELL "$ac_srcdir/configure" --help=recursive else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1645,10 +1708,10 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -opus configure 1.4 -generated by GNU Autoconf 2.69 +opus configure 1.5.2 +generated by GNU Autoconf 2.71 -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2021 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1665,14 +1728,14 @@ fi ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext + rm -f conftest.$ac_objext conftest.beam if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1680,14 +1743,15 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then : + } && test -s conftest.$ac_objext +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1703,14 +1767,14 @@ fi ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext + rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1718,17 +1782,18 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - }; then : + } +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1750,120 +1815,44 @@ fi ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : eval "$3=yes" -else +else $as_nop eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. @@ -1871,16 +1860,9 @@ else #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif + which can conflict with char $2 (); below. */ +#include #undef $2 /* Override any GCC internal prototype to avoid an error. @@ -1898,126 +1880,94 @@ choke me #endif int -main () +main (void) { return $2 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : eval "$3=yes" -else +else $as_nop eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ---------------------------- ## -## Report this to opus@xiph.org ## -## ---------------------------- ##" - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + } +then : + ac_retval=0 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp +ac_configure_args_raw= +for ac_arg +do + case $ac_arg in + *\'*) + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append ac_configure_args_raw " '$ac_arg'" +done + +case $ac_configure_args_raw in + *$as_nl*) + ac_safe_unquote= ;; + *) + ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. + ac_unsafe_a="$ac_unsafe_z#~" + ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" + ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; +esac -} # ac_fn_c_check_header_mongrel cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by opus $as_me 1.4, which was -generated by GNU Autoconf 2.69. Invocation command line was +It was created by opus $as_me 1.5.2, which was +generated by GNU Autoconf 2.71. Invocation command line was - $ $0 $@ + $ $0$ac_configure_args_raw _ACEOF exec 5>>config.log @@ -2050,8 +2000,12 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + printf "%s\n" "PATH: $as_dir" done IFS=$as_save_IFS @@ -2086,7 +2040,7 @@ do | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; @@ -2121,11 +2075,13 @@ done # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? + # Sanitize IFS. + IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo - $as_echo "## ---------------- ## + printf "%s\n" "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo @@ -2136,8 +2092,8 @@ trap 'exit_status=$? case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -2161,7 +2117,7 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - $as_echo "## ----------------- ## + printf "%s\n" "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo @@ -2169,14 +2125,14 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## + printf "%s\n" "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo @@ -2184,15 +2140,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then - $as_echo "## ----------- ## + printf "%s\n" "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo @@ -2200,8 +2156,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; echo fi test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" + printf "%s\n" "$as_me: caught signal $ac_signal" + printf "%s\n" "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -2215,63 +2171,48 @@ ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h -$as_echo "/* confdefs.h */" > confdefs.h +printf "%s\n" "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF +printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF +printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF +printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF +printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF +printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF +printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac + ac_site_files="$CONFIG_SITE" elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site + ac_site_files="$prefix/share/config.site $prefix/etc/config.site" else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site + ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" + +for ac_site_file in $ac_site_files do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} + case $ac_site_file in #( + */*) : + ;; #( + *) : + ac_site_file=./$ac_site_file ;; +esac + if test -f "$ac_site_file" && test -r "$ac_site_file"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi @@ -2281,19 +2222,434 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +printf "%s\n" "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +printf "%s\n" "$as_me: creating cache $cache_file" >&6;} >$cache_file fi +# Test code for whether the C compiler supports C89 (global declarations) +ac_c_conftest_c89_globals=' +/* Does the compiler advertise C89 conformance? + Do not test the value of __STDC__, because some compilers set it to 0 + while being otherwise adequately conformant. */ +#if !defined __STDC__ +# error "Compiler does not advertise C89 conformance" +#endif + +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ +struct buf { int x; }; +struct buf * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not \xHH hex character constants. + These do not provoke an error unfortunately, instead are silently treated + as an "x". The following induces an error, until -std is added to get + proper ANSI mode. Curiously \x00 != x always comes out true, for an + array size at least. It is necessary to write \x00 == 0 to get something + that is true only with -std. */ +int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) '\''x'\'' +int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), + int, int);' + +# Test code for whether the C compiler supports C89 (body of main). +ac_c_conftest_c89_main=' +ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); +' + +# Test code for whether the C compiler supports C99 (global declarations) +ac_c_conftest_c99_globals=' +// Does the compiler advertise C99 conformance? +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L +# error "Compiler does not advertise C99 conformance" +#endif + +#include +extern int puts (const char *); +extern int printf (const char *, ...); +extern int dprintf (int, const char *, ...); +extern void *malloc (size_t); + +// Check varargs macros. These examples are taken from C99 6.10.3.5. +// dprintf is used instead of fprintf to avoid needing to declare +// FILE and stderr. +#define debug(...) dprintf (2, __VA_ARGS__) +#define showlist(...) puts (#__VA_ARGS__) +#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) +static void +test_varargs_macros (void) +{ + int x = 1234; + int y = 5678; + debug ("Flag"); + debug ("X = %d\n", x); + showlist (The first, second, and third items.); + report (x>y, "x is %d but y is %d", x, y); +} + +// Check long long types. +#define BIG64 18446744073709551615ull +#define BIG32 4294967295ul +#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) +#if !BIG_OK + #error "your preprocessor is broken" +#endif +#if BIG_OK +#else + #error "your preprocessor is broken" +#endif +static long long int bignum = -9223372036854775807LL; +static unsigned long long int ubignum = BIG64; + +struct incomplete_array +{ + int datasize; + double data[]; +}; + +struct named_init { + int number; + const wchar_t *name; + double average; +}; + +typedef const char *ccp; + +static inline int +test_restrict (ccp restrict text) +{ + // See if C++-style comments work. + // Iterate through items via the restricted pointer. + // Also check for declarations in for loops. + for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) + continue; + return 0; +} + +// Check varargs and va_copy. +static bool +test_varargs (const char *format, ...) +{ + va_list args; + va_start (args, format); + va_list args_copy; + va_copy (args_copy, args); + + const char *str = ""; + int number = 0; + float fnumber = 0; + + while (*format) + { + switch (*format++) + { + case '\''s'\'': // string + str = va_arg (args_copy, const char *); + break; + case '\''d'\'': // int + number = va_arg (args_copy, int); + break; + case '\''f'\'': // float + fnumber = va_arg (args_copy, double); + break; + default: + break; + } + } + va_end (args_copy); + va_end (args); + + return *str && number && fnumber; +} +' + +# Test code for whether the C compiler supports C99 (body of main). +ac_c_conftest_c99_main=' + // Check bool. + _Bool success = false; + success |= (argc != 0); + + // Check restrict. + if (test_restrict ("String literal") == 0) + success = true; + char *restrict newvar = "Another string"; + + // Check varargs. + success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); + test_varargs_macros (); + + // Check flexible array members. + struct incomplete_array *ia = + malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); + ia->datasize = 10; + for (int i = 0; i < ia->datasize; ++i) + ia->data[i] = i * 1.234; + + // Check named initializers. + struct named_init ni = { + .number = 34, + .name = L"Test wide string", + .average = 543.34343, + }; + + ni.number = 58; + + int dynamic_array[ni.number]; + dynamic_array[0] = argv[0][0]; + dynamic_array[ni.number - 1] = 543; + + // work around unused variable warnings + ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' + || dynamic_array[ni.number - 1] != 543); +' + +# Test code for whether the C compiler supports C11 (global declarations) +ac_c_conftest_c11_globals=' +// Does the compiler advertise C11 conformance? +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L +# error "Compiler does not advertise C11 conformance" +#endif + +// Check _Alignas. +char _Alignas (double) aligned_as_double; +char _Alignas (0) no_special_alignment; +extern char aligned_as_int; +char _Alignas (0) _Alignas (int) aligned_as_int; + +// Check _Alignof. +enum +{ + int_alignment = _Alignof (int), + int_array_alignment = _Alignof (int[100]), + char_alignment = _Alignof (char) +}; +_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); + +// Check _Noreturn. +int _Noreturn does_not_return (void) { for (;;) continue; } + +// Check _Static_assert. +struct test_static_assert +{ + int x; + _Static_assert (sizeof (int) <= sizeof (long int), + "_Static_assert does not work in struct"); + long int y; +}; + +// Check UTF-8 literals. +#define u8 syntax error! +char const utf8_literal[] = u8"happens to be ASCII" "another string"; + +// Check duplicate typedefs. +typedef long *long_ptr; +typedef long int *long_ptr; +typedef long_ptr long_ptr; + +// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. +struct anonymous +{ + union { + struct { int i; int j; }; + struct { int k; long int l; } w; + }; + int m; +} v1; +' + +# Test code for whether the C compiler supports C11 (body of main). +ac_c_conftest_c11_main=' + _Static_assert ((offsetof (struct anonymous, i) + == offsetof (struct anonymous, w.k)), + "Anonymous union alignment botch"); + v1.i = 2; + v1.w.k = 5; + ok |= v1.i != 5; +' + +# Test code for whether the C compiler supports C11 (complete). +ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} +${ac_c_conftest_c99_globals} +${ac_c_conftest_c11_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + ${ac_c_conftest_c99_main} + ${ac_c_conftest_c11_main} + return ok; +} +" + +# Test code for whether the C compiler supports C99 (complete). +ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} +${ac_c_conftest_c99_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + ${ac_c_conftest_c99_main} + return ok; +} +" + +# Test code for whether the C compiler supports C89 (complete). +ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + return ok; +} +" + +as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" +as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" +as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" +as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" +as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" +as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" +as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" +as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" +as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" + +# Auxiliary files required by this configure script. +ac_aux_files="compile ltmain.sh config.guess config.sub missing install-sh" + +# Locations in which to look for auxiliary files. +ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.." + +# Search for a directory containing all of the required auxiliary files, +# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. +# If we don't find one directory that contains all the files we need, +# we report the set of missing files from the *first* directory in +# $ac_aux_dir_candidates and give up. +ac_missing_aux_files="" +ac_first_candidate=: +printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in $ac_aux_dir_candidates +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + as_found=: + + printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 + ac_aux_dir_found=yes + ac_install_sh= + for ac_aux in $ac_aux_files + do + # As a special case, if "install-sh" is required, that requirement + # can be satisfied by any of "install-sh", "install.sh", or "shtool", + # and $ac_install_sh is set appropriately for whichever one is found. + if test x"$ac_aux" = x"install-sh" + then + if test -f "${as_dir}install-sh"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 + ac_install_sh="${as_dir}install-sh -c" + elif test -f "${as_dir}install.sh"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 + ac_install_sh="${as_dir}install.sh -c" + elif test -f "${as_dir}shtool"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 + ac_install_sh="${as_dir}shtool install -c" + else + ac_aux_dir_found=no + if $ac_first_candidate; then + ac_missing_aux_files="${ac_missing_aux_files} install-sh" + else + break + fi + fi + else + if test -f "${as_dir}${ac_aux}"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 + else + ac_aux_dir_found=no + if $ac_first_candidate; then + ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" + else + break + fi + fi + fi + done + if test "$ac_aux_dir_found" = yes; then + ac_aux_dir="$as_dir" + break + fi + ac_first_candidate=false + + as_found=false +done +IFS=$as_save_IFS +if $as_found +then : + +else $as_nop + as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 +fi + + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +if test -f "${ac_aux_dir}config.guess"; then + ac_config_guess="$SHELL ${ac_aux_dir}config.guess" +fi +if test -f "${ac_aux_dir}config.sub"; then + ac_config_sub="$SHELL ${ac_aux_dir}config.sub" +fi +if test -f "$ac_aux_dir/configure"; then + ac_configure="$SHELL ${ac_aux_dir}configure" +fi + # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false @@ -2304,12 +2660,12 @@ for ac_var in $ac_precious_vars; do eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) @@ -2318,24 +2674,24 @@ $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -2345,11 +2701,12 @@ $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi done if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' + and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -2367,7 +2724,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then : +if test ${enable_silent_rules+y} +then : enableval=$enable_silent_rules; fi @@ -2377,12 +2735,13 @@ case $enable_silent_rules in # ((( *) AM_DEFAULT_VERBOSITY=0;; esac am_make=${MAKE-make} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 -$as_echo_n "checking whether $am_make supports nested variables... " >&6; } -if ${am_cv_make_support_nested_variables+:} false; then : - $as_echo_n "(cached) " >&6 -else - if $as_echo 'TRUE=$(BAR$(V)) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +printf %s "checking whether $am_make supports nested variables... " >&6; } +if test ${am_cv_make_support_nested_variables+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if printf "%s\n" 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 @@ -2394,8 +2753,8 @@ else am_cv_make_support_nested_variables=no fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 -$as_echo "$am_cv_make_support_nested_variables" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +printf "%s\n" "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' @@ -2407,9 +2766,9 @@ AM_BACKSLASH='\' # For libtool. -OPUS_LT_CURRENT=9 -OPUS_LT_REVISION=0 -OPUS_LT_AGE=9 +OPUS_LT_CURRENT=10 +OPUS_LT_REVISION=1 +OPUS_LT_AGE=10 @@ -2417,36 +2776,9 @@ OPUS_LT_AGE=9 am__api_version='1.16' -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. -# Find a good install program. We prefer a C program (faster), + # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install @@ -2460,20 +2792,25 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +printf %s "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if ${ac_cv_path_install+:} false; then : - $as_echo_n "(cached) " >&6 -else +if test ${ac_cv_path_install+y} +then : + printf %s "(cached) " >&6 +else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + # Account for fact that we put trailing slashes in our PATH walk. +case $as_dir in #(( + ./ | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; @@ -2483,13 +2820,13 @@ case $as_dir/ in #(( # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else @@ -2497,12 +2834,12 @@ case $as_dir/ in #(( echo one > conftest.one echo two > conftest.two mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c" break 3 fi fi @@ -2518,7 +2855,7 @@ IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi - if test "${ac_cv_path_install+set}" = set; then + if test ${ac_cv_path_install+y}; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a @@ -2528,8 +2865,8 @@ fi INSTALL=$ac_install_sh fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +printf "%s\n" "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -2539,8 +2876,8 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +printf %s "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -2594,8 +2931,8 @@ else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= @@ -2614,26 +2951,23 @@ test "$program_suffix" != NONE && # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` +program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"` + # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac + + if test x"${MISSING+set}" != xset; then + MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then @@ -2653,11 +2987,12 @@ if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_STRIP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else @@ -2665,11 +3000,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2680,11 +3019,11 @@ fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +printf "%s\n" "$STRIP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -2693,11 +3032,12 @@ if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_STRIP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else @@ -2705,11 +3045,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2720,11 +3064,11 @@ fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +printf "%s\n" "$ac_ct_STRIP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then @@ -2732,8 +3076,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP @@ -2745,25 +3089,31 @@ fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5 +printf %s "checking for a race-free mkdir -p... " >&6; } if test -z "$MKDIR_P"; then - if ${ac_cv_path_mkdir+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test ${ac_cv_path_mkdir+y} +then : + printf %s "(cached) " >&6 +else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do - as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ + as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue + case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir ('*'coreutils) '* | \ + 'BusyBox '* | \ 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext break 3;; esac done @@ -2774,7 +3124,7 @@ IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version - if test "${ac_cv_path_mkdir+set}" = set; then + if test ${ac_cv_path_mkdir+y}; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a @@ -2784,18 +3134,19 @@ fi MKDIR_P="$ac_install_sh -d" fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +printf "%s\n" "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AWK+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_AWK+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else @@ -2803,11 +3154,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2818,24 +3173,25 @@ fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +printf "%s\n" "$AWK" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi test -n "$AWK" && break done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else +ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval test \${ac_cv_prog_make_${ac_make}_set+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @@ -2851,12 +3207,12 @@ esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } SET_MAKE= else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -2891,7 +3247,7 @@ fi # Define the identity of the package. PACKAGE='opus' - VERSION='1.4' + VERSION='1.5.2' # Some tools Automake needs. @@ -2932,6 +3288,20 @@ am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' +# Variables for tags utilities; see am/tags.am +if test -z "$CTAGS"; then + CTAGS=ctags +fi + +if test -z "$ETAGS"; then + ETAGS=etags +fi + +if test -z "$CSCOPE"; then + CSCOPE=cscope +fi + + # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile @@ -2976,17 +3346,18 @@ END fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 -$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +printf %s "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. -if test "${enable_maintainer_mode+set}" = set; then : +if test ${enable_maintainer_mode+y} +then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval -else +else $as_nop USE_MAINTAINER_MODE=yes fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 -$as_echo "$USE_MAINTAINER_MODE" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 +printf "%s\n" "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' @@ -2999,26 +3370,29 @@ fi -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if ${ac_cv_build+:} false; then : - $as_echo_n "(cached) " >&6 -else + + # Make sure we can run config.sub. +$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +printf %s "checking build system type... " >&6; } +if test ${ac_cv_build+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_build_alias=$build_alias test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` + ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 +ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +printf "%s\n" "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; @@ -3037,21 +3411,22 @@ IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if ${ac_cv_host+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +printf %s "checking host system type... " >&6; } +if test ${ac_cv_host+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +printf "%s\n" "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; @@ -3078,8 +3453,8 @@ esac case `pwd` in *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac @@ -3099,6 +3474,7 @@ macro_revision='2.4.6' + ltmain=$ac_aux_dir/ltmain.sh # Backslashify metacharacters that are still active within @@ -3122,8 +3498,8 @@ ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -$as_echo_n "checking how to print strings... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +printf %s "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then @@ -3149,12 +3525,12 @@ func_echo_all () } case $ECHO in - printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -$as_echo "printf" >&6; } ;; - print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -$as_echo "print -r" >&6; } ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -$as_echo "cat" >&6; } ;; + printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +printf "%s\n" "printf" >&6; } ;; + print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +printf "%s\n" "print -r" >&6; } ;; + *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +printf "%s\n" "cat" >&6; } ;; esac @@ -3167,6 +3543,15 @@ esac + + + + + + + + + @@ -3174,8 +3559,8 @@ DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 -$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 +printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; } cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out @@ -3211,11 +3596,12 @@ esac fi done rm -f confinc.* confmf.* -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 -$as_echo "${_am_result}" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 +printf "%s\n" "${_am_result}" >&6; } # Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : +if test ${enable_dependency_tracking+y} +then : enableval=$enable_dependency_tracking; fi @@ -3241,11 +3627,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3253,11 +3640,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3268,11 +3659,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3281,11 +3672,12 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -3293,11 +3685,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3308,11 +3704,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -3320,8 +3716,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -3334,11 +3730,12 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3346,11 +3743,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3361,11 +3762,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3374,11 +3775,12 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3387,15 +3789,19 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3411,18 +3817,18 @@ if test $ac_prog_rejected = yes; then # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3433,11 +3839,12 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3445,11 +3852,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3460,11 +3871,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3477,11 +3888,12 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -3489,11 +3901,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3504,11 +3920,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3520,8 +3936,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -3529,25 +3945,129 @@ esac fi fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. +set dummy ${ac_tool_prefix}clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "clang", so it can be a program name with args. +set dummy clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +fi + + +test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -for ac_option in --version -v -V -qversion; do +for ac_option in --version -v -V -qversion -version; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -3557,7 +4077,7 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done @@ -3565,7 +4085,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; @@ -3577,9 +4097,9 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +printf %s "checking whether the C compiler works... " >&6; } +ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" @@ -3600,11 +4120,12 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, @@ -3621,7 +4142,7 @@ do # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -3637,44 +4158,46 @@ do done test "$ac_cv_exeext" = no && ac_cv_exeext= -else +else $as_nop ac_file='' fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 +if test -z "$ac_file" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +printf %s "checking for C compiler default output file name... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +printf "%s\n" "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +printf %s "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -3688,15 +4211,15 @@ for ac_file in conftest.exe conftest conftest.*; do * ) break;; esac done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +printf "%s\n" "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext @@ -3705,7 +4228,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main () +main (void) { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; @@ -3717,8 +4240,8 @@ _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +printf %s "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in @@ -3726,10 +4249,10 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in @@ -3737,39 +4260,40 @@ $as_echo "$ac_try_echo"; } >&5 *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +printf "%s\n" "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +printf %s "checking for suffix of object files... " >&6; } +if test ${ac_cv_objext+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; @@ -3783,11 +4307,12 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in @@ -3796,31 +4321,32 @@ $as_echo "$ac_try_echo"; } >&5 break;; esac done -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +printf "%s\n" "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 +printf %s "checking whether the compiler supports GNU C... " >&6; } +if test ${ac_cv_c_compiler_gnu+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { #ifndef __GNUC__ choke me @@ -3830,29 +4356,33 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_compiler_gnu=yes -else +else $as_nop ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } +ac_compiler_gnu=$ac_cv_c_compiler_gnu + if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi -ac_test_CFLAGS=${CFLAGS+set} +ac_test_CFLAGS=${CFLAGS+y} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +printf %s "checking whether $CC accepts -g... " >&6; } +if test ${ac_cv_prog_cc_g+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no @@ -3861,57 +4391,60 @@ else /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_g=yes -else +else $as_nop CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : -else +else $as_nop ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +printf "%s\n" "$ac_cv_prog_cc_g" >&6; } +if test $ac_test_CFLAGS; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then @@ -3926,94 +4459,144 @@ else CFLAGS= fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else +ac_prog_cc_stdc=no +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 +printf %s "checking for $CC option to enable C11 features... " >&6; } +if test ${ac_cv_prog_cc_c11+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c11=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c11_program +_ACEOF +for ac_arg in '' -std=gnu11 +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c11=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c11" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi + +if test "x$ac_cv_prog_cc_c11" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c11" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 +printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } + CC="$CC $ac_cv_prog_cc_c11" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 + ac_prog_cc_stdc=c11 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 +printf %s "checking for $CC option to enable C99 features... " >&6; } +if test ${ac_cv_prog_cc_c99+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c99=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c99_program +_ACEOF +for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c99=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c99" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi + +if test "x$ac_cv_prog_cc_c99" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c99" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } + CC="$CC $ac_cv_prog_cc_c99" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 + ac_prog_cc_stdc=c99 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 +printf %s "checking for $CC option to enable C89 features... " >&6; } +if test ${ac_cv_prog_cc_c89+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} +$ac_c_conftest_c89_program _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : + if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_c89=$ac_arg fi -rm -f core conftest.err conftest.$ac_objext +rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC - fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : +if test "x$ac_cv_prog_cc_c89" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c89" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } + CC="$CC $ac_cv_prog_cc_c89" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 + ac_prog_cc_stdc=c89 +fi fi ac_ext=c @@ -4022,21 +4605,23 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -ac_ext=c + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 -$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } -if ${am_cv_prog_cc_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +printf %s "checking whether $CC understands -c and -o together... " >&6; } +if test ${am_cv_prog_cc_c_o+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; @@ -4064,8 +4649,8 @@ _ACEOF rm -f core conftest* unset am_i fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 -$as_echo "$am_cv_prog_cc_c_o" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +printf "%s\n" "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. @@ -4083,11 +4668,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CC_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +printf %s "checking dependency style of $depcc... " >&6; } +if test ${am_cv_CC_dependencies_compiler_type+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For @@ -4194,8 +4780,8 @@ else fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if @@ -4209,11 +4795,12 @@ else fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if ${ac_cv_path_SED+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +printf %s "checking for a sed that does not truncate output... " >&6; } +if test ${ac_cv_path_SED+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" @@ -4227,10 +4814,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in sed gsed + do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + ac_path_SED="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED @@ -4239,13 +4831,13 @@ case `"$ac_path_SED" --version 2>&1` in ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 - $as_echo_n 0123456789 >"conftest.in" + printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" + printf "%s\n" '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -4273,8 +4865,8 @@ else fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +printf "%s\n" "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed @@ -4291,11 +4883,12 @@ Xsed="$SED -e 1s/^X//" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +printf %s "checking for grep that handles long lines and -e... " >&6; } +if test ${ac_cv_path_GREP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST @@ -4303,10 +4896,15 @@ else for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in grep ggrep + do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + ac_path_GREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP @@ -4315,13 +4913,13 @@ case `"$ac_path_GREP" --version 2>&1` in ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 - $as_echo_n 0123456789 >"conftest.in" + printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" + printf "%s\n" 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -4349,16 +4947,17 @@ else fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +printf "%s\n" "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +printf %s "checking for egrep... " >&6; } +if test ${ac_cv_path_EGREP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else @@ -4369,10 +4968,15 @@ else for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in egrep + do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP @@ -4381,13 +4985,13 @@ case `"$ac_path_EGREP" --version 2>&1` in ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 - $as_echo_n 0123456789 >"conftest.in" + printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" + printf "%s\n" 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -4416,16 +5020,17 @@ fi fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +printf "%s\n" "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -$as_echo_n "checking for fgrep... " >&6; } -if ${ac_cv_path_FGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 +printf %s "checking for fgrep... " >&6; } +if test ${ac_cv_path_FGREP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else @@ -4436,10 +5041,15 @@ else for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in fgrep + do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" + ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP @@ -4448,13 +5058,13 @@ case `"$ac_path_FGREP" --version 2>&1` in ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 - $as_echo_n 0123456789 >"conftest.in" + printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - $as_echo 'FGREP' >> "conftest.nl" + printf "%s\n" 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -4483,8 +5093,8 @@ fi fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -$as_echo "$ac_cv_path_FGREP" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 +printf "%s\n" "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" @@ -4509,17 +5119,18 @@ test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : +if test ${with_gnu_ld+y} +then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes -else +else $as_nop with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +printf %s "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw @@ -4548,15 +5159,16 @@ $as_echo_n "checking for ld used by $CC... " >&6; } ;; esac elif test yes = "$with_gnu_ld"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +printf %s "checking for GNU ld... " >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +printf %s "checking for non-GNU ld... " >&6; } fi -if ${lt_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 -else +if test ${lt_cv_path_LD+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do @@ -4585,18 +5197,19 @@ fi LD=$lt_cv_path_LD if test -n "$LD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 -$as_echo "$LD" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +printf "%s\n" "$LD" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${lt_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +printf %s "checking if the linker ($LD) is GNU ld... " >&6; } +if test ${lt_cv_prog_gnu_ld+y} +then : + printf %s "(cached) " >&6 +else $as_nop # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 +printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld @@ -4619,11 +5232,12 @@ with_gnu_ld=$lt_cv_prog_gnu_ld -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if ${lt_cv_path_NM+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 +printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if test ${lt_cv_path_NM+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM @@ -4673,8 +5287,8 @@ else : ${lt_cv_path_NM=no} fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 +printf "%s\n" "$lt_cv_path_NM" >&6; } if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else @@ -4687,11 +5301,12 @@ else do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_DUMPBIN+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else @@ -4699,11 +5314,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4714,11 +5333,11 @@ fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 +printf "%s\n" "$DUMPBIN" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -4731,11 +5350,12 @@ if test -z "$DUMPBIN"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_DUMPBIN+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else @@ -4743,11 +5363,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4758,11 +5382,11 @@ fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 +printf "%s\n" "$ac_ct_DUMPBIN" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -4774,8 +5398,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN @@ -4803,11 +5427,12 @@ test -z "$NM" && NM=nm -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if ${lt_cv_nm_interface+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 +printf %s "checking the name lister ($NM) interface... " >&6; } +if test ${lt_cv_nm_interface+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) @@ -4823,26 +5448,27 @@ else fi rm -f conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 +printf "%s\n" "$lt_cv_nm_interface" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +printf %s "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +printf "%s\n" "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -$as_echo_n "checking the maximum length of command line arguments... " >&6; } -if ${lt_cv_sys_max_cmd_len+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 +printf %s "checking the maximum length of command line arguments... " >&6; } +if test ${lt_cv_sys_max_cmd_len+y} +then : + printf %s "(cached) " >&6 +else $as_nop i=0 teststring=ABCD @@ -4969,11 +5595,11 @@ else fi if test -n "$lt_cv_sys_max_cmd_len"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -$as_echo "$lt_cv_sys_max_cmd_len" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 +printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5 +printf "%s\n" "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len @@ -5017,11 +5643,12 @@ esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -if ${lt_cv_to_host_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +printf %s "checking how to convert $build file names to $host format... " >&6; } +if test ${lt_cv_to_host_file_cmd+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $host in *-*-mingw* ) case $build in @@ -5057,18 +5684,19 @@ esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -$as_echo "$lt_cv_to_host_file_cmd" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -if ${lt_cv_to_tool_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +printf %s "checking how to convert $build file names to toolchain format... " >&6; } +if test ${lt_cv_to_tool_file_cmd+y} +then : + printf %s "(cached) " >&6 +else $as_nop #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in @@ -5084,22 +5712,23 @@ esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -$as_echo "$lt_cv_to_tool_file_cmd" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if ${lt_cv_ld_reload_flag+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 +printf %s "checking for $LD option to reload object files... " >&6; } +if test ${lt_cv_ld_reload_flag+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_ld_reload_flag='-r' fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 +printf "%s\n" "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; @@ -5132,11 +5761,12 @@ esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_OBJDUMP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else @@ -5144,11 +5774,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5159,11 +5793,11 @@ fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +printf "%s\n" "$OBJDUMP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -5172,11 +5806,12 @@ if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_OBJDUMP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else @@ -5184,11 +5819,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5199,11 +5838,11 @@ fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +printf "%s\n" "$ac_ct_OBJDUMP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then @@ -5211,8 +5850,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP @@ -5231,11 +5870,12 @@ test -z "$OBJDUMP" && OBJDUMP=objdump -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -$as_echo_n "checking how to recognize dependent libraries... " >&6; } -if ${lt_cv_deplibs_check_method+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 +printf %s "checking how to recognize dependent libraries... " >&6; } +if test ${lt_cv_deplibs_check_method+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' @@ -5431,8 +6071,8 @@ os2*) esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +printf "%s\n" "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no @@ -5476,11 +6116,12 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_DLLTOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else @@ -5488,11 +6129,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5503,11 +6148,11 @@ fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +printf "%s\n" "$DLLTOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -5516,11 +6161,12 @@ if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_DLLTOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else @@ -5528,11 +6174,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5543,11 +6193,11 @@ fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +printf "%s\n" "$ac_ct_DLLTOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then @@ -5555,8 +6205,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL @@ -5576,11 +6226,12 @@ test -z "$DLLTOOL" && DLLTOOL=dlltool -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +printf %s "checking how to associate runtime and link libraries... " >&6; } +if test ${lt_cv_sharedlib_from_linklib_cmd+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in @@ -5603,8 +6254,8 @@ cygwin* | mingw* | pw32* | cegcc*) esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO @@ -5620,11 +6271,12 @@ if test -n "$ac_tool_prefix"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_AR+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else @@ -5632,11 +6284,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5647,11 +6303,11 @@ fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +printf "%s\n" "$AR" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -5664,11 +6320,12 @@ if test -z "$AR"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_AR+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else @@ -5676,11 +6333,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5691,11 +6352,11 @@ fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +printf "%s\n" "$ac_ct_AR" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -5707,8 +6368,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR @@ -5728,30 +6389,32 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -$as_echo_n "checking for archiver @FILE support... " >&6; } -if ${lt_cv_ar_at_file+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +printf %s "checking for archiver @FILE support... " >&6; } +if test ${lt_cv_ar_at_file+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. @@ -5759,7 +6422,7 @@ if ac_fn_c_try_compile "$LINENO"; then : { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ @@ -5768,11 +6431,11 @@ if ac_fn_c_try_compile "$LINENO"; then : rm -f conftest.* libconftest.a fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -$as_echo "$lt_cv_ar_at_file" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +printf "%s\n" "$lt_cv_ar_at_file" >&6; } if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= @@ -5789,11 +6452,12 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_STRIP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else @@ -5801,11 +6465,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5816,11 +6484,11 @@ fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +printf "%s\n" "$STRIP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -5829,11 +6497,12 @@ if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_STRIP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else @@ -5841,11 +6510,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5856,11 +6529,11 @@ fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +printf "%s\n" "$ac_ct_STRIP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then @@ -5868,8 +6541,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP @@ -5888,11 +6561,12 @@ test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_RANLIB+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else @@ -5900,11 +6574,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5915,11 +6593,11 @@ fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +printf "%s\n" "$RANLIB" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -5928,11 +6606,12 @@ if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_RANLIB+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else @@ -5940,11 +6619,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5955,11 +6638,11 @@ fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +printf "%s\n" "$ac_ct_RANLIB" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then @@ -5967,8 +6650,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB @@ -6057,11 +6740,12 @@ compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if ${lt_cv_sys_global_symbol_pipe+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 +printf %s "checking command to parse $NM output from $compiler object... " >&6; } +if test ${lt_cv_sys_global_symbol_pipe+y} +then : + printf %s "(cached) " >&6 +else $as_nop # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] @@ -6213,7 +6897,7 @@ _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm @@ -6286,7 +6970,7 @@ _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi @@ -6321,11 +7005,11 @@ if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -$as_echo "failed" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +printf "%s\n" "failed" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +printf "%s\n" "ok" >&6; } fi # Response file support. @@ -6371,13 +7055,14 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -$as_echo_n "checking for sysroot... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +printf %s "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. -if test "${with_sysroot+set}" = set; then : +if test ${with_sysroot+y} +then : withval=$with_sysroot; -else +else $as_nop with_sysroot=no fi @@ -6395,24 +7080,25 @@ case $with_sysroot in #( no|'') ;; #( *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 -$as_echo "$with_sysroot" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 +printf "%s\n" "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -$as_echo "${lt_sysroot:-no}" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +printf "%s\n" "${lt_sysroot:-no}" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 -$as_echo_n "checking for a working dd... " >&6; } -if ${ac_cv_path_lt_DD+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 +printf %s "checking for a working dd... " >&6; } +if test ${ac_cv_path_lt_DD+y} +then : + printf %s "(cached) " >&6 +else $as_nop printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} @@ -6423,10 +7109,15 @@ if test -z "$lt_DD"; then for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in dd; do + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in dd + do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" + ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_lt_DD" || continue if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ @@ -6446,15 +7137,16 @@ fi rm -f conftest.i conftest2.i conftest.out fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 -$as_echo "$ac_cv_path_lt_DD" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 +printf "%s\n" "$ac_cv_path_lt_DD" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 -$as_echo_n "checking how to truncate binary pipes... " >&6; } -if ${lt_cv_truncate_bin+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 +printf %s "checking how to truncate binary pipes... " >&6; } +if test ${lt_cv_truncate_bin+y} +then : + printf %s "(cached) " >&6 +else $as_nop printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= @@ -6465,8 +7157,8 @@ fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 -$as_echo "$lt_cv_truncate_bin" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 +printf "%s\n" "$lt_cv_truncate_bin" >&6; } @@ -6489,7 +7181,8 @@ func_cc_basename () } # Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then : +if test ${enable_libtool_lock+y} +then : enableval=$enable_libtool_lock; fi @@ -6505,7 +7198,7 @@ ia64-*-hpux*) if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) @@ -6525,7 +7218,7 @@ ia64-*-hpux*) if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in @@ -6563,7 +7256,7 @@ mips64*-*linux*) if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf case `/usr/bin/file conftest.$ac_objext` in @@ -6604,7 +7297,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) @@ -6667,11 +7360,12 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -$as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if ${lt_cv_cc_needs_belf+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 +printf %s "checking whether the C compiler needs -belf... " >&6; } +if test ${lt_cv_cc_needs_belf+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -6682,19 +7376,20 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : lt_cv_cc_needs_belf=yes -else +else $as_nop lt_cv_cc_needs_belf=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -6703,8 +7398,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +printf "%s\n" "$lt_cv_cc_needs_belf" >&6; } if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS @@ -6717,7 +7412,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; } if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) @@ -6754,11 +7449,12 @@ need_locks=$enable_libtool_lock if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_MANIFEST_TOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else @@ -6766,11 +7462,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6781,11 +7481,11 @@ fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -$as_echo "$MANIFEST_TOOL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +printf "%s\n" "$MANIFEST_TOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -6794,11 +7494,12 @@ if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else @@ -6806,11 +7507,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6821,11 +7526,11 @@ fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then @@ -6833,8 +7538,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL @@ -6844,11 +7549,12 @@ else fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -if ${lt_cv_path_mainfest_tool+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if test ${lt_cv_path_mainfest_tool+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out @@ -6858,8 +7564,8 @@ else fi rm -f conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -$as_echo "$lt_cv_path_mainfest_tool" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; } if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi @@ -6874,11 +7580,12 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_DSYMUTIL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else @@ -6886,11 +7593,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6901,11 +7612,11 @@ fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 +printf "%s\n" "$DSYMUTIL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -6914,11 +7625,12 @@ if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_DSYMUTIL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else @@ -6926,11 +7638,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6941,11 +7657,11 @@ fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 +printf "%s\n" "$ac_ct_DSYMUTIL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then @@ -6953,8 +7669,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL @@ -6966,11 +7682,12 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_NMEDIT+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else @@ -6978,11 +7695,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6993,11 +7714,11 @@ fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 +printf "%s\n" "$NMEDIT" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -7006,11 +7727,12 @@ if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_NMEDIT+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else @@ -7018,11 +7740,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7033,11 +7759,11 @@ fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 +printf "%s\n" "$ac_ct_NMEDIT" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then @@ -7045,8 +7771,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT @@ -7058,11 +7784,12 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_LIPO+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else @@ -7070,11 +7797,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7085,11 +7816,11 @@ fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +printf "%s\n" "$LIPO" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -7098,11 +7829,12 @@ if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_LIPO+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else @@ -7110,11 +7842,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7125,11 +7861,11 @@ fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -$as_echo "$ac_ct_LIPO" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 +printf "%s\n" "$ac_ct_LIPO" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then @@ -7137,8 +7873,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO @@ -7150,11 +7886,12 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_OTOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else @@ -7162,11 +7899,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7177,11 +7918,11 @@ fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -$as_echo "$OTOOL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 +printf "%s\n" "$OTOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -7190,11 +7931,12 @@ if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_OTOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else @@ -7202,11 +7944,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7217,11 +7963,11 @@ fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -$as_echo "$ac_ct_OTOOL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 +printf "%s\n" "$ac_ct_OTOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then @@ -7229,8 +7975,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL @@ -7242,11 +7988,12 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_OTOOL64+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else @@ -7254,11 +8001,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7269,11 +8020,11 @@ fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -$as_echo "$OTOOL64" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 +printf "%s\n" "$OTOOL64" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -7282,11 +8033,12 @@ if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_OTOOL64+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else @@ -7294,11 +8046,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7309,11 +8065,11 @@ fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -$as_echo "$ac_ct_OTOOL64" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 +printf "%s\n" "$ac_ct_OTOOL64" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then @@ -7321,8 +8077,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 @@ -7357,11 +8113,12 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -if ${lt_cv_apple_cc_single_mod+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 +printf %s "checking for -single_module linker flag... " >&6; } +if test ${lt_cv_apple_cc_single_mod+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override @@ -7390,14 +8147,15 @@ else rm -f conftest.* fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if ${lt_cv_ld_exported_symbols_list+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +printf %s "checking for -exported_symbols_list linker flag... " >&6; } +if test ${lt_cv_ld_exported_symbols_list+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym @@ -7406,31 +8164,33 @@ else /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : lt_cv_ld_exported_symbols_list=yes -else +else $as_nop lt_cv_ld_exported_symbols_list=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 -$as_echo_n "checking for -force_load linker flag... " >&6; } -if ${lt_cv_ld_force_load+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +printf %s "checking for -force_load linker flag... " >&6; } +if test ${lt_cv_ld_force_load+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} @@ -7458,8 +8218,8 @@ _LT_EOF rm -rf conftest.dSYM fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -$as_echo "$lt_cv_ld_force_load" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +printf "%s\n" "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; @@ -7470,11 +8230,11 @@ $as_echo "$lt_cv_ld_force_load" >&6; } # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? 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' ;; 10.[012][,.]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) + 10.*|11.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; @@ -7530,286 +8290,43 @@ func_munge_path_list () esac } -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes +ac_header= ac_cache= +for ac_item in $ac_header_c_list do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - + if test $ac_cache; then + ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" + if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then + printf "%s\n" "#define $ac_item 1" >> confdefs.h + fi + ac_header= ac_cache= + elif test $ac_header; then + ac_cache=$ac_item + else + ac_header=$ac_item + fi done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - done - ac_cv_prog_CPP=$CPP + + + + + + + +if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes +then : + +printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +if test "x$ac_cv_header_dlfcn_h" = xyes +then : + printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h fi -done - - -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLFCN_H 1 -_ACEOF - -fi - -done - @@ -7825,7 +8342,8 @@ done # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : +if test ${enable_shared+y} +then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; @@ -7843,7 +8361,7 @@ if test "${enable_shared+set}" = set; then : IFS=$lt_save_ifs ;; esac -else +else $as_nop enable_shared=yes fi @@ -7856,7 +8374,8 @@ fi # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : +if test ${enable_static+y} +then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; @@ -7874,7 +8393,7 @@ if test "${enable_static+set}" = set; then : IFS=$lt_save_ifs ;; esac -else +else $as_nop enable_static=yes fi @@ -7888,7 +8407,8 @@ fi # Check whether --with-pic was given. -if test "${with_pic+set}" = set; then : +if test ${with_pic+y} +then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; @@ -7905,7 +8425,7 @@ if test "${with_pic+set}" = set; then : IFS=$lt_save_ifs ;; esac -else +else $as_nop pic_mode=default fi @@ -7917,7 +8437,8 @@ fi # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : +if test ${enable_fast_install+y} +then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; @@ -7935,7 +8456,7 @@ if test "${enable_fast_install+set}" = set; then : IFS=$lt_save_ifs ;; esac -else +else $as_nop enable_fast_install=yes fi @@ -7949,11 +8470,12 @@ fi shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[5-9]*,yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 -$as_echo_n "checking which variant of shared library versioning to provide... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 +printf %s "checking which variant of shared library versioning to provide... " >&6; } # Check whether --with-aix-soname was given. -if test "${with_aix_soname+set}" = set; then : +if test ${with_aix_soname+y} +then : withval=$with_aix_soname; case $withval in aix|svr4|both) ;; @@ -7962,18 +8484,19 @@ if test "${with_aix_soname+set}" = set; then : ;; esac lt_cv_with_aix_soname=$with_aix_soname -else - if ${lt_cv_with_aix_soname+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + if test ${lt_cv_with_aix_soname+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_with_aix_soname=aix fi with_aix_soname=$lt_cv_with_aix_soname fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 -$as_echo "$with_aix_soname" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 +printf "%s\n" "$with_aix_soname" >&6; } if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', @@ -8055,11 +8578,12 @@ if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if ${lt_cv_objdir+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 +printf %s "checking for objdir... " >&6; } +if test ${lt_cv_objdir+y} +then : + printf %s "(cached) " >&6 +else $as_nop rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then @@ -8070,17 +8594,15 @@ else fi rmdir .libs 2>/dev/null fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 +printf "%s\n" "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF +printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h @@ -8126,11 +8648,12 @@ test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 +printf %s "checking for ${ac_tool_prefix}file... " >&6; } +if test ${lt_cv_path_MAGIC_CMD+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. @@ -8179,11 +8702,11 @@ fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +printf "%s\n" "$MAGIC_CMD" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -8192,11 +8715,12 @@ fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -$as_echo_n "checking for file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5 +printf %s "checking for file... " >&6; } +if test ${lt_cv_path_MAGIC_CMD+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. @@ -8245,11 +8769,11 @@ fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +printf "%s\n" "$MAGIC_CMD" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -8334,11 +8858,12 @@ if test yes = "$GCC"; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if test ${lt_cv_prog_compiler_rtti_exceptions+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext @@ -8369,8 +8894,8 @@ else $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" @@ -8733,26 +9258,28 @@ case $host_os in ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if ${lt_cv_prog_compiler_pic+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +printf %s "checking for $compiler option to produce PIC... " >&6; } +if test ${lt_cv_prog_compiler_pic+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -$as_echo "$lt_cv_prog_compiler_pic" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if ${lt_cv_prog_compiler_pic_works+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if test ${lt_cv_prog_compiler_pic_works+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext @@ -8783,8 +9310,8 @@ else $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 +printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in @@ -8812,11 +9339,12 @@ fi # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if ${lt_cv_prog_compiler_static_works+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if test ${lt_cv_prog_compiler_static_works+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" @@ -8840,8 +9368,8 @@ else LDFLAGS=$save_LDFLAGS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -$as_echo "$lt_cv_prog_compiler_static_works" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 +printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; } if test yes = "$lt_cv_prog_compiler_static_works"; then : @@ -8855,11 +9383,12 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test ${lt_cv_prog_compiler_c_o+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest @@ -8902,19 +9431,20 @@ else $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test ${lt_cv_prog_compiler_c_o+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest @@ -8957,8 +9487,8 @@ else $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } @@ -8966,19 +9496,19 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +printf %s "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +printf "%s\n" "$hard_links" >&6; } if test no = "$hard_links"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 +printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else @@ -8990,8 +9520,8 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= @@ -9549,21 +10079,23 @@ _LT_EOF if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test ${lt_cv_aix_libpath_+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -9578,7 +10110,7 @@ if ac_fn_c_try_link "$LINENO"; then : lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib @@ -9602,21 +10134,23 @@ fi if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test ${lt_cv_aix_libpath_+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -9631,7 +10165,7 @@ if ac_fn_c_try_link "$LINENO"; then : lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib @@ -9882,11 +10416,12 @@ fi # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 -$as_echo_n "checking if $CC understands -b... " >&6; } -if ${lt_cv_prog_compiler__b+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +printf %s "checking if $CC understands -b... " >&6; } +if test ${lt_cv_prog_compiler__b+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler__b=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" @@ -9910,8 +10445,8 @@ else LDFLAGS=$save_LDFLAGS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 -$as_echo "$lt_cv_prog_compiler__b" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 +printf "%s\n" "$lt_cv_prog_compiler__b" >&6; } if test yes = "$lt_cv_prog_compiler__b"; then archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' @@ -9951,28 +10486,30 @@ fi # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if ${lt_cv_irix_exported_symbol+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if test ${lt_cv_irix_exported_symbol+y} +then : + printf %s "(cached) " >&6 +else $as_nop save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : lt_cv_irix_exported_symbol=yes -else +else $as_nop lt_cv_irix_exported_symbol=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -$as_echo "$lt_cv_irix_exported_symbol" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi @@ -10253,8 +10790,8 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 +printf "%s\n" "$ld_shlibs" >&6; } test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld @@ -10290,18 +10827,19 @@ x|xyes) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if ${lt_cv_archive_cmds_need_lc+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +printf %s "checking whether -lc should be explicitly linked in... " >&6; } +if test ${lt_cv_archive_cmds_need_lc+y} +then : + printf %s "(cached) " >&6 +else $as_nop $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest @@ -10319,7 +10857,7 @@ else if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no @@ -10333,8 +10871,8 @@ else $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac @@ -10493,8 +11031,8 @@ esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +printf %s "checking dynamic linker characteristics... " >&6; } if test yes = "$GCC"; then case $host_os in @@ -11055,9 +11593,10 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH - if ${lt_cv_shlibpath_overrides_runpath+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test ${lt_cv_shlibpath_overrides_runpath+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir @@ -11067,19 +11606,21 @@ else /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : +if ac_fn_c_try_link "$LINENO" +then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null +then : lt_cv_shlibpath_overrides_runpath=yes fi fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir @@ -11323,8 +11864,8 @@ uts4*) dynamic_linker=no ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +printf "%s\n" "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" @@ -11445,8 +11986,8 @@ configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +printf %s "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || @@ -11470,8 +12011,8 @@ else # directories. hardcode_action=unsupported fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 +printf "%s\n" "$hardcode_action" >&6; } if test relink = "$hardcode_action" || test yes = "$inherit_rpath"; then @@ -11515,11 +12056,12 @@ else darwin*) # if libdl is installed we need to link against it - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +printf %s "checking for dlopen in -ldl... " >&6; } +if test ${ac_cv_lib_dl_dlopen+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -11528,32 +12070,31 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char dlopen (); int -main () +main (void) { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dl_dlopen=yes -else +else $as_nop ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes +then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else +else $as_nop lt_cv_dlopen=dyld lt_cv_dlopen_libs= @@ -11573,14 +12114,16 @@ fi *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = xyes; then : +if test "x$ac_cv_func_shl_load" = xyes +then : lt_cv_dlopen=shl_load -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if ${ac_cv_lib_dld_shl_load+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +printf %s "checking for shl_load in -ldld... " >&6; } +if test ${ac_cv_lib_dld_shl_load+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -11589,41 +12132,42 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char shl_load (); int -main () +main (void) { return shl_load (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dld_shl_load=yes -else +else $as_nop ac_cv_lib_dld_shl_load=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = xyes +then : lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld -else +else $as_nop ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = xyes; then : +if test "x$ac_cv_func_dlopen" = xyes +then : lt_cv_dlopen=dlopen -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +printf %s "checking for dlopen in -ldl... " >&6; } +if test ${ac_cv_lib_dl_dlopen+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -11632,37 +12176,37 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char dlopen (); int -main () +main (void) { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dl_dlopen=yes -else +else $as_nop ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes +then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if ${ac_cv_lib_svld_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +printf %s "checking for dlopen in -lsvld... " >&6; } +if test ${ac_cv_lib_svld_dlopen+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -11671,37 +12215,37 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char dlopen (); int -main () +main (void) { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_svld_dlopen=yes -else +else $as_nop ac_cv_lib_svld_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 +printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = xyes +then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if ${ac_cv_lib_dld_dld_link+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +printf %s "checking for dld_link in -ldld... " >&6; } +if test ${ac_cv_lib_dld_dld_link+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -11710,30 +12254,29 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char dld_link (); int -main () +main (void) { return dld_link (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dld_dld_link=yes -else +else $as_nop ac_cv_lib_dld_dld_link=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 +printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = xyes +then : lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi @@ -11772,11 +12315,12 @@ fi save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -$as_echo_n "checking whether a program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 +printf %s "checking whether a program can dlopen itself... " >&6; } +if test ${lt_cv_dlopen_self+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else @@ -11855,7 +12399,7 @@ _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? @@ -11873,16 +12417,17 @@ rm -fr conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 +printf "%s\n" "$lt_cv_dlopen_self" >&6; } if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self_static+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 +printf %s "checking whether a statically linked program can dlopen itself... " >&6; } +if test ${lt_cv_dlopen_self_static+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else @@ -11961,7 +12506,7 @@ _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? @@ -11979,8 +12524,8 @@ rm -fr conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 +printf "%s\n" "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS=$save_CPPFLAGS @@ -12018,13 +12563,13 @@ fi striplib= old_striplib= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 +printf %s "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in @@ -12032,16 +12577,16 @@ else if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi ;; *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; esac fi @@ -12058,13 +12603,13 @@ fi # Report what library types will actually be built - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +printf %s "checking if libtool supports shared libraries... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +printf "%s\n" "$can_build_shared" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +printf %s "checking whether to build shared libraries... " >&6; } test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and @@ -12088,15 +12633,15 @@ $as_echo_n "checking whether to build shared libraries... " >&6; } fi ;; esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +printf "%s\n" "$enable_shared" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +printf %s "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +printf "%s\n" "$enable_static" >&6; } @@ -12134,193 +12679,18 @@ CC=$lt_save_CC - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 -$as_echo_n "checking for $CC option to accept ISO C99... " >&6; } -if ${ac_cv_prog_cc_c99+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c99=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include -#include -// Check varargs macros. These examples are taken from C99 6.10.3.5. -#define debug(...) fprintf (stderr, __VA_ARGS__) -#define showlist(...) puts (#__VA_ARGS__) -#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) -static void -test_varargs_macros (void) -{ - int x = 1234; - int y = 5678; - debug ("Flag"); - debug ("X = %d\n", x); - showlist (The first, second, and third items.); - report (x>y, "x is %d but y is %d", x, y); -} - -// Check long long types. -#define BIG64 18446744073709551615ull -#define BIG32 4294967295ul -#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) -#if !BIG_OK - your preprocessor is broken; -#endif -#if BIG_OK -#else - your preprocessor is broken; -#endif -static long long int bignum = -9223372036854775807LL; -static unsigned long long int ubignum = BIG64; - -struct incomplete_array -{ - int datasize; - double data[]; -}; - -struct named_init { - int number; - const wchar_t *name; - double average; -}; - -typedef const char *ccp; - -static inline int -test_restrict (ccp restrict text) -{ - // See if C++-style comments work. - // Iterate through items via the restricted pointer. - // Also check for declarations in for loops. - for (unsigned int i = 0; *(text+i) != '\0'; ++i) - continue; - return 0; -} - -// Check varargs and va_copy. -static void -test_varargs (const char *format, ...) -{ - va_list args; - va_start (args, format); - va_list args_copy; - va_copy (args_copy, args); - - const char *str; - int number; - float fnumber; - - while (*format) - { - switch (*format++) - { - case 's': // string - str = va_arg (args_copy, const char *); - break; - case 'd': // int - number = va_arg (args_copy, int); - break; - case 'f': // float - fnumber = va_arg (args_copy, double); - break; - default: - break; - } - } - va_end (args_copy); - va_end (args); -} - -int -main () -{ - - // Check bool. - _Bool success = false; - - // Check restrict. - if (test_restrict ("String literal") == 0) - success = true; - char *restrict newvar = "Another string"; - - // Check varargs. - test_varargs ("s, d' f .", "string", 65, 34.234); - test_varargs_macros (); - - // Check flexible array members. - struct incomplete_array *ia = - malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); - ia->datasize = 10; - for (int i = 0; i < ia->datasize; ++i) - ia->data[i] = i * 1.234; - - // Check named initializers. - struct named_init ni = { - .number = 34, - .name = L"Test wide string", - .average = 543.34343, - }; - - ni.number = 58; - - int dynamic_array[ni.number]; - dynamic_array[ni.number - 1] = 543; - - // work around unused variable warnings - return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' - || dynamic_array[ni.number - 1] != 543); - - ; - return 0; -} -_ACEOF -for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99 -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c99=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c99" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c99" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c99" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 -$as_echo "$ac_cv_prog_cc_c99" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c99" != xno; then : - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if ${ac_cv_c_const+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +printf %s "checking for an ANSI C-conforming const... " >&6; } +if test ${ac_cv_c_const+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { #ifndef __cplusplus @@ -12333,7 +12703,7 @@ main () /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. + /* IBM XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ @@ -12361,7 +12731,7 @@ main () iptr p = 0; ++p; } - { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying + { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; @@ -12377,47 +12747,50 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_c_const=yes -else +else $as_nop ac_cv_c_const=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +printf "%s\n" "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then -$as_echo "#define const /**/" >>confdefs.h +printf "%s\n" "#define const /**/" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -$as_echo_n "checking for inline... " >&6; } -if ${ac_cv_c_inline+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +printf %s "checking for inline... " >&6; } +if test ${ac_cv_c_inline+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } +static $ac_kw foo_t static_foo (void) {return 0; } +$ac_kw foo_t foo (void) {return 0; } #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_c_inline=$ac_kw fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -$as_echo "$ac_cv_c_inline" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +printf "%s\n" "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; @@ -12444,11 +12817,12 @@ test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS depcc="$CCAS" am_compiler_list= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CCAS_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +printf %s "checking dependency style of $depcc... " >&6; } +if test ${am_cv_CCAS_dependencies_compiler_type+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For @@ -12553,8 +12927,8 @@ else fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CCAS_dependencies_compiler_type" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5 +printf "%s\n" "$am_cv_CCAS_dependencies_compiler_type" >&6; } CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type if @@ -12570,18 +12944,19 @@ fi -$as_echo "#define OPUS_BUILD /**/" >>confdefs.h +printf "%s\n" "#define OPUS_BUILD /**/" >>confdefs.h #Use a hacked up version of autoconf's AC_C_RESTRICT because it's not #strong enough a test to detect old buggy versions of GCC (e.g. 2.95.3) #Note: Both this and the test for variable-size arrays below are also # done by AC_PROG_CC_C99, but not thoroughly enough apparently. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 -$as_echo_n "checking for C/C++ restrict keyword... " >&6; } -if ${ac_cv_c_restrict+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 +printf %s "checking for C/C++ restrict keyword... " >&6; } +if test ${ac_cv_c_restrict+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_c_restrict=no # The order here caters to the fact that C++ does not require restrict. for ac_kw in __restrict __restrict__ _Restrict restrict; do @@ -12592,7 +12967,7 @@ typedef int * int_ptr; return ip[0]; } int -main () +main (void) { int s[1]; int * $ac_kw t = s; @@ -12602,99 +12977,96 @@ int s[1]; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_c_restrict=$ac_kw fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext test "$ac_cv_c_restrict" != no && break done fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 -$as_echo "$ac_cv_c_restrict" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 +printf "%s\n" "$ac_cv_c_restrict" >&6; } case $ac_cv_c_restrict in restrict) ;; - no) $as_echo "#define restrict /**/" >>confdefs.h + no) printf "%s\n" "#define restrict /**/" >>confdefs.h ;; - *) cat >>confdefs.h <<_ACEOF -#define restrict $ac_cv_c_restrict -_ACEOF + *) printf "%s\n" "#define restrict $ac_cv_c_restrict" >>confdefs.h ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 variable-size arrays" >&5 -$as_echo_n "checking for C99 variable-size arrays... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C99 variable-size arrays" >&5 +printf %s "checking for C99 variable-size arrays... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { static int x; char a[++x]; a[sizeof a - 1] = 0; int N; return a[0]; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : has_var_arrays=yes use_alloca="no (using var arrays)" -$as_echo "#define VAR_ARRAYS 1" >>confdefs.h +printf "%s\n" "#define VAR_ARRAYS 1" >>confdefs.h -else +else $as_nop has_var_arrays=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_var_arrays" >&5 -$as_echo "$has_var_arrays" >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $has_var_arrays" >&5 +printf "%s\n" "$has_var_arrays" >&6; } -if test "$has_var_arrays" = "no"; then : +if test "$has_var_arrays" = "no" +then : - for ac_header in alloca.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "alloca.h" "ac_cv_header_alloca_h" "$ac_includes_default" -if test "x$ac_cv_header_alloca_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_ALLOCA_H 1 -_ACEOF + ac_fn_c_check_header_compile "$LINENO" "alloca.h" "ac_cv_header_alloca_h" "$ac_includes_default" +if test "x$ac_cv_header_alloca_h" = xyes +then : + printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h fi -done - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 -$as_echo_n "checking for alloca... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 +printf %s "checking for alloca... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main () +main (void) { int foo=10; int *array = alloca(foo); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : use_alloca=yes; -$as_echo "#define USE_ALLOCA /**/" >>confdefs.h +printf "%s\n" "#define USE_ALLOCA /**/" >>confdefs.h -else +else $as_nop use_alloca=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_alloca" >&5 -$as_echo "$use_alloca" >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $use_alloca" >&5 +printf "%s\n" "$use_alloca" >&6; } fi @@ -12704,11 +13076,12 @@ case $host in # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mwvalidcheckl in -lmw" >&5 -$as_echo_n "checking for _mwvalidcheckl in -lmw... " >&6; } -if ${ac_cv_lib_mw__mwvalidcheckl+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _mwvalidcheckl in -lmw" >&5 +printf %s "checking for _mwvalidcheckl in -lmw... " >&6; } +if test ${ac_cv_lib_mw__mwvalidcheckl+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lmw $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12717,38 +13090,38 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char _mwvalidcheckl (); int -main () +main (void) { return _mwvalidcheckl (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_mw__mwvalidcheckl=yes -else +else $as_nop ac_cv_lib_mw__mwvalidcheckl=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mw__mwvalidcheckl" >&5 -$as_echo "$ac_cv_lib_mw__mwvalidcheckl" >&6; } -if test "x$ac_cv_lib_mw__mwvalidcheckl" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mw__mwvalidcheckl" >&5 +printf "%s\n" "$ac_cv_lib_mw__mwvalidcheckl" >&6; } +if test "x$ac_cv_lib_mw__mwvalidcheckl" = xyes +then : LIBM=-lmw fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 -$as_echo_n "checking for cos in -lm... " >&6; } -if ${ac_cv_lib_m_cos+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 +printf %s "checking for cos in -lm... " >&6; } +if test ${ac_cv_lib_m_cos+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12757,40 +13130,40 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char cos (); int -main () +main (void) { return cos (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_m_cos=yes -else +else $as_nop ac_cv_lib_m_cos=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 -$as_echo "$ac_cv_lib_m_cos" >&6; } -if test "x$ac_cv_lib_m_cos" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 +printf "%s\n" "$ac_cv_lib_m_cos" >&6; } +if test "x$ac_cv_lib_m_cos" = xyes +then : LIBM="$LIBM -lm" fi ;; *) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 -$as_echo_n "checking for cos in -lm... " >&6; } -if ${ac_cv_lib_m_cos+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 +printf %s "checking for cos in -lm... " >&6; } +if test ${ac_cv_lib_m_cos+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12799,30 +13172,29 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char cos (); int -main () +main (void) { return cos (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_m_cos=yes -else +else $as_nop ac_cv_lib_m_cos=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 -$as_echo "$ac_cv_lib_m_cos" >&6; } -if test "x$ac_cv_lib_m_cos" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 +printf "%s\n" "$ac_cv_lib_m_cos" >&6; } +if test "x$ac_cv_lib_m_cos" = xyes +then : LIBM=-lm fi @@ -12832,22 +13204,24 @@ esac # Check whether --enable-fixed-point was given. -if test "${enable_fixed_point+set}" = set; then : +if test ${enable_fixed_point+y} +then : enableval=$enable_fixed_point; -else +else $as_nop enable_fixed_point=no fi -if test "$enable_fixed_point" = "yes"; then : +if test "$enable_fixed_point" = "yes" +then : enable_float="no" -$as_echo "#define FIXED_POINT 1" >>confdefs.h +printf "%s\n" "#define FIXED_POINT 1" >>confdefs.h PC_BUILD="fixed-point" -else +else $as_nop enable_float="yes"; PC_BUILD="floating-point" @@ -12864,25 +13238,28 @@ fi # Check whether --enable-fixed-point-debug was given. -if test "${enable_fixed_point_debug+set}" = set; then : +if test ${enable_fixed_point_debug+y} +then : enableval=$enable_fixed_point_debug; -else +else $as_nop enable_fixed_point_debug=no fi -if test "$enable_fixed_point_debug" = "yes"; then : +if test "$enable_fixed_point_debug" = "yes" +then : -$as_echo "#define FIXED_DEBUG 1" >>confdefs.h +printf "%s\n" "#define FIXED_DEBUG 1" >>confdefs.h fi # Check whether --enable-float_api was given. -if test "${enable_float_api+set}" = set; then : +if test ${enable_float_api+y} +then : enableval=$enable_float_api; -else +else $as_nop enable_float_api=yes fi @@ -12896,26 +13273,29 @@ else fi -if test "$enable_float_api" = "no"; then : +if test "$enable_float_api" = "no" +then : -$as_echo "#define DISABLE_FLOAT_API 1" >>confdefs.h +printf "%s\n" "#define DISABLE_FLOAT_API 1" >>confdefs.h fi # Check whether --enable-custom-modes was given. -if test "${enable_custom_modes+set}" = set; then : +if test ${enable_custom_modes+y} +then : enableval=$enable_custom_modes; -else +else $as_nop enable_custom_modes=no fi -if test "$enable_custom_modes" = "yes"; then : +if test "$enable_custom_modes" = "yes" +then : -$as_echo "#define CUSTOM_MODES 1" >>confdefs.h +printf "%s\n" "#define CUSTOM_MODES 1" >>confdefs.h PC_BUILD="$PC_BUILD, custom modes" @@ -12930,53 +13310,136 @@ else fi +# Check whether --enable-dred was given. +if test ${enable_dred+y} +then : + enableval=$enable_dred; +else $as_nop + enable_dred=no +fi + + +if test "$enable_dred" = "yes" +then : + + +printf "%s\n" "#define ENABLE_DRED 1" >>confdefs.h + + +fi + if test "$enable_dred" = "yes"; then + ENABLE_DRED_TRUE= + ENABLE_DRED_FALSE='#' +else + ENABLE_DRED_TRUE='#' + ENABLE_DRED_FALSE= +fi + + +# Check whether --enable-deep-plc was given. +if test ${enable_deep_plc+y} +then : + enableval=$enable_deep_plc; +else $as_nop + enable_deep_plc=no +fi + + +if test "$enable_deep_plc" = "yes" || test "$enable_dred" = "yes" || test "$enable_osce" = "yes" || test "$enable_osce_training_data" = "yes" +then : + + +printf "%s\n" "#define ENABLE_DEEP_PLC 1" >>confdefs.h + + +fi + if test "$enable_deep_plc" = "yes" || test "$enable_dred" = "yes" || test "$enable_osce" = "yes" || test "$enable_osce_training_data" = "yes"; then + ENABLE_DEEP_PLC_TRUE= + ENABLE_DEEP_PLC_FALSE='#' +else + ENABLE_DEEP_PLC_TRUE='#' + ENABLE_DEEP_PLC_FALSE= +fi + + +# Check whether --enable-lossgen was given. +if test ${enable_lossgen+y} +then : + enableval=$enable_lossgen; +else $as_nop + enable_lossgen=no +fi + + +if test "$enable_lossgen" = "yes" +then : + + +printf "%s\n" "#define ENABLE_LOSSGEN 1" >>confdefs.h + + +fi + if test "$enable_lossgen" = "yes"; then + ENABLE_LOSSGEN_TRUE= + ENABLE_LOSSGEN_FALSE='#' +else + ENABLE_LOSSGEN_TRUE='#' + ENABLE_LOSSGEN_FALSE= +fi + + has_float_approx=no -#case "$host_cpu" in -#i[[3456]]86 | x86_64 | powerpc64 | powerpc32 | ia64) -# has_float_approx=yes -# ;; -#esac +case "$host_cpu" in +i[3456]86 | x86_64 | arm* | aarch64* | powerpc64 | powerpc32 | ia64) + has_float_approx=yes + ;; +esac # Check whether --enable-float-approx was given. -if test "${enable_float_approx+set}" = set; then : +if test ${enable_float_approx+y} +then : enableval=$enable_float_approx; if test "$enable_float_approx" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Floating point approximations are not supported on all platforms." >&5 -$as_echo "$as_me: WARNING: Floating point approximations are not supported on all platforms." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Floating point approximations are not supported on all platforms." >&5 +printf "%s\n" "$as_me: WARNING: Floating point approximations are not supported on all platforms." >&2;} fi -else +else $as_nop enable_float_approx=$has_float_approx fi -if test "$enable_float_approx" = "yes"; then : +if test "$enable_float_approx" = "yes" +then : -$as_echo "#define FLOAT_APPROX 1" >>confdefs.h +printf "%s\n" "#define FLOAT_APPROX 1" >>confdefs.h fi # Check whether --enable-asm was given. -if test "${enable_asm+set}" = set; then : +if test ${enable_asm+y} +then : enableval=$enable_asm; -else +else $as_nop enable_asm=yes fi # Check whether --enable-rtcd was given. -if test "${enable_rtcd+set}" = set; then : +if test ${enable_rtcd+y} +then : enableval=$enable_rtcd; -else +else $as_nop enable_rtcd=yes fi # Check whether --enable-intrinsics was given. -if test "${enable_intrinsics+set}" = set; then : +if test ${enable_intrinsics+y} +then : enableval=$enable_intrinsics; -else +else $as_nop enable_intrinsics=yes fi @@ -12985,26 +13448,159 @@ rtcd_support=no cpu_arm=no cpu_x86=no -if test x"${enable_asm}" = x"yes"; then : +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +printf %s "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test ${ac_cv_prog_CPP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + # Double quotes because $CC needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + +else $as_nop + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + # Broken: success on invalid input. +continue +else $as_nop + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok +then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +printf "%s\n" "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + +else $as_nop + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + # Broken: success on invalid input. +continue +else $as_nop + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok +then : + +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +if test x"${enable_asm}" = x"yes" +then : inline_optimization="No inline ASM for your platform, please send patches" case $host_cpu in arm*) - if test "$enable_float" != "yes"; then : - + #AS_IF([test "$enable_float" != "yes"],[ cpu_arm=yes -$as_echo "#define OPUS_ARM_ASM /**/" >>confdefs.h +printf "%s\n" "#define OPUS_ARM_ASM /**/" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports gcc-style inline assembly" >&5 -$as_echo_n "checking if compiler supports gcc-style inline assembly... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler supports gcc-style inline assembly" >&5 +printf %s "checking if compiler supports gcc-style inline assembly... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { #ifdef __GNUC_MINOR__ @@ -13017,12 +13613,13 @@ __asm__ (""::) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : flag_ok=yes -else +else $as_nop flag_ok=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext if test "X$flag_ok" = Xyes ; then inline_optimization="ARM" @@ -13032,88 +13629,92 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext true fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 -$as_echo "$flag_ok" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 +printf "%s\n" "$flag_ok" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if assembler supports EDSP instructions on ARM" >&5 -$as_echo_n "checking if assembler supports EDSP instructions on ARM... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if assembler supports EDSP instructions on ARM" >&5 +printf %s "checking if assembler supports EDSP instructions on ARM... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { __asm__("qadd r3,r3,r3") ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +if ac_fn_c_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } OPUS_ARM_INLINE_EDSP=1 -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } OPUS_ARM_INLINE_EDSP=0 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if assembler supports ARMv6 media instructions on ARM" >&5 -$as_echo_n "checking if assembler supports ARMv6 media instructions on ARM... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if assembler supports ARMv6 media instructions on ARM" >&5 +printf %s "checking if assembler supports ARMv6 media instructions on ARM... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { __asm__("shadd8 r3,r3,r3") ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +if ac_fn_c_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } OPUS_ARM_INLINE_MEDIA=1 -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } OPUS_ARM_INLINE_MEDIA=0 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if assembler supports NEON instructions on ARM" >&5 -$as_echo_n "checking if assembler supports NEON instructions on ARM... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if assembler supports NEON instructions on ARM" >&5 +printf %s "checking if assembler supports NEON instructions on ARM... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { __asm__("vorr d0,d0,d0") ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +if ac_fn_c_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } OPUS_ARM_INLINE_NEON=1 -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } OPUS_ARM_INLINE_NEON=0 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - if test x"$inline_optimization" = x"ARM"; then : + if test x"$inline_optimization" = x"ARM" +then : if true; then OPUS_ARM_INLINE_ASM_TRUE= @@ -13124,28 +13725,31 @@ else fi -$as_echo "#define OPUS_ARM_INLINE_ASM 1" >>confdefs.h +printf "%s\n" "#define OPUS_ARM_INLINE_ASM 1" >>confdefs.h - if test x"$OPUS_ARM_INLINE_EDSP" = x"1"; then : + if test x"$OPUS_ARM_INLINE_EDSP" = x"1" +then : -$as_echo "#define OPUS_ARM_INLINE_EDSP 1" >>confdefs.h +printf "%s\n" "#define OPUS_ARM_INLINE_EDSP 1" >>confdefs.h inline_optimization="$inline_optimization (EDSP)" fi - if test x"$OPUS_ARM_INLINE_MEDIA" = x"1"; then : + if test x"$OPUS_ARM_INLINE_MEDIA" = x"1" +then : -$as_echo "#define OPUS_ARM_INLINE_MEDIA 1" >>confdefs.h +printf "%s\n" "#define OPUS_ARM_INLINE_MEDIA 1" >>confdefs.h inline_optimization="$inline_optimization (Media)" fi - if test x"$OPUS_ARM_INLINE_NEON" = x"1"; then : + if test x"$OPUS_ARM_INLINE_NEON" = x"1" +then : -$as_echo "#define OPUS_ARM_INLINE_NEON 1" >>confdefs.h +printf "%s\n" "#define OPUS_ARM_INLINE_NEON 1" >>confdefs.h inline_optimization="$inline_optimization (NEON)" @@ -13154,11 +13758,12 @@ fi fi # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_HAVE_PERL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_HAVE_PERL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$HAVE_PERL"; then ac_cv_prog_HAVE_PERL="$HAVE_PERL" # Let the user override the test. else @@ -13166,11 +13771,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_HAVE_PERL="yes" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -13182,15 +13791,16 @@ fi fi HAVE_PERL=$ac_cv_prog_HAVE_PERL if test -n "$HAVE_PERL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_PERL" >&5 -$as_echo "$HAVE_PERL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAVE_PERL" >&5 +printf "%s\n" "$HAVE_PERL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi - if test x"$HAVE_PERL" = x"yes"; then : + if test x"$HAVE_PERL" = x"yes" +then : if true; then OPUS_ARM_EXTERNAL_ASM_TRUE= @@ -13201,205 +13811,243 @@ else fi asm_optimization="ARM" - if test x"$OPUS_ARM_INLINE_EDSP" = x"1"; then : + if test x"$OPUS_ARM_INLINE_EDSP" = x"1" +then : OPUS_ARM_PRESUME_EDSP=1 OPUS_ARM_MAY_HAVE_EDSP=1 -else +else $as_nop OPUS_ARM_PRESUME_EDSP=0 OPUS_ARM_MAY_HAVE_EDSP=0 fi - if test x"$OPUS_ARM_INLINE_MEDIA" = x"1"; then : + if test x"$OPUS_ARM_INLINE_MEDIA" = x"1" +then : OPUS_ARM_PRESUME_MEDIA=1 OPUS_ARM_MAY_HAVE_MEDIA=1 -else +else $as_nop OPUS_ARM_PRESUME_MEDIA=0 OPUS_ARM_MAY_HAVE_MEDIA=0 fi - if test x"$OPUS_ARM_INLINE_NEON" = x"1"; then : + if test x"$OPUS_ARM_INLINE_NEON" = x"1" +then : OPUS_ARM_PRESUME_NEON=1 OPUS_ARM_MAY_HAVE_NEON=1 -else +else $as_nop OPUS_ARM_PRESUME_NEON=0 OPUS_ARM_MAY_HAVE_NEON=0 fi - if test x"$enable_rtcd" = x"yes"; then : + if test x"$enable_rtcd" = x"yes" +then : - if test x"$OPUS_ARM_MAY_HAVE_EDSP" != x"1"; then : + if test x"$OPUS_ARM_MAY_HAVE_EDSP" != x"1" +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to force-enable armv5e EDSP instructions..." >&5 -$as_echo "$as_me: Trying to force-enable armv5e EDSP instructions..." >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Trying to force-enable armv5e EDSP instructions..." >&5 +printf "%s\n" "$as_me: Trying to force-enable armv5e EDSP instructions..." >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if assembler supports EDSP instructions on ARM" >&5 -$as_echo_n "checking if assembler supports EDSP instructions on ARM... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if assembler supports EDSP instructions on ARM" >&5 +printf %s "checking if assembler supports EDSP instructions on ARM... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { __asm__(".arch armv5te\n.object_arch armv4t\nqadd r3,r3,r3") ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +if ac_fn_c_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } OPUS_ARM_MAY_HAVE_EDSP=1 -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi - if test x"$OPUS_ARM_MAY_HAVE_MEDIA" != x"1"; then : + if test x"$OPUS_ARM_MAY_HAVE_MEDIA" != x"1" +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to force-enable ARMv6 media instructions..." >&5 -$as_echo "$as_me: Trying to force-enable ARMv6 media instructions..." >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Trying to force-enable ARMv6 media instructions..." >&5 +printf "%s\n" "$as_me: Trying to force-enable ARMv6 media instructions..." >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if assembler supports ARMv6 media instructions on ARM" >&5 -$as_echo_n "checking if assembler supports ARMv6 media instructions on ARM... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if assembler supports ARMv6 media instructions on ARM" >&5 +printf %s "checking if assembler supports ARMv6 media instructions on ARM... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { __asm__(".arch armv6\n.object_arch armv4t\nshadd8 r3,r3,r3") ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +if ac_fn_c_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } OPUS_ARM_MAY_HAVE_MEDIA=1 -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi - if test x"$OPUS_ARM_MAY_HAVE_NEON" != x"1"; then : + if test x"$OPUS_ARM_MAY_HAVE_NEON" != x"1" +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to force-enable NEON instructions..." >&5 -$as_echo "$as_me: Trying to force-enable NEON instructions..." >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Trying to force-enable NEON instructions..." >&5 +printf "%s\n" "$as_me: Trying to force-enable NEON instructions..." >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if assembler supports NEON instructions on ARM" >&5 -$as_echo_n "checking if assembler supports NEON instructions on ARM... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if assembler supports NEON instructions on ARM" >&5 +printf %s "checking if assembler supports NEON instructions on ARM... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { __asm__(".arch armv7-a\n.fpu neon\n.object_arch armv4t\nvorr d0,d0,d0") ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +if ac_fn_c_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } OPUS_ARM_MAY_HAVE_NEON=1 -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi rtcd_support= - if test x"$OPUS_ARM_MAY_HAVE_EDSP" = x"1"; then : + if test x"$OPUS_ARM_MAY_HAVE_EDSP" = x"1" +then : -$as_echo "#define OPUS_ARM_MAY_HAVE_EDSP 1" >>confdefs.h +printf "%s\n" "#define OPUS_ARM_MAY_HAVE_EDSP 1" >>confdefs.h - if test x"$OPUS_ARM_PRESUME_EDSP" = x"1"; then : + if test x"$OPUS_ARM_PRESUME_EDSP" = x"1" +then : -$as_echo "#define OPUS_ARM_PRESUME_EDSP 1" >>confdefs.h +printf "%s\n" "#define OPUS_ARM_PRESUME_EDSP 1" >>confdefs.h asm_optimization="$asm_optimization (EDSP)" -else +else $as_nop rtcd_support="$rtcd_support (EDSP)" fi fi - if test x"$OPUS_ARM_MAY_HAVE_MEDIA" = x"1"; then : + if test x"$OPUS_ARM_MAY_HAVE_MEDIA" = x"1" +then : -$as_echo "#define OPUS_ARM_MAY_HAVE_MEDIA 1" >>confdefs.h +printf "%s\n" "#define OPUS_ARM_MAY_HAVE_MEDIA 1" >>confdefs.h - if test x"$OPUS_ARM_PRESUME_MEDIA" = x"1"; then : + if test x"$OPUS_ARM_PRESUME_MEDIA" = x"1" +then : -$as_echo "#define OPUS_ARM_PRESUME_MEDIA 1" >>confdefs.h +printf "%s\n" "#define OPUS_ARM_PRESUME_MEDIA 1" >>confdefs.h asm_optimization="$asm_optimization (Media)" -else +else $as_nop rtcd_support="$rtcd_support (Media)" fi fi - if test x"$OPUS_ARM_MAY_HAVE_NEON" = x"1"; then : + if test x"$OPUS_ARM_MAY_HAVE_NEON" = x"1" +then : -$as_echo "#define OPUS_ARM_MAY_HAVE_NEON 1" >>confdefs.h +printf "%s\n" "#define OPUS_ARM_MAY_HAVE_NEON 1" >>confdefs.h - if test x"$OPUS_ARM_PRESUME_NEON" = x"1"; then : + if test x"$OPUS_ARM_PRESUME_NEON" = x"1" +then : -$as_echo "#define OPUS_ARM_PRESUME_NEON 1" >>confdefs.h +printf "%s\n" "#define OPUS_ARM_PRESUME_NEON 1" >>confdefs.h asm_optimization="$asm_optimization (NEON)" -else +else $as_nop rtcd_support="$rtcd_support (NEON)" fi fi - if test x"$rtcd_support" != x""; then : + if test x"$OPUS_ARM_MAY_HAVE_DOTPROD" = x"1" +then : + + +printf "%s\n" "#define OPUS_ARM_MAY_HAVE_DOTPROD 1" >>confdefs.h + + if test x"$OPUS_ARM_PRESUME_DOTPROD" = x"1" +then : + + +printf "%s\n" "#define OPUS_ARM_PRESUME_DOTPROD 1" >>confdefs.h + + asm_optimization="$asm_optimization (DOTPROD)" + +else $as_nop + rtcd_support="$rtcd_support (DOTPROD)" + +fi + +fi + + if test x"$rtcd_support" != x"" +then : rtcd_support=ARM"$rtcd_support" -else +else $as_nop rtcd_support="no" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for apple style tools" >&5 -$as_echo_n "checking for apple style tools... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for apple style tools" >&5 +printf %s "checking for apple style tools... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -13407,36 +14055,36 @@ $as_echo_n "checking for apple style tools... " >&6; } #error 1 #endif int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; }; ARM2GNU_PARAMS="--apple" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; }; ARM2GNU_PARAMS="" +if ac_fn_c_try_cpp "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; }; ARM2GNU_PARAMS="--apple" +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; }; ARM2GNU_PARAMS="" fi rm -f conftest.err conftest.i conftest.$ac_ext -else +else $as_nop - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** ARM assembly requires perl -- disabling optimizations" >&5 -$as_echo "$as_me: WARNING: *** ARM assembly requires perl -- disabling optimizations" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** ARM assembly requires perl -- disabling optimizations" >&5 +printf "%s\n" "$as_me: WARNING: *** ARM assembly requires perl -- disabling optimizations" >&2;} asm_optimization="(missing perl dependency for ARM)" fi - -fi + #]) ;; esac -else +else $as_nop inline_optimization="disabled" asm_optimization="disabled" @@ -13485,11 +14133,11 @@ else fi if false; then - HAVE_AVX_TRUE= - HAVE_AVX_FALSE='#' + HAVE_AVX2_TRUE= + HAVE_AVX2_FALSE='#' else - HAVE_AVX_TRUE='#' - HAVE_AVX_FALSE= + HAVE_AVX2_TRUE='#' + HAVE_AVX2_FALSE= fi @@ -13498,6 +14146,7 @@ fi + # 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), # this option will break things. @@ -13520,35 +14169,48 @@ esac -if ${X86_SSE_CFLAGS+:} false; then : -else +if test ${X86_SSE_CFLAGS+y} +then : + +else $as_nop X86_SSE_CFLAGS="-msse" fi -if ${X86_SSE2_CFLAGS+:} false; then : +if test ${X86_SSE2_CFLAGS+y} +then : -else +else $as_nop X86_SSE2_CFLAGS="-msse2" fi -if ${X86_SSE4_1_CFLAGS+:} false; then : +if test ${X86_SSE4_1_CFLAGS+y} +then : -else +else $as_nop X86_SSE4_1_CFLAGS="-msse4.1" fi -if ${X86_AVX_CFLAGS+:} false; then : +if test ${X86_AVX2_CFLAGS+y} +then : -else - X86_AVX_CFLAGS="-mavx" +else $as_nop + X86_AVX2_CFLAGS="-mavx -mfma -mavx2" fi -if ${ARM_NEON_INTR_CFLAGS+:} false; then : +if test ${ARM_NEON_INTR_CFLAGS+y} +then : -else +else $as_nop ARM_NEON_INTR_CFLAGS="$RESOLVED_DEFAULT_ARM_NEON_INTR_CFLAGS" fi +if test ${ARM_DOTPROD_INTR_CFLAGS+y} +then : + +else $as_nop + ARM_DOTPROD_INTR_CFLAGS=""-march=armv8.2-a+dotprod"" +fi -if test x"$enable_intrinsics" = x"yes"; then : +if test x"$enable_intrinsics" = x"yes" +then : intrinsics_support="" case $host_cpu in #( @@ -13556,14 +14218,14 @@ if test x"$enable_intrinsics" = x"yes"; then : cpu_arm=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports ARM Neon intrinsics" >&5 -$as_echo_n "checking if compiler supports ARM Neon intrinsics... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler supports ARM Neon intrinsics" >&5 +printf %s "checking if compiler supports ARM Neon intrinsics... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main () +main (void) { static float32x4_t A0, A1, SUMM; @@ -13575,27 +14237,28 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : OPUS_ARM_MAY_HAVE_NEON_INTR=1 OPUS_ARM_PRESUME_NEON_INTR=1 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -else +else $as_nop OPUS_ARM_PRESUME_NEON_INTR=0 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports ARM Neon intrinsics with $ARM_NEON_INTR_CFLAGS" >&5 -$as_echo_n "checking if compiler supports ARM Neon intrinsics with $ARM_NEON_INTR_CFLAGS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler supports ARM Neon intrinsics with $ARM_NEON_INTR_CFLAGS" >&5 +printf %s "checking if compiler supports ARM Neon intrinsics with $ARM_NEON_INTR_CFLAGS... " >&6; } save_CFLAGS="$CFLAGS"; CFLAGS="$CFLAGS $ARM_NEON_INTR_CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main () +main (void) { static float32x4_t A0, A1, SUMM; @@ -13607,28 +14270,30 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } OPUS_ARM_MAY_HAVE_NEON_INTR=1 -else +else $as_nop - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } OPUS_ARM_MAY_HAVE_NEON_INTR=0 fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$save_CFLAGS" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - if test x"$OPUS_ARM_MAY_HAVE_NEON_INTR" = x"1" && test x"$OPUS_ARM_PRESUME_NEON_INTR" != x"1"; then : + if test x"$OPUS_ARM_MAY_HAVE_NEON_INTR" = x"1" && test x"$OPUS_ARM_PRESUME_NEON_INTR" != x"1" +then : OPUS_ARM_NEON_INTR_CFLAGS="$ARM_NEON_INTR_CFLAGS" @@ -13636,49 +14301,56 @@ rm -f core conftest.err conftest.$ac_objext \ fi - if test x"$OPUS_ARM_MAY_HAVE_NEON_INTR" = x"1"; then : + if test x"$OPUS_ARM_MAY_HAVE_NEON_INTR" = x"1" +then : -$as_echo "#define OPUS_ARM_MAY_HAVE_NEON_INTR 1" >>confdefs.h +printf "%s\n" "#define OPUS_ARM_MAY_HAVE_NEON_INTR 1" >>confdefs.h intrinsics_support="$intrinsics_support (NEON)" - if test x"$enable_rtcd" != x"no" && test x"$OPUS_ARM_PRESUME_NEON_INTR" != x"1"; then : - if test x"$rtcd_support" = x"no"; then : + if test x"$enable_rtcd" != x"no" && test x"$OPUS_ARM_PRESUME_NEON_INTR" != x"1" +then : + if test x"$rtcd_support" = x"no" +then : rtcd_support="ARM (NEON Intrinsics)" -else +else $as_nop rtcd_support="$rtcd_support (NEON Intrinsics)" fi fi - if test x"$OPUS_ARM_PRESUME_NEON_INTR" = x"1"; then : + if test x"$OPUS_ARM_PRESUME_NEON_INTR" = x"1" +then : -$as_echo "#define OPUS_ARM_PRESUME_NEON_INTR 1" >>confdefs.h +printf "%s\n" "#define OPUS_ARM_PRESUME_NEON_INTR 1" >>confdefs.h fi # Check whether --with-NE10 was given. -if test "${with_NE10+set}" = set; then : +if test ${with_NE10+y} +then : withval=$with_NE10; NE10_prefix="$withval" -else +else $as_nop NE10_prefix="" fi # Check whether --with-NE10-libraries was given. -if test "${with_NE10_libraries+set}" = set; then : +if test ${with_NE10_libraries+y} +then : withval=$with_NE10_libraries; NE10_libraries="$withval" -else +else $as_nop NE10_libraries="" fi # Check whether --with-NE10-includes was given. -if test "${with_NE10_includes+set}" = set; then : +if test ${with_NE10_includes+y} +then : withval=$with_NE10_includes; NE10_includes="$withval" -else +else $as_nop NE10_includes="" fi @@ -13707,8 +14379,8 @@ fi NE10_CFLAGS="-I$prefix/include" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NE10" >&5 -$as_echo_n "checking for NE10... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NE10" >&5 +printf %s "checking for NE10... " >&6; } save_CFLAGS="$CFLAGS"; CFLAGS="$CFLAGS $NE10_CFLAGS" save_LIBS="$LIBS"; LIBS="$LIBS $NE10_LIBS $LIBM" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13717,7 +14389,7 @@ $as_echo_n "checking for NE10... " >&6; } #include int -main () +main (void) { ne10_fft_cfg_float32_t cfg; @@ -13729,30 +14401,32 @@ main () } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : HAVE_ARM_NE10=1 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -else +else $as_nop HAVE_ARM_NE10=0 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } NE10_CFLAGS="" NE10_LIBS="" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$save_CFLAGS"; LIBS="$save_LIBS" #Now we know if libNE10 is installed or not - if test x"$HAVE_ARM_NE10" = x"1"; then : + if test x"$HAVE_ARM_NE10" = x"1" +then : -$as_echo "#define HAVE_ARM_NE10 1" >>confdefs.h +printf "%s\n" "#define HAVE_ARM_NE10 1" >>confdefs.h @@ -13762,25 +14436,27 @@ $as_echo "#define HAVE_ARM_NE10 1" >>confdefs.h fi - if test x"$NE10_LIBS" != x""; then : + if test x"$NE10_LIBS" != x"" +then : intrinsics_support="$intrinsics_support (NE10)" if test x"enable_rtcd" != x"" \ - && test x"$OPUS_ARM_PRESUME_NEON_INTR" != x"1"; then : + && test x"$OPUS_ARM_PRESUME_NEON_INTR" != x"1" +then : rtcd_support="$rtcd_support (NE10)" fi fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports Aarch64 Neon intrinsics" >&5 -$as_echo_n "checking if compiler supports Aarch64 Neon intrinsics... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler supports Aarch64 Neon intrinsics" >&5 +printf %s "checking if compiler supports Aarch64 Neon intrinsics... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main () +main (void) { static int32_t IN; @@ -13792,27 +14468,28 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : OPUS_ARM_MAY_HAVE_AARCH64_NEON_INTR=1 OPUS_ARM_PRESUME_AARCH64_NEON_INTR=1 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -else +else $as_nop OPUS_ARM_PRESUME_AARCH64_NEON_INTR=0 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports Aarch64 Neon intrinsics with $ARM_NEON_INTR_CFLAGS" >&5 -$as_echo_n "checking if compiler supports Aarch64 Neon intrinsics with $ARM_NEON_INTR_CFLAGS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler supports Aarch64 Neon intrinsics with $ARM_NEON_INTR_CFLAGS" >&5 +printf %s "checking if compiler supports Aarch64 Neon intrinsics with $ARM_NEON_INTR_CFLAGS... " >&6; } save_CFLAGS="$CFLAGS"; CFLAGS="$CFLAGS $ARM_NEON_INTR_CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main () +main (void) { static int32_t IN; @@ -13824,47 +14501,167 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } OPUS_ARM_MAY_HAVE_AARCH64_NEON_INTR=1 -else +else $as_nop - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } OPUS_ARM_MAY_HAVE_AARCH64_NEON_INTR=0 fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$save_CFLAGS" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - if test x"$OPUS_ARM_PRESUME_AARCH64_NEON_INTR" = x"1"; then : + if test x"$OPUS_ARM_PRESUME_AARCH64_NEON_INTR" = x"1" +then : -$as_echo "#define OPUS_ARM_PRESUME_AARCH64_NEON_INTR 1" >>confdefs.h +printf "%s\n" "#define OPUS_ARM_PRESUME_AARCH64_NEON_INTR 1" >>confdefs.h intrinsics_support="$intrinsics_support (NEON Aarch64)" fi - if test x"$intrinsics_support" = x""; then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler supports Aarch64 dotprod intrinsics" >&5 +printf %s "checking if compiler supports Aarch64 dotprod intrinsics... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main (void) +{ + + static int32x4_t acc; + static int8x16_t a, b; + acc = vdotq_s32(acc, a, b); + + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + + OPUS_ARM_MAY_HAVE_DOTPROD=1 + OPUS_ARM_PRESUME_DOTPROD=1 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +else $as_nop + + OPUS_ARM_PRESUME_DOTPROD=0 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler supports Aarch64 dotprod intrinsics with $ARM_DOTPROD_INTR_CFLAGS" >&5 +printf %s "checking if compiler supports Aarch64 dotprod intrinsics with $ARM_DOTPROD_INTR_CFLAGS... " >&6; } + save_CFLAGS="$CFLAGS"; CFLAGS="$CFLAGS $ARM_DOTPROD_INTR_CFLAGS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main (void) +{ + + static int32x4_t acc; + static int8x16_t a, b; + acc = vdotq_s32(acc, a, b); + + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + OPUS_ARM_MAY_HAVE_DOTPROD=1 + +else $as_nop + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + OPUS_ARM_MAY_HAVE_DOTPROD=0 + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$save_CFLAGS" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + + if test x"$OPUS_ARM_MAY_HAVE_DOTPROD" = x"1" && test x"$OPUS_ARM_PRESUME_DOTPROD" != x"1" +then : + + OPUS_ARM_DOTPROD_INTR_CFLAGS="$ARM_NEON_DOTPROD_CFLAGS" + + + +fi + + if test x"$OPUS_ARM_MAY_HAVE_DOTPROD" = x"1" +then : + + +printf "%s\n" "#define OPUS_ARM_MAY_HAVE_DOTPROD 1" >>confdefs.h + + intrinsics_support="$intrinsics_support (DOTPROD)" + + if test x"$OPUS_ARM_PRESUME_DOTPROD" = x"1" +then : + + +printf "%s\n" "#define OPUS_ARM_PRESUME_DOTPROD 1" >>confdefs.h + + intrinsics_support="$intrinsics_support (DOTPROD Aarch64)" + +fi + + if test x"$enable_rtcd" != x"no" && test x"$OPUS_ARM_PRESUME_DOTPROD" != x"1" +then : + if test x"$rtcd_support" = x"no" +then : + rtcd_support="ARM (DOTPROD Intrinsics)" +else $as_nop + rtcd_support="$rtcd_support (DOTPROD Intrinsics)" +fi +fi + + + +fi + + + if test x"$intrinsics_support" = x"" +then : intrinsics_support=no -else +else $as_nop intrinsics_support="ARM$intrinsics_support" fi -else +else $as_nop - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Compiler does not support ARM intrinsics" >&5 -$as_echo "$as_me: WARNING: Compiler does not support ARM intrinsics" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Compiler does not support ARM intrinsics" >&5 +printf "%s\n" "$as_me: WARNING: Compiler does not support ARM intrinsics" >&2;} intrinsics_support=no fi @@ -13873,15 +14670,15 @@ fi cpu_x86=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports SSE intrinsics" >&5 -$as_echo_n "checking if compiler supports SSE intrinsics... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler supports SSE intrinsics" >&5 +printf %s "checking if compiler supports SSE intrinsics... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int -main () +main (void) { __m128 mtest; @@ -13894,20 +14691,21 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : OPUS_X86_MAY_HAVE_SSE=1 OPUS_X86_PRESUME_SSE=1 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -else +else $as_nop OPUS_X86_PRESUME_SSE=0 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports SSE intrinsics with $X86_SSE_CFLAGS" >&5 -$as_echo_n "checking if compiler supports SSE intrinsics with $X86_SSE_CFLAGS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler supports SSE intrinsics with $X86_SSE_CFLAGS" >&5 +printf %s "checking if compiler supports SSE intrinsics with $X86_SSE_CFLAGS... " >&6; } save_CFLAGS="$CFLAGS"; CFLAGS="$CFLAGS $X86_SSE_CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -13915,7 +14713,7 @@ $as_echo_n "checking if compiler supports SSE intrinsics with $X86_SSE_CFLAGS... #include int -main () +main (void) { __m128 mtest; @@ -13928,28 +14726,30 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } OPUS_X86_MAY_HAVE_SSE=1 -else +else $as_nop - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } OPUS_X86_MAY_HAVE_SSE=0 fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$save_CFLAGS" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - if test x"$OPUS_X86_MAY_HAVE_SSE" = x"1" && test x"$OPUS_X86_PRESUME_SSE" != x"1"; then : + if test x"$OPUS_X86_MAY_HAVE_SSE" = x"1" && test x"$OPUS_X86_PRESUME_SSE" != x"1" +then : OPUS_X86_SSE_CFLAGS="$X86_SSE_CFLAGS" @@ -13957,15 +14757,15 @@ rm -f core conftest.err conftest.$ac_objext \ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports SSE2 intrinsics" >&5 -$as_echo_n "checking if compiler supports SSE2 intrinsics... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler supports SSE2 intrinsics" >&5 +printf %s "checking if compiler supports SSE2 intrinsics... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int -main () +main (void) { __m128i mtest; @@ -13978,20 +14778,21 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : OPUS_X86_MAY_HAVE_SSE2=1 OPUS_X86_PRESUME_SSE2=1 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -else +else $as_nop OPUS_X86_PRESUME_SSE2=0 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports SSE2 intrinsics with $X86_SSE2_CFLAGS" >&5 -$as_echo_n "checking if compiler supports SSE2 intrinsics with $X86_SSE2_CFLAGS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler supports SSE2 intrinsics with $X86_SSE2_CFLAGS" >&5 +printf %s "checking if compiler supports SSE2 intrinsics with $X86_SSE2_CFLAGS... " >&6; } save_CFLAGS="$CFLAGS"; CFLAGS="$CFLAGS $X86_SSE2_CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -13999,7 +14800,7 @@ $as_echo_n "checking if compiler supports SSE2 intrinsics with $X86_SSE2_CFLAGS. #include int -main () +main (void) { __m128i mtest; @@ -14012,28 +14813,30 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } OPUS_X86_MAY_HAVE_SSE2=1 -else +else $as_nop - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } OPUS_X86_MAY_HAVE_SSE2=0 fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$save_CFLAGS" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - if test x"$OPUS_X86_MAY_HAVE_SSE2" = x"1" && test x"$OPUS_X86_PRESUME_SSE2" != x"1"; then : + if test x"$OPUS_X86_MAY_HAVE_SSE2" = x"1" && test x"$OPUS_X86_PRESUME_SSE2" != x"1" +then : OPUS_X86_SSE2_CFLAGS="$X86_SSE2_CFLAGS" @@ -14041,15 +14844,15 @@ rm -f core conftest.err conftest.$ac_objext \ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports SSE4.1 intrinsics" >&5 -$as_echo_n "checking if compiler supports SSE4.1 intrinsics... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler supports SSE4.1 intrinsics" >&5 +printf %s "checking if compiler supports SSE4.1 intrinsics... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int -main () +main (void) { __m128i mtest; @@ -14062,20 +14865,21 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : OPUS_X86_MAY_HAVE_SSE4_1=1 OPUS_X86_PRESUME_SSE4_1=1 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -else +else $as_nop OPUS_X86_PRESUME_SSE4_1=0 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports SSE4.1 intrinsics with $X86_SSE4_1_CFLAGS" >&5 -$as_echo_n "checking if compiler supports SSE4.1 intrinsics with $X86_SSE4_1_CFLAGS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler supports SSE4.1 intrinsics with $X86_SSE4_1_CFLAGS" >&5 +printf %s "checking if compiler supports SSE4.1 intrinsics with $X86_SSE4_1_CFLAGS... " >&6; } save_CFLAGS="$CFLAGS"; CFLAGS="$CFLAGS $X86_SSE4_1_CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -14083,7 +14887,7 @@ $as_echo_n "checking if compiler supports SSE4.1 intrinsics with $X86_SSE4_1_CFL #include int -main () +main (void) { __m128i mtest; @@ -14096,28 +14900,30 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } OPUS_X86_MAY_HAVE_SSE4_1=1 -else +else $as_nop - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } OPUS_X86_MAY_HAVE_SSE4_1=0 fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$save_CFLAGS" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - if test x"$OPUS_X86_MAY_HAVE_SSE4_1" = x"1" && test x"$OPUS_X86_PRESUME_SSE4_1" != x"1"; then : + if test x"$OPUS_X86_MAY_HAVE_SSE4_1" = x"1" && test x"$OPUS_X86_PRESUME_SSE4_1" != x"1" +then : OPUS_X86_SSE4_1_CFLAGS="$X86_SSE4_1_CFLAGS" @@ -14125,203 +14931,233 @@ rm -f core conftest.err conftest.$ac_objext \ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports AVX intrinsics" >&5 -$as_echo_n "checking if compiler supports AVX intrinsics... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler supports AVX2 intrinsics" >&5 +printf %s "checking if compiler supports AVX2 intrinsics... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int -main () +main (void) { + unsigned char utest[16] = {1}; __m256 mtest; + __m256i mtest1; + __m256i mtest2; mtest = _mm256_set1_ps((float)time(NULL)); - mtest = _mm256_addsub_ps(mtest, mtest); - return _mm_cvtss_si32(_mm256_extractf128_ps(mtest, 0)); + mtest = _mm256_fmadd_ps(mtest, mtest, mtest); + 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); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : - OPUS_X86_MAY_HAVE_AVX=1 - OPUS_X86_PRESUME_AVX=1 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + OPUS_X86_MAY_HAVE_AVX2=1 + OPUS_X86_PRESUME_AVX2=1 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -else +else $as_nop - OPUS_X86_PRESUME_AVX=0 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports AVX intrinsics with $X86_AVX_CFLAGS" >&5 -$as_echo_n "checking if compiler supports AVX intrinsics with $X86_AVX_CFLAGS... " >&6; } - save_CFLAGS="$CFLAGS"; CFLAGS="$CFLAGS $X86_AVX_CFLAGS" + OPUS_X86_PRESUME_AVX2=0 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler supports AVX2 intrinsics with $X86_AVX2_CFLAGS" >&5 +printf %s "checking if compiler supports AVX2 intrinsics with $X86_AVX2_CFLAGS... " >&6; } + save_CFLAGS="$CFLAGS"; CFLAGS="$CFLAGS $X86_AVX2_CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int -main () +main (void) { + unsigned char utest[16] = {1}; __m256 mtest; + __m256i mtest1; + __m256i mtest2; mtest = _mm256_set1_ps((float)time(NULL)); - mtest = _mm256_addsub_ps(mtest, mtest); - return _mm_cvtss_si32(_mm256_extractf128_ps(mtest, 0)); + mtest = _mm256_fmadd_ps(mtest, mtest, mtest); + 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); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - OPUS_X86_MAY_HAVE_AVX=1 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + OPUS_X86_MAY_HAVE_AVX2=1 -else +else $as_nop - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - OPUS_X86_MAY_HAVE_AVX=0 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + OPUS_X86_MAY_HAVE_AVX2=0 fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$save_CFLAGS" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - if test x"$OPUS_X86_MAY_HAVE_AVX" = x"1" && test x"$OPUS_X86_PRESUME_AVX" != x"1"; then : + if test x"$OPUS_X86_MAY_HAVE_AVX2" = x"1" && test x"$OPUS_X86_PRESUME_AVX2" != x"1" +then : - OPUS_X86_AVX_CFLAGS="$X86_AVX_CFLAGS" + OPUS_X86_AVX2_CFLAGS="$X86_AVX2_CFLAGS" fi - if test x"$rtcd_support" = x"no"; then : + if test x"$rtcd_support" = x"no" +then : rtcd_support="" fi - if test x"$OPUS_X86_MAY_HAVE_SSE" = x"1"; then : + if test x"$OPUS_X86_MAY_HAVE_SSE" = x"1" +then : -$as_echo "#define OPUS_X86_MAY_HAVE_SSE 1" >>confdefs.h +printf "%s\n" "#define OPUS_X86_MAY_HAVE_SSE 1" >>confdefs.h intrinsics_support="$intrinsics_support SSE" - if test x"$OPUS_X86_PRESUME_SSE" = x"1"; then : + if test x"$OPUS_X86_PRESUME_SSE" = x"1" +then : -$as_echo "#define OPUS_X86_PRESUME_SSE 1" >>confdefs.h +printf "%s\n" "#define OPUS_X86_PRESUME_SSE 1" >>confdefs.h -else +else $as_nop rtcd_support="$rtcd_support SSE" fi -else +else $as_nop - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Compiler does not support SSE intrinsics" >&5 -$as_echo "$as_me: WARNING: Compiler does not support SSE intrinsics" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Compiler does not support SSE intrinsics" >&5 +printf "%s\n" "$as_me: WARNING: Compiler does not support SSE intrinsics" >&2;} fi - if test x"$OPUS_X86_MAY_HAVE_SSE2" = x"1"; then : + if test x"$OPUS_X86_MAY_HAVE_SSE2" = x"1" +then : -$as_echo "#define OPUS_X86_MAY_HAVE_SSE2 1" >>confdefs.h +printf "%s\n" "#define OPUS_X86_MAY_HAVE_SSE2 1" >>confdefs.h intrinsics_support="$intrinsics_support SSE2" - if test x"$OPUS_X86_PRESUME_SSE2" = x"1"; then : + if test x"$OPUS_X86_PRESUME_SSE2" = x"1" +then : -$as_echo "#define OPUS_X86_PRESUME_SSE2 1" >>confdefs.h +printf "%s\n" "#define OPUS_X86_PRESUME_SSE2 1" >>confdefs.h -else +else $as_nop rtcd_support="$rtcd_support SSE2" fi -else +else $as_nop - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Compiler does not support SSE2 intrinsics" >&5 -$as_echo "$as_me: WARNING: Compiler does not support SSE2 intrinsics" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Compiler does not support SSE2 intrinsics" >&5 +printf "%s\n" "$as_me: WARNING: Compiler does not support SSE2 intrinsics" >&2;} fi - if test x"$OPUS_X86_MAY_HAVE_SSE4_1" = x"1"; then : + if test x"$OPUS_X86_MAY_HAVE_SSE4_1" = x"1" +then : -$as_echo "#define OPUS_X86_MAY_HAVE_SSE4_1 1" >>confdefs.h +printf "%s\n" "#define OPUS_X86_MAY_HAVE_SSE4_1 1" >>confdefs.h intrinsics_support="$intrinsics_support SSE4.1" - if test x"$OPUS_X86_PRESUME_SSE4_1" = x"1"; then : + if test x"$OPUS_X86_PRESUME_SSE4_1" = x"1" +then : -$as_echo "#define OPUS_X86_PRESUME_SSE4_1 1" >>confdefs.h +printf "%s\n" "#define OPUS_X86_PRESUME_SSE4_1 1" >>confdefs.h -else +else $as_nop rtcd_support="$rtcd_support SSE4.1" fi -else +else $as_nop - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Compiler does not support SSE4.1 intrinsics" >&5 -$as_echo "$as_me: WARNING: Compiler does not support SSE4.1 intrinsics" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Compiler does not support SSE4.1 intrinsics" >&5 +printf "%s\n" "$as_me: WARNING: Compiler does not support SSE4.1 intrinsics" >&2;} fi - if test x"$OPUS_X86_MAY_HAVE_AVX" = x"1"; then : + if test x"$OPUS_X86_MAY_HAVE_AVX2" = x"1" +then : -$as_echo "#define OPUS_X86_MAY_HAVE_AVX 1" >>confdefs.h +printf "%s\n" "#define OPUS_X86_MAY_HAVE_AVX2 1" >>confdefs.h - intrinsics_support="$intrinsics_support AVX" + intrinsics_support="$intrinsics_support AVX2" - if test x"$OPUS_X86_PRESUME_AVX" = x"1"; then : + if test x"$OPUS_X86_PRESUME_AVX2" = x"1" +then : -$as_echo "#define OPUS_X86_PRESUME_AVX 1" >>confdefs.h +printf "%s\n" "#define OPUS_X86_PRESUME_AVX2 1" >>confdefs.h -else - rtcd_support="$rtcd_support AVX" +else $as_nop + rtcd_support="$rtcd_support AVX2" fi -else +else $as_nop - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Compiler does not support AVX intrinsics" >&5 -$as_echo "$as_me: WARNING: Compiler does not support AVX intrinsics" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Compiler does not support AVX2 intrinsics" >&5 +printf "%s\n" "$as_me: WARNING: Compiler does not support AVX2 intrinsics" >&2;} fi - if test x"$intrinsics_support" = x""; then : + if test x"$intrinsics_support" = x"" +then : intrinsics_support=no -else +else $as_nop intrinsics_support="x86$intrinsics_support" fi - if test x"$rtcd_support" = x""; then : + if test x"$rtcd_support" = x"" +then : rtcd_support=no -elif rtcd_support="x86$rtcd_support"; then : +elif rtcd_support="x86$rtcd_support" +then : fi - if test x"$enable_rtcd" = x"yes" && test x"$rtcd_support" != x""; then : + if test x"$enable_rtcd" = x"yes" && test x"$rtcd_support" != x"" +then : get_cpuid_by_asm="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking How to get X86 CPU Info" >&5 -$as_echo_n "checking How to get X86 CPU Info... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking How to get X86 CPU Info" >&5 +printf %s "checking How to get X86 CPU Info... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main () +main (void) { unsigned int CPUInfo0; @@ -14355,21 +15191,22 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : get_cpuid_by_asm="yes" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Inline Assembly" >&5 -$as_echo "Inline Assembly" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Inline Assembly" >&5 +printf "%s\n" "Inline Assembly" >&6; } -$as_echo "#define CPU_INFO_BY_ASM 1" >>confdefs.h +printf "%s\n" "#define CPU_INFO_BY_ASM 1" >>confdefs.h -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main () +main (void) { unsigned int CPUInfo0; @@ -14383,31 +15220,32 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: C method" >&5 -$as_echo "C method" >&6; } +if ac_fn_c_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: C method" >&5 +printf "%s\n" "C method" >&6; } -$as_echo "#define CPU_INFO_BY_C 1" >>confdefs.h +printf "%s\n" "#define CPU_INFO_BY_C 1" >>confdefs.h -else +else $as_nop as_fn_error $? "no supported Get CPU Info method, please disable run-time CPU capabilities detection or intrinsics" "$LINENO" 5 fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi ;; #( *) : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No intrinsics support for your architecture" >&5 -$as_echo "$as_me: WARNING: No intrinsics support for your architecture" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: No intrinsics support for your architecture" >&5 +printf "%s\n" "$as_me: WARNING: No intrinsics support for your architecture" >&2;} intrinsics_support="no" ;; esac -else +else $as_nop intrinsics_support="no" @@ -14421,6 +15259,14 @@ else CPU_ARM_FALSE= fi + if test x"$OPUS_ARM_MAY_HAVE_DOTPROD" = x"1"; then + HAVE_ARM_DOTPROD_TRUE= + HAVE_ARM_DOTPROD_FALSE='#' +else + HAVE_ARM_DOTPROD_TRUE='#' + HAVE_ARM_DOTPROD_FALSE= +fi + if test x"$OPUS_ARM_MAY_HAVE_NEON_INTR" = x"1"; then HAVE_ARM_NEON_INTR_TRUE= HAVE_ARM_NEON_INTR_FALSE='#' @@ -14469,12 +15315,12 @@ else HAVE_SSE4_1_FALSE= fi - if test x"$OPUS_X86_MAY_HAVE_AVX" = x"1"; then - HAVE_AVX_TRUE= - HAVE_AVX_FALSE='#' + if test x"$OPUS_X86_MAY_HAVE_AVX2" = x"1"; then + HAVE_AVX2_TRUE= + HAVE_AVX2_FALSE='#' else - HAVE_AVX_TRUE='#' - HAVE_AVX_FALSE= + HAVE_AVX2_TRUE='#' + HAVE_AVX2_FALSE= fi @@ -14486,105 +15332,118 @@ else HAVE_RTCD_FALSE= fi -if test x"$enable_rtcd" = x"yes"; then : +if test x"$enable_rtcd" = x"yes" +then : - if test x"$rtcd_support" != x"no"; then : + if test x"$rtcd_support" != x"no" +then : -$as_echo "#define OPUS_HAVE_RTCD 1" >>confdefs.h +printf "%s\n" "#define OPUS_HAVE_RTCD 1" >>confdefs.h OPUS_HAVE_RTCD=1 fi -else +else $as_nop rtcd_support="disabled" fi # Check whether --enable-assertions was given. -if test "${enable_assertions+set}" = set; then : +if test ${enable_assertions+y} +then : enableval=$enable_assertions; -else +else $as_nop enable_assertions=no fi -if test "$enable_assertions" = "yes"; then : +if test "$enable_assertions" = "yes" +then : -$as_echo "#define ENABLE_ASSERTIONS 1" >>confdefs.h +printf "%s\n" "#define ENABLE_ASSERTIONS 1" >>confdefs.h fi # Check whether --enable-hardening was given. -if test "${enable_hardening+set}" = set; then : +if test ${enable_hardening+y} +then : enableval=$enable_hardening; -else +else $as_nop enable_hardening=yes fi -if test "$enable_hardening" = "yes"; then : +if test "$enable_hardening" = "yes" +then : -$as_echo "#define ENABLE_HARDENING 1" >>confdefs.h +printf "%s\n" "#define ENABLE_HARDENING 1" >>confdefs.h fi # Check whether --enable-fuzzing was given. -if test "${enable_fuzzing+set}" = set; then : +if test ${enable_fuzzing+y} +then : enableval=$enable_fuzzing; -else +else $as_nop enable_fuzzing=no fi -if test "$enable_fuzzing" = "yes"; then : +if test "$enable_fuzzing" = "yes" +then : -$as_echo "#define FUZZING 1" >>confdefs.h +printf "%s\n" "#define FUZZING 1" >>confdefs.h fi # Check whether --enable-check-asm was given. -if test "${enable_check_asm+set}" = set; then : +if test ${enable_check_asm+y} +then : enableval=$enable_check_asm; -else +else $as_nop enable_check_asm=no fi -if test "$enable_check_asm" = "yes"; then : +if test "$enable_check_asm" = "yes" +then : -$as_echo "#define OPUS_CHECK_ASM 1" >>confdefs.h +printf "%s\n" "#define OPUS_CHECK_ASM 1" >>confdefs.h fi # Check whether --enable-doc was given. -if test "${enable_doc+set}" = set; then : +if test ${enable_doc+y} +then : enableval=$enable_doc; -else +else $as_nop enable_doc=yes fi -if test "$enable_doc" = "yes"; then : +if test "$enable_doc" = "yes" +then : # Extract the first word of "doxygen", so it can be a program name with args. set dummy doxygen; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_HAVE_DOXYGEN+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_HAVE_DOXYGEN+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$HAVE_DOXYGEN"; then ac_cv_prog_HAVE_DOXYGEN="$HAVE_DOXYGEN" # Let the user override the test. else @@ -14592,11 +15451,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_HAVE_DOXYGEN="yes" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -14608,21 +15471,22 @@ fi fi HAVE_DOXYGEN=$ac_cv_prog_HAVE_DOXYGEN if test -n "$HAVE_DOXYGEN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_DOXYGEN" >&5 -$as_echo "$HAVE_DOXYGEN" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAVE_DOXYGEN" >&5 +printf "%s\n" "$HAVE_DOXYGEN" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi # Extract the first word of "dot", so it can be a program name with args. set dummy dot; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_HAVE_DOT+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_HAVE_DOT+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$HAVE_DOT"; then ac_cv_prog_HAVE_DOT="$HAVE_DOT" # Let the user override the test. else @@ -14630,11 +15494,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_HAVE_DOT="yes" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -14646,21 +15514,117 @@ fi fi HAVE_DOT=$ac_cv_prog_HAVE_DOT if test -n "$HAVE_DOT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_DOT" >&5 -$as_echo "$HAVE_DOT" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAVE_DOT" >&5 +printf "%s\n" "$HAVE_DOT" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -else +else $as_nop HAVE_DOXYGEN=no fi +# Check whether --enable-dot-product was given. +if test ${enable_dot_product+y} +then : + enableval=$enable_dot_product; +else $as_nop + enable_dot_product=yes +fi + + +if test "$enable_dot_product" = "no" +then : + + +printf "%s\n" "#define DISABLE_DOT_PROD 1" >>confdefs.h + + +fi + +# Check whether --enable-dnn-debug-float was given. +if test ${enable_dnn_debug_float+y} +then : + enableval=$enable_dnn_debug_float; +else $as_nop + enable_dnn_debug_float=no +fi + + +if test "$enable_dnn_debug_float" = "no" +then : + + +printf "%s\n" "#define DISABLE_DEBUG_FLOAT 1" >>confdefs.h + + +fi + +# Check whether --enable-osce-training-data was given. +if test ${enable_osce_training_data+y} +then : + enableval=$enable_osce_training_data; +else $as_nop + enable_osc_training_data=no + +fi + + +if test "$enable_osce_training_data" = "yes" +then : + + +printf "%s\n" "#define ENABLE_OSCE_TRAINING_DATA 1" >>confdefs.h + + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking argument osce training data" >&5 +printf %s "checking argument osce training data... " >&6; } +if test "$enable_osce_training_data" = "yes" +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + +# Check whether --enable-osce was given. +if test ${enable_osce+y} +then : + enableval=$enable_osce; +else $as_nop + enable_osce=no + +fi + + +if test "$enable_osce" = "yes" || test "$enable_osce_training_data" = "yes" +then : + + +printf "%s\n" "#define ENABLE_OSCE 1" >>confdefs.h + + +fi + + if test "$enable_osce" = "yes" || test "$enable_osce_training_data" = "yes"; then + ENABLE_OSCE_TRUE= + ENABLE_OSCE_FALSE='#' +else + ENABLE_OSCE_TRUE='#' + ENABLE_OSCE_FALSE= +fi + + if test "$HAVE_DOXYGEN" = "yes"; then HAVE_DOXYGEN_TRUE= HAVE_DOXYGEN_FALSE='#' @@ -14671,9 +15635,10 @@ fi # Check whether --enable-extra-programs was given. -if test "${enable_extra_programs+set}" = set; then : +if test ${enable_extra_programs+y} +then : enableval=$enable_extra_programs; -else +else $as_nop enable_extra_programs=yes fi @@ -14689,17 +15654,19 @@ fi # Check whether --enable-rfc8251 was given. -if test "${enable_rfc8251+set}" = set; then : +if test ${enable_rfc8251+y} +then : enableval=$enable_rfc8251; -else +else $as_nop enable_rfc8251=yes fi -if test "$enable_rfc8251" = "no"; then : +if test "$enable_rfc8251" = "no" +then : -$as_echo "#define DISABLE_UPDATE_DRAFT 1" >>confdefs.h +printf "%s\n" "#define DISABLE_UPDATE_DRAFT 1" >>confdefs.h fi @@ -14707,22 +15674,23 @@ fi saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fvisibility=hidden" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${CC} supports -fvisibility=hidden" >&5 -$as_echo_n "checking if ${CC} supports -fvisibility=hidden... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ${CC} supports -fvisibility=hidden" >&5 +printf %s "checking if ${CC} supports -fvisibility=hidden... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ char foo; _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +if ac_fn_c_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } CFLAGS="$saved_CFLAGS" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext on_x86=no case "$host_cpu" in @@ -14739,56 +15707,61 @@ case $host in esac # Check whether --enable-stack-protector was given. -if test "${enable_stack_protector+set}" = set; then : +if test ${enable_stack_protector+y} +then : enableval=$enable_stack_protector; -else +else $as_nop - if test "$ac_cv_c_compiler_gnu" = "yes" && test "$on_x86" = "yes" && test "$on_windows" = "no"; then : + if test "$ac_cv_c_compiler_gnu" = "yes" && test "$on_x86" = "yes" && test "$on_windows" = "no" +then : enable_stack_protector=yes -else +else $as_nop enable_stack_protector=no fi fi -if test "$enable_stack_protector" = "yes"; then : +if test "$enable_stack_protector" = "yes" +then : saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fstack-protector-strong" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${CC} supports -fstack-protector-strong" >&5 -$as_echo_n "checking if ${CC} supports -fstack-protector-strong... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ${CC} supports -fstack-protector-strong" >&5 +printf %s "checking if ${CC} supports -fstack-protector-strong... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { char foo; ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else +if ac_fn_c_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else $as_nop - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } enable_stack_protector=no CFLAGS="$saved_CFLAGS" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi -if test x$ac_cv_c_compiler_gnu = xyes; then : +if test x$ac_cv_c_compiler_gnu = xyes +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to add -D_FORTIFY_SOURCE=2 to CFLAGS" >&5 -$as_echo_n "checking whether to add -D_FORTIFY_SOURCE=2 to CFLAGS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to add -D_FORTIFY_SOURCE=2 to CFLAGS" >&5 +printf %s "checking whether to add -D_FORTIFY_SOURCE=2 to CFLAGS... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -14803,19 +15776,20 @@ $as_echo_n "checking whether to add -D_FORTIFY_SOURCE=2 to CFLAGS... " >&6; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2" -else +else $as_nop - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -14826,59 +15800,48 @@ CFLAGS="$CFLAGS -W" warn_CFLAGS="-Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes" saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $warn_CFLAGS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${CC} supports ${warn_CFLAGS}" >&5 -$as_echo_n "checking if ${CC} supports ${warn_CFLAGS}... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ${CC} supports ${warn_CFLAGS}" >&5 +printf %s "checking if ${CC} supports ${warn_CFLAGS}... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ char foo; _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +if ac_fn_c_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } CFLAGS="$saved_CFLAGS" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext saved_LIBS="$LIBS" LIBS="$LIBS $LIBM" -for ac_func in lrintf -do : - ac_fn_c_check_func "$LINENO" "lrintf" "ac_cv_func_lrintf" -if test "x$ac_cv_func_lrintf" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LRINTF 1 -_ACEOF +ac_fn_c_check_func "$LINENO" "lrintf" "ac_cv_func_lrintf" +if test "x$ac_cv_func_lrintf" = xyes +then : + printf "%s\n" "#define HAVE_LRINTF 1" >>confdefs.h fi -done -for ac_func in lrint -do : - ac_fn_c_check_func "$LINENO" "lrint" "ac_cv_func_lrint" -if test "x$ac_cv_func_lrint" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LRINT 1 -_ACEOF +ac_fn_c_check_func "$LINENO" "lrint" "ac_cv_func_lrint" +if test "x$ac_cv_func_lrint" = xyes +then : + printf "%s\n" "#define HAVE_LRINT 1" >>confdefs.h fi -done LIBS="$saved_LIBS" -for ac_func in __malloc_hook -do : - ac_fn_c_check_func "$LINENO" "__malloc_hook" "ac_cv_func___malloc_hook" -if test "x$ac_cv_func___malloc_hook" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE___MALLOC_HOOK 1 -_ACEOF +ac_fn_c_check_func "$LINENO" "__malloc_hook" "ac_cv_func___malloc_hook" +if test "x$ac_cv_func___malloc_hook" = xyes +then : + printf "%s\n" "#define HAVE___MALLOC_HOOK 1" >>confdefs.h fi -done @@ -14915,8 +15878,8 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -14946,15 +15909,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; /^ac_cv_env_/b end t clear :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +printf "%s\n" "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else @@ -14968,8 +15931,8 @@ $as_echo "$as_me: updating cache $cache_file" >&6;} fi fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -14986,7 +15949,7 @@ U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" @@ -14997,14 +15960,14 @@ LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 -$as_echo_n "checking that generated files are newer than configure... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +printf %s "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 -$as_echo "done" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5 +printf "%s\n" "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' @@ -15041,6 +16004,18 @@ if test -z "${CUSTOM_MODES_TRUE}" && test -z "${CUSTOM_MODES_FALSE}"; then as_fn_error $? "conditional \"CUSTOM_MODES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${ENABLE_DRED_TRUE}" && test -z "${ENABLE_DRED_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_DRED\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_DEEP_PLC_TRUE}" && test -z "${ENABLE_DEEP_PLC_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_DEEP_PLC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_LOSSGEN_TRUE}" && test -z "${ENABLE_LOSSGEN_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_LOSSGEN\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${OPUS_ARM_INLINE_ASM_TRUE}" && test -z "${OPUS_ARM_INLINE_ASM_FALSE}"; then as_fn_error $? "conditional \"OPUS_ARM_INLINE_ASM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -15069,14 +16044,18 @@ if test -z "${HAVE_SSE4_1_TRUE}" && test -z "${HAVE_SSE4_1_FALSE}"; then as_fn_error $? "conditional \"HAVE_SSE4_1\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${HAVE_AVX_TRUE}" && test -z "${HAVE_AVX_FALSE}"; then - as_fn_error $? "conditional \"HAVE_AVX\" was never defined. +if test -z "${HAVE_AVX2_TRUE}" && test -z "${HAVE_AVX2_FALSE}"; then + as_fn_error $? "conditional \"HAVE_AVX2\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CPU_ARM_TRUE}" && test -z "${CPU_ARM_FALSE}"; then as_fn_error $? "conditional \"CPU_ARM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HAVE_ARM_DOTPROD_TRUE}" && test -z "${HAVE_ARM_DOTPROD_FALSE}"; then + as_fn_error $? "conditional \"HAVE_ARM_DOTPROD\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${HAVE_ARM_NEON_INTR_TRUE}" && test -z "${HAVE_ARM_NEON_INTR_FALSE}"; then as_fn_error $? "conditional \"HAVE_ARM_NEON_INTR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -15101,14 +16080,18 @@ if test -z "${HAVE_SSE4_1_TRUE}" && test -z "${HAVE_SSE4_1_FALSE}"; then as_fn_error $? "conditional \"HAVE_SSE4_1\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${HAVE_AVX_TRUE}" && test -z "${HAVE_AVX_FALSE}"; then - as_fn_error $? "conditional \"HAVE_AVX\" was never defined. +if test -z "${HAVE_AVX2_TRUE}" && test -z "${HAVE_AVX2_FALSE}"; then + as_fn_error $? "conditional \"HAVE_AVX2\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_RTCD_TRUE}" && test -z "${HAVE_RTCD_FALSE}"; then as_fn_error $? "conditional \"HAVE_RTCD\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${ENABLE_OSCE_TRUE}" && test -z "${ENABLE_OSCE_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_OSCE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${HAVE_DOXYGEN_TRUE}" && test -z "${HAVE_DOXYGEN_FALSE}"; then as_fn_error $? "conditional \"HAVE_DOXYGEN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -15122,8 +16105,8 @@ fi ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL @@ -15146,14 +16129,16 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +as_nop=: +if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else +else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -15163,46 +16148,46 @@ esac fi + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then +if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -15211,13 +16196,6 @@ if test "${PATH_SEPARATOR+set}" != set; then fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -15226,8 +16204,12 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS @@ -15239,30 +16221,10 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] @@ -15275,13 +16237,14 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $2" >&2 + printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error + # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -15308,18 +16271,20 @@ as_fn_unset () { eval $1=; unset $1;} } as_unset=as_fn_unset + # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : eval 'as_fn_append () { eval $1+=\$2 }' -else +else $as_nop as_fn_append () { eval $1=\$$1\$2 @@ -15331,12 +16296,13 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else +else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` @@ -15367,7 +16333,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -15389,6 +16355,10 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -15402,6 +16372,12 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -15443,7 +16419,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -15452,7 +16428,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | +printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -15514,8 +16490,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by opus $as_me 1.4, which was -generated by GNU Autoconf 2.69. Invocation command line was +This file was extended by opus $as_me 1.5.2, which was +generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -15577,14 +16553,16 @@ $config_commands Report bugs to ." _ACEOF +ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` +ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -opus config.status 1.4 -configured by $0, generated by GNU Autoconf 2.69, +opus config.status 1.5.2 +configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2021 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -15624,15 +16602,15 @@ do -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; + printf "%s\n" "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; + printf "%s\n" "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" @@ -15640,7 +16618,7 @@ do --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; @@ -15649,7 +16627,7 @@ do as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; + printf "%s\n" "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; @@ -15677,7 +16655,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" @@ -15691,7 +16669,7 @@ exec 5>>config.log sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - $as_echo "$ac_log" + printf "%s\n" "$ac_log" } >&5 _ACEOF @@ -16012,9 +16990,9 @@ done # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands + test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files + test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers + test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree @@ -16350,7 +17328,7 @@ do esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done @@ -16358,17 +17336,17 @@ do # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +printf "%s\n" "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | + ac_sed_conf_input=`printf "%s\n" "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac @@ -16385,7 +17363,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | +printf "%s\n" X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -16409,9 +17387,9 @@ $as_echo X"$ac_file" | case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -16473,8 +17451,8 @@ ac_sed_dataroot=' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' @@ -16518,9 +17496,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" @@ -16536,20 +17514,20 @@ which seems to be undefined. Please make sure it is defined" >&2;} # if test x"$ac_file" != x-; then { - $as_echo "/* $configure_input */" \ + printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else - $as_echo "/* $configure_input */" \ + printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi @@ -16569,7 +17547,7 @@ $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | +printf "%s\n" X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -16589,8 +17567,8 @@ $as_echo X"$_am_arg" | s/.*/./; q'`/stamp-h$_am_stamp_count ;; - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} + :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +printf "%s\n" "$as_me: executing $ac_file commands" >&6;} ;; esac @@ -16616,7 +17594,7 @@ esac for am_mf do # Strip MF so we end up with the name of the file. - am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` + am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line @@ -16628,7 +17606,7 @@ $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$am_mf" : 'X\(//\)[^/]' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$am_mf" | +printf "%s\n" X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -16650,7 +17628,7 @@ $as_echo X"$am_mf" | $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$am_mf" | +printf "%s\n" X/"$am_mf" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -16675,10 +17653,12 @@ $as_echo X/"$am_mf" | (exit $ac_status); } || am_rc=$? done if test $am_rc -ne 0; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "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 the package (albeit without support for automatic dependency tracking). See \`config.log' for more details" "$LINENO" 5; } @@ -17217,6 +18197,7 @@ _LT_EOF esac + ltmain=$ac_aux_dir/ltmain.sh @@ -17266,12 +18247,12 @@ if test "$no_create" != yes; then $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ------------------------------------------------------------------------ $PACKAGE_NAME $PACKAGE_VERSION: Automatic configuration OK. @@ -17303,7 +18284,7 @@ fi Type \"make; make install\" to compile and install Type \"make check\" to run the test suite " >&5 -$as_echo "$as_me: +printf "%s\n" "$as_me: ------------------------------------------------------------------------ $PACKAGE_NAME $PACKAGE_VERSION: Automatic configuration OK. @@ -17336,3 +18317,4 @@ $as_echo "$as_me: Type \"make check\" to run the test suite " >&6;} + diff --git a/src/libs/opus/configure.ac b/src/libs/opus/configure.ac index 999f1783..78defd6f 100644 --- a/src/libs/opus/configure.ac +++ b/src/libs/opus/configure.ac @@ -22,9 +22,9 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) # For libtool. dnl Please update these for releases. -OPUS_LT_CURRENT=9 -OPUS_LT_REVISION=0 -OPUS_LT_AGE=9 +OPUS_LT_CURRENT=10 +OPUS_LT_REVISION=1 +OPUS_LT_AGE=10 AC_SUBST(OPUS_LT_CURRENT) 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"]) +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 -#case "$host_cpu" in -#i[[3456]]86 | x86_64 | powerpc64 | powerpc32 | ia64) -# has_float_approx=yes -# ;; -#esac +case "$host_cpu" in +i[[3456]]86 | x86_64 | arm* | aarch64* | powerpc64 | powerpc32 | ia64) + has_float_approx=yes + ;; +esac AC_ARG_ENABLE([float-approx], [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 arm*) dnl Currently we only have asm for fixed-point - AS_IF([test "$enable_float" != "yes"],[ + #AS_IF([test "$enable_float" != "yes"],[ cpu_arm=yes AC_DEFINE([OPUS_ARM_ASM], [], [Make use of ARM asm optimization]) AS_GCC_INLINE_ASSEMBLY( @@ -316,6 +343,18 @@ AS_IF([test x"${enable_asm}" = x"yes"],[ ) ]) 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 instruction set. 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]) asm_optimization="(missing perl dependency for ARM)" ]) - ]) + #]) ;; esac ],[ @@ -352,13 +391,14 @@ AM_CONDITIONAL([OPUS_ARM_EXTERNAL_ASM], AM_CONDITIONAL([HAVE_SSE], [false]) AM_CONDITIONAL([HAVE_SSE2], [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_SSE2_CFLAGS], [-msse2]) 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_DOTPROD_INTR_CFLAGS], ["-march=armv8.2-a+dotprod"]) # 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), # 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_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_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_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_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_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_DOTPROD_INTR_CFLAGS], [], [AS_VAR_SET([ARM_DOTPROD_INTR_CFLAGS], ["DEFAULT_ARM_DOTPROD_INTR_CFLAGS"])]) AC_DEFUN([OPUS_PATH_NE10], [ @@ -525,6 +567,46 @@ AS_IF([test x"$enable_intrinsics" = x"yes"],[ 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 + ]], + [[ + 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""], [intrinsics_support=no], [intrinsics_support="ARM$intrinsics_support"]) @@ -601,24 +683,31 @@ AS_IF([test x"$enable_intrinsics" = x"yes"],[ ] ) OPUS_CHECK_INTRINSICS( - [AVX], - [$X86_AVX_CFLAGS], - [OPUS_X86_MAY_HAVE_AVX], - [OPUS_X86_PRESUME_AVX], + [AVX2], + [$X86_AVX2_CFLAGS], + [OPUS_X86_MAY_HAVE_AVX2], + [OPUS_X86_PRESUME_AVX2], [[#include #include ]], [[ + unsigned char utest[[16]] = {1}; __m256 mtest; + __m256i mtest1; + __m256i mtest2; mtest = _mm256_set1_ps((float)time(NULL)); - mtest = _mm256_addsub_ps(mtest, mtest); - return _mm_cvtss_si32(_mm256_extractf128_ps(mtest, 0)); + mtest = _mm256_fmadd_ps(mtest, mtest, mtest); + 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" - AC_SUBST([OPUS_X86_AVX_CFLAGS]) + OPUS_X86_AVX2_CFLAGS="$X86_AVX2_CFLAGS" + AC_SUBST([OPUS_X86_AVX2_CFLAGS]) ] ) 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]) ]) - 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]) - intrinsics_support="$intrinsics_support AVX" + AC_DEFINE([OPUS_X86_MAY_HAVE_AVX2], 1, [Compiler supports X86 AVX2 Intrinsics]) + intrinsics_support="$intrinsics_support AVX2" - AS_IF([test x"$OPUS_X86_PRESUME_AVX" = x"1"], - [AC_DEFINE([OPUS_X86_PRESUME_AVX], 1, [Define if binary requires AVX intrinsics support])], - [rtcd_support="$rtcd_support AVX"]) + AS_IF([test x"$OPUS_X86_PRESUME_AVX2" = x"1"], + [AC_DEFINE([OPUS_X86_PRESUME_AVX2], 1, [Define if binary requires AVX2 intrinsics support])], + [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""], @@ -742,6 +831,8 @@ AS_IF([test x"$enable_intrinsics" = x"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], [test x"$OPUS_ARM_MAY_HAVE_NEON_INTR" = x"1"]) AM_CONDITIONAL([HAVE_ARM_NE10], @@ -753,8 +844,8 @@ AM_CONDITIONAL([HAVE_SSE2], [test x"$OPUS_X86_MAY_HAVE_SSE2" = x"1"]) AM_CONDITIONAL([HAVE_SSE4_1], [test x"$OPUS_X86_MAY_HAVE_SSE4_1" = x"1"]) -AM_CONDITIONAL([HAVE_AVX], - [test x"$OPUS_X86_MAY_HAVE_AVX" = x"1"]) +AM_CONDITIONAL([HAVE_AVX2], + [test x"$OPUS_X86_MAY_HAVE_AVX2" = x"1"]) AM_CONDITIONAL([HAVE_RTCD], [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 ]) +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"]) AC_ARG_ENABLE([extra-programs], diff --git a/src/libs/opus/depcomp b/src/libs/opus/depcomp index 65cbf709..715e3431 100755 --- a/src/libs/opus/depcomp +++ b/src/libs/opus/depcomp @@ -3,7 +3,7 @@ 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 # it under the terms of the GNU General Public License as published by diff --git a/src/libs/opus/dnn/dred_rdovae_dec_data.c b/src/libs/opus/dnn/dred_rdovae_dec_data.c index bd10feac..bc58e1fd 100644 --- a/src/libs/opus/dnn/dred_rdovae_dec_data.c +++ b/src/libs/opus/dnn/dred_rdovae_dec_data.c @@ -86297,361 +86297,361 @@ static const float dec_conv5_bias[32] = { #ifndef USE_WEIGHTS_FILE const WeightArray rdovaedec_arrays[] = { #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 {NULL,0,0,NULL} }; diff --git a/src/libs/opus/dnn/dred_rdovae_enc_data.c b/src/libs/opus/dnn/dred_rdovae_enc_data.c index a344c336..0b96b950 100644 --- a/src/libs/opus/dnn/dred_rdovae_enc_data.c +++ b/src/libs/opus/dnn/dred_rdovae_enc_data.c @@ -127942,295 +127942,295 @@ static const float enc_conv5_bias[96] = { #ifndef USE_WEIGHTS_FILE const WeightArray rdovaeenc_arrays[] = { #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 #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 {NULL,0,0,NULL} }; diff --git a/src/libs/opus/dnn/dump_data.c b/src/libs/opus/dnn/dump_data.c index e4c78c7e..65b9639b 100644 --- a/src/libs/opus/dnn/dump_data.c +++ b/src/libs/opus/dnn/dump_data.c @@ -68,13 +68,6 @@ static void rand_resp(float *a, float *b) { b[1] = .75*uni_rand(); } -void compute_noise(int *noise, float noise_std) { - int i; - for (i=0;ifeatures[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 i; char *argv0; @@ -123,13 +92,11 @@ int main(int argc, char **argv) { FILE *ffeat; FILE *fpcm=NULL; opus_int16 pcm[FRAME_SIZE]={0}; - int noisebuf[FRAME_SIZE]={0}; opus_int16 tmp[FRAME_SIZE] = {0}; float speech_gain=1; float old_speech_gain = 1; int one_pass_completed = 0; LPCNetEncState *st; - float noise_std=0; int training = -1; int burg = 0; int pitch = 0; @@ -202,16 +169,12 @@ int main(int argc, char **argv) { for (i=0;i=10000000 && one_pass_completed) break; if (training && ++gain_change_count > 2821) { - float tmp1, tmp2; speech_gain = pow(10., (-30+(rand()%40))/20.); if (rand()&1) speech_gain = -speech_gain; if (rand()%20==0) speech_gain *= .01; if (!pitch && rand()%100==0) speech_gain = 0; gain_change_count = 0; 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) { long pos; /* 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); } preemphasis(x, &mem_preemph, x, PREEMPHASIS, FRAME_SIZE); - for (i=0;ifeatures, sizeof(float), NB_TOTAL_FEATURES, ffeat); } /*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);*/ for (i=0;i #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. */ static OPUS_INLINE int32x4_t vcvtnq_s32_f32(float32x4_t x) { return vrshrq_n_s32(vcvtq_n_s32_f32(x, 8), 8); diff --git a/src/libs/opus/doc/Makefile.in b/src/libs/opus/doc/Makefile.in index c6da428d..f3b05c49 100644 --- a/src/libs/opus/doc/Makefile.in +++ b/src/libs/opus/doc/Makefile.in @@ -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@ -# 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 # gives unlimited permission to copy and/or distribute it, @@ -129,6 +129,7 @@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ARM2GNU_PARAMS = @ARM2GNU_PARAMS@ +ARM_DOTPROD_INTR_CFLAGS = @ARM_DOTPROD_INTR_CFLAGS@ ARM_NEON_INTR_CFLAGS = @ARM_NEON_INTR_CFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -142,6 +143,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -152,6 +155,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ @@ -184,6 +188,8 @@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ 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_MEDIA = @OPUS_ARM_MAY_HAVE_MEDIA@ 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_CURRENT = @OPUS_LT_CURRENT@ 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_SSE4_1_CFLAGS = @OPUS_X86_SSE4_1_CFLAGS@ OPUS_X86_SSE_CFLAGS = @OPUS_X86_SSE_CFLAGS@ @@ -213,7 +219,7 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ -X86_AVX_CFLAGS = @X86_AVX_CFLAGS@ +X86_AVX2_CFLAGS = @X86_AVX2_CFLAGS@ X86_SSE2_CFLAGS = @X86_SSE2_CFLAGS@ X86_SSE4_1_CFLAGS = @X86_SSE4_1_CFLAGS@ X86_SSE_CFLAGS = @X86_SSE_CFLAGS@ @@ -328,7 +334,6 @@ ctags CTAGS: cscope cscopelist: - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -397,9 +402,9 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -@HAVE_DOXYGEN_FALSE@uninstall-local: @HAVE_DOXYGEN_FALSE@clean-local: @HAVE_DOXYGEN_FALSE@install-data-local: +@HAVE_DOXYGEN_FALSE@uninstall-local: clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am diff --git a/src/libs/opus/include/opus.h b/src/libs/opus/include/opus.h index 0c69c627..eadeda75 100644 --- a/src/libs/opus/include/opus.h +++ b/src/libs/opus/include/opus.h @@ -103,7 +103,7 @@ extern "C" { * @endcode * * 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 * 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); * @endcode * 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 * 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; +/** 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 OpusDecoder structure. * @param [in] channels int: Number of channels. * 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); +/** Gets the size of an OpusDREDDecoder structure. + * @returns The size in bytes. + */ +OPUS_EXPORT int opus_dred_decoder_get_size(void); + +/** Allocates and initializes an OpusDREDDecoder state. + * @param [out] error int*: #OPUS_OK Success or @ref opus_errorcodes + */ +OPUS_EXPORT OpusDREDDecoder *opus_dred_decoder_create(int *error); + +/** Initializes an OpusDREDDecoder state. + * @param[in] dec OpusDREDDecoder*: State to be initialized. + */ +OPUS_EXPORT int opus_dred_decoder_init(OpusDREDDecoder *dec); + +/** Frees an OpusDREDDecoder allocated by opus_dred_decoder_create(). + * @param[in] dec OpusDREDDecoder*: 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 OpusDREDDecoder*: 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 OpusDRED structure. + * @returns The size in bytes. + */ +OPUS_EXPORT int opus_dred_get_size(void); + +/** Allocates and initializes a DRED state. + * @param [out] error int*: #OPUS_OK Success or @ref opus_errorcodes + */ +OPUS_EXPORT OpusDRED *opus_dred_alloc(int *error); + +/** Frees an OpusDRED allocated by opus_dred_create(). + * @param[in] dec OpusDRED*: State to be freed. + */ +OPUS_EXPORT void opus_dred_free(OpusDRED *dec); + +/** Decode an Opus DRED packet. + * @param [in] dred_dec OpusDRED*: DRED Decoder state + * @param [in] dred OpusDRED*: DRED state + * @param [in] data char*: Input payload + * @param [in] len opus_int32: Number of bytes in payload + * @param [in] max_dred_samples opus_int32: Maximum number of DRED samples that may be needed (if available in the packet). + * @param [in] sampling_rate opus_int32: Sampling rate used for max_dred_samples argument. Needs not match the actual sampling rate of the decoder. + * @param [out] dred_end opus_int32*: Number of non-encoded (silence) samples between the DRED timestamp and the last DRED sample. + * @param [in] defer_processing int: 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 OpusDRED*: DRED Decoder state + * @param [in] src OpusDRED*: Source DRED state to start the processing from. + * @param [out] dst OpusDRED*: 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 OpusDecoder*: Decoder state + * @param [in] dred OpusDRED*: DRED state + * @param [in] dred_offset opus_int32: position of the redundancy to decode (in samples before the beginning of the real audio data in the packet). + * @param [out] pcm opus_int16*: 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 must 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 OpusDecoder*: Decoder state + * @param [in] dred OpusDRED*: DRED state + * @param [in] dred_offset opus_int32: position of the redundancy to decode (in samples before the beginning of the real audio data in the packet). + * @param [out] pcm float*: 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 must 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. * Opus_decode will perform this operation internally so most applications do * 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); +/** Checks whether an Opus packet has LBRR. + * @param [in] packet char*: Opus packet + * @param [in] len opus_int32: 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. * @param [in] dec OpusDecoder*: Decoder state * @param [in] packet char*: Opus packet diff --git a/src/libs/opus/include/opus_defines.h b/src/libs/opus/include/opus_defines.h index 94b9e0d9..cd8f4dde 100644 --- a/src/libs/opus/include/opus_defines.h +++ b/src/libs/opus/include/opus_defines.h @@ -169,15 +169,32 @@ extern "C" { #define OPUS_SET_PHASE_INVERSION_DISABLED_REQUEST 4046 #define OPUS_GET_PHASE_INVERSION_DISABLED_REQUEST 4047 #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. */ #define OPUS_HAVE_OPUS_PROJECTION_H /* 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)) + +#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_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_void_ptr(x) ((void)((void *)0 == (x)), (x)) +#endif /** @endcond */ /** @defgroup opus_ctlvalues Pre-defined values for CTL interface @@ -620,6 +637,18 @@ extern "C" { * @hideinitializer */ #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 diff --git a/src/libs/opus/include/opus_multistream.h b/src/libs/opus/include/opus_multistream.h index babcee69..824cc55a 100644 --- a/src/libs/opus/include/opus_multistream.h +++ b/src/libs/opus/include/opus_multistream.h @@ -143,7 +143,7 @@ extern "C" { * Vorbis * channel ordering. A decoder may wish to apply an additional permutation * 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 * the Opus packets in a single multistream packet must have the same diff --git a/src/libs/opus/install-sh b/src/libs/opus/install-sh index 8175c640..ec298b53 100755 --- a/src/libs/opus/install-sh +++ b/src/libs/opus/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # 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 # later released in X11R6 (xc/config/util/install.sh) with the @@ -69,6 +69,11 @@ posix_mkdir= # Desired mode of installed file. 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= chmodcmd=$chmodprog chowncmd= @@ -99,18 +104,28 @@ Options: --version display version info and exit. -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. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. + -p pass -p to $cpprog. -s $stripprog installed files. + -S SUFFIX attempt to back up existing files, with suffix SUFFIX. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG 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 @@ -137,8 +152,13 @@ while test $# -ne 0; do -o) chowncmd="$chownprog $2" shift;; + -p) cpprog="$cpprog -p";; + -s) stripcmd=$stripprog;; + -S) backupsuffix="$2" + shift;; + -t) is_target_a_directory=always dst_arg=$2 @@ -255,6 +275,10 @@ do dstdir=$dst test -d "$dstdir" dstdir_status=$? + # Don't chown directories that already exist. + if test $dstdir_status = 0; then + chowncmd="" + fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command @@ -301,22 +325,6 @@ do if test $dstdir_status != 0; then 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. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then @@ -326,52 +334,49 @@ do fi posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # 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-$$ + # The $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 - # directly in world-writeable /tmp, make sure that the '$tmpdir' - # directory is successfully created first before we actually test - # 'mkdir -p' feature. - if (umask $mkdir_umask && - $mkdirprog $mkdir_mode "$tmpdir" && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - test_tmpdir="$tmpdir/a" - ls_ld_tmpdir=`ls -ld "$test_tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null - fi - trap '' 0;; - esac;; + # Because "mkdir -p" follows existing symlinks and we likely work + # directly in world-writeable /tmp, make sure that the '$tmpdir' + # directory is successfully created first before we actually test + # 'mkdir -p'. + if (umask $mkdir_umask && + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null + fi + trap '' 0;; esac if @@ -382,7 +387,7 @@ do then : 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 # directory the slow way, step by step, checking for races as we go. @@ -411,7 +416,7 @@ do prefixes= else if $posix_mkdir; then - (umask=$mkdir_umask && + (umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 @@ -451,7 +456,18 @@ do trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # 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. # @@ -477,6 +493,13 @@ do then rm -f "$dsttmp" 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. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || @@ -491,9 +514,9 @@ do # file should still install successfully. { 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 $rmcmd -f "$rmtmp" 2>/dev/null; :; } + { $doit $rmcmd "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 diff --git a/src/libs/opus/ltmain.sh b/src/libs/opus/ltmain.sh old mode 100644 new mode 100755 index 0cb7f90d..540a92ab --- a/src/libs/opus/ltmain.sh +++ b/src/libs/opus/ltmain.sh @@ -31,7 +31,7 @@ PROGRAM=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 @@ -2141,7 +2141,7 @@ include the following information: compiler: $LTCC compiler flags: $LTCFLAGS 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` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` diff --git a/src/libs/opus/m4/libtool.m4 b/src/libs/opus/m4/libtool.m4 index a6d21ae5..c4c02946 100644 --- a/src/libs/opus/m4/libtool.m4 +++ b/src/libs/opus/m4/libtool.m4 @@ -1071,11 +1071,11 @@ _LT_EOF # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? 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' ;; 10.[[012]][[,.]]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) + 10.*|11.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; diff --git a/src/libs/opus/meson.build b/src/libs/opus/meson.build index ed66d380..d040ddfd 100644 --- a/src/libs/opus/meson.build +++ b/src/libs/opus/meson.build @@ -14,7 +14,7 @@ host_cpu_family = host_machine.cpu_family() top_srcdir = meson.current_source_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') add_project_arguments('-DOPUS_BUILD', language: 'c') @@ -161,6 +161,21 @@ foreach opt : opts set_variable('opt_' + opt[0].underscorify(), opt_foo) 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_rtcd = get_option('rtcd') opt_intrinsics = get_option('intrinsics') @@ -172,6 +187,10 @@ if disable_float_api opus_conf.set('DISABLE_FLOAT_API', 1) 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 if opt_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 #endif #endif - __asm__ (""::)''', + int main(int argc, char ** argv) { __asm__ (""::); }''', name : 'compiler supports gcc-style inline assembly') 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) inline_optimization += ['NEON'] 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 # 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_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 opus_arm_may_have_edsp message('Trying to force-enable armv5e EDSP instructions...') # 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)') endif if not opus_arm_may_have_media 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)') endif if not opus_arm_may_have_neon 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)') endif endif @@ -312,8 +341,17 @@ if not opt_asm.disabled() rtcd_support += ['NEON'] 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'] else arm2gnu_args = [] @@ -338,12 +376,14 @@ endif # -mfloat-abi=softfp to enable NEON. F.ex., on Android. It should # be set in the cross file. arm_neon_intr_link_args = ['-mfpu=neon'] +arm_dotprod_intr_link_args = ['-march=armv8.2-a+dotprod'] have_sse = false have_sse2 = false have_sse4_1 = false -have_avx = false # no avx opus code yet +have_avx2 = false have_neon_intr = false +have_dotprod_intr = false intrinsics_support = [] if not opt_intrinsics.disabled() @@ -419,13 +459,53 @@ if not opt_intrinsics.disabled() else message('Compiler does not support @0@ intrinsics'.format(intrin_name)) endif + + # Check for ARMv8.2 dotprod intrinsics + intrin_check = ''' + #include + 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'] # XXX: allow external override/specification of the flags x86_intrinsics = [ - [ 'SSE', 'xmmintrin.h', '__m128', '_mm_setzero_ps()', ['-msse'] ], - [ 'SSE2', 'emmintrin.h', '__m128i', '_mm_setzero_si128()', ['-msse2'] ], - [ 'SSE4.1', 'smmintrin.h', '__m128i', '_mm_setzero_si128(); mtest = _mm_cmpeq_epi64(mtest, mtest)', ['-msse4.1'] ], - [ 'AVX', 'immintrin.h', '__m256', '_mm256_setzero_ps()', ['-mavx'] ], + [ 'SSE', 'xmmintrin.h', '__m128', '_mm_setzero_ps()', ['-msse'], [] ], + [ 'SSE2', 'emmintrin.h', '__m128i', '_mm_setzero_si128()', ['-msse2'], [] ], + [ 'SSE4.1', 'smmintrin.h', '__m128i', '_mm_setzero_si128(); mtest = _mm_cmpeq_epi64(mtest, mtest)', ['-msse4.1'], [] ], + [ 'AVX2', 'immintrin.h', '__m256i', '_mm256_abs_epi32(_mm256_setzero_si256())', ['-mavx', '-mfma', '-mavx2'], ['/arch:AVX2'] ], ] foreach intrin : x86_intrinsics @@ -436,9 +516,11 @@ if not opt_intrinsics.disabled() return *((unsigned char *) &mtest) != 0; }'''.format(intrin[1],intrin[2],intrin[3]) intrin_name = intrin[0] - # Intrinsics arguments are not available with MSVC-like compilers - intrin_args = cc.get_argument_syntax() == 'msvc' ? [] : intrin[4] - if cc.links(intrin_check, name : 'compiler supports @0@ intrinsics'.format(intrin_name)) + intrin_args = cc.get_argument_syntax() == 'msvc' ? intrin[5] : 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)) + 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 presume_intrin = opus_can_presume_simd elif intrin_args.length() > 0 @@ -563,7 +645,12 @@ else endif # 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') sources = {} foreach l : lines @@ -574,8 +661,9 @@ foreach l : lines endforeach subdir('include') -subdir('silk') subdir('celt') +subdir('silk') +subdir('dnn') subdir('src') configure_file(output: 'config.h', configuration: opus_conf) @@ -586,29 +674,11 @@ if not opt_tests.disabled() subdir('tests') endif -# pkg-config files (not using pkg module so we can use the existing .pc.in file) -pkgconf = configuration_data() - -pkgconf.set('prefix', join_paths(get_option('prefix'))) -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) +pkg = import('pkgconfig') +pkg.generate(opus_lib, + description: 'Opus IETF audio codec (floating-point build)', + subdirs: 'opus', +) doxygen = find_program('doxygen', required: get_option('docs')) if doxygen.found() diff --git a/src/libs/opus/meson_options.txt b/src/libs/opus/meson_options.txt index 360ff263..a2981d0b 100644 --- a/src/libs/opus/meson_options.txt +++ b/src/libs/opus/meson_options.txt @@ -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('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('extra-programs', type : 'feature', value : 'auto', description : 'Extra programs (demo and tests)') option('assertions', type : 'boolean', value : false, description : 'Additional software error checking') diff --git a/src/libs/opus/missing b/src/libs/opus/missing index 625aeb11..1fe1611f 100755 --- a/src/libs/opus/missing +++ b/src/libs/opus/missing @@ -3,7 +3,7 @@ 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 , 1996. # This program is free software; you can redistribute it and/or modify diff --git a/src/libs/opus/opus_headers.mk b/src/libs/opus/opus_headers.mk index 27596f2a..4c73e935 100644 --- a/src/libs/opus/opus_headers.mk +++ b/src/libs/opus/opus_headers.mk @@ -5,5 +5,4 @@ include/opus_projection.h \ src/opus_private.h \ src/analysis.h \ src/mapping_matrix.h \ -src/mlp.h \ -src/tansig_table.h +src/mlp.h diff --git a/src/libs/opus/opus_sources.mk b/src/libs/opus/opus_sources.mk index 44153b57..91589efa 100644 --- a/src/libs/opus/opus_sources.mk +++ b/src/libs/opus/opus_sources.mk @@ -2,6 +2,7 @@ OPUS_SOURCES = \ src/opus.c \ src/opus_decoder.c \ src/opus_encoder.c \ +src/extensions.c \ src/opus_multistream.c \ src/opus_multistream_encoder.c \ src/opus_multistream_decoder.c \ diff --git a/src/libs/opus/package_version b/src/libs/opus/package_version index 519f5b89..8463c415 100644 --- a/src/libs/opus/package_version +++ b/src/libs/opus/package_version @@ -1 +1 @@ -PACKAGE_VERSION="1.4" +PACKAGE_VERSION="1.5.2" diff --git a/src/libs/opus/silk/API.h b/src/libs/opus/silk/API.h index 4d90ff9a..878965c7 100644 --- a/src/libs/opus/silk/API.h +++ b/src/libs/opus/silk/API.h @@ -34,6 +34,10 @@ POSSIBILITY OF SUCH DAMAGE. #include "entenc.h" #include "entdec.h" +#ifdef ENABLE_DEEP_PLC +#include "lpcnet_private.h" +#endif + #ifdef __cplusplus extern "C" { @@ -88,6 +92,16 @@ opus_int silk_Encode( /* O Returns error co /* 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 */ /***********************************************/ @@ -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 */ 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 */ opus_int16 *samplesOut, /* O Decoded output speech vector */ opus_int32 *nSamplesOut, /* O Number of samples decoded */ +#ifdef ENABLE_DEEP_PLC + LPCNetPLCState *lpcnet, +#endif int arch /* I Run-time architecture */ ); diff --git a/src/libs/opus/silk/NSQ.c b/src/libs/opus/silk/NSQ.c index 45dd45ce..1caa829b 100644 --- a/src/libs/opus/silk/NSQ.c +++ b/src/libs/opus/silk/NSQ.c @@ -80,7 +80,7 @@ void silk_NSQ_c SideInfoIndices *psIndices, /* I/O Quantization Indices */ const opus_int16 x16[], /* I Input */ 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 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 */ @@ -258,8 +258,8 @@ void silk_noise_shape_quantizer( celt_assert( lag > 0 || signalType != TYPE_VOICED ); /* Combine prediction and noise shaping signals */ - tmp1 = silk_SUB32( silk_LSHIFT32( LPC_pred_Q10, 2 ), n_AR_Q12 ); /* Q12 */ - tmp1 = silk_SUB32( tmp1, n_LF_Q12 ); /* Q12 */ + tmp1 = silk_SUB32_ovflw( silk_LSHIFT32( LPC_pred_Q10, 2 ), n_AR_Q12 ); /* Q12 */ + tmp1 = silk_SUB32_ovflw( tmp1, n_LF_Q12 ); /* Q12 */ if( lag > 0 ) { /* Symmetric, packed FIR coefficients */ 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++; 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 */ } else { tmp1 = silk_RSHIFT_ROUND( tmp1, 2 ); /* Q10 */ @@ -340,7 +340,7 @@ void silk_noise_shape_quantizer( /* Add predictions */ 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 */ 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 = xq_Q14; 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->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 ); NSQ->sLTP_shp_buf_idx++; NSQ->sLTP_buf_idx++; diff --git a/src/libs/opus/silk/NSQ_del_dec.c b/src/libs/opus/silk/NSQ_del_dec.c index 41f3fc93..e8dadf15 100644 --- a/src/libs/opus/silk/NSQ_del_dec.c +++ b/src/libs/opus/silk/NSQ_del_dec.c @@ -120,7 +120,7 @@ void silk_NSQ_del_dec_c( SideInfoIndices *psIndices, /* I/O Quantization Indices */ const opus_int16 x16[], /* I Input */ 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 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 */ @@ -423,18 +423,18 @@ static OPUS_INLINE void silk_noise_shape_quantizer_del_dec( /* Output of lowpass section */ tmp2 = silk_SMLAWB( psDD->Diff_Q14, psDD->sAR2_Q14[ 0 ], warping_Q16 ); /* 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; n_AR_Q14 = silk_RSHIFT( shapingLPCOrder, 1 ); n_AR_Q14 = silk_SMLAWB( n_AR_Q14, tmp2, AR_shp_Q13[ 0 ] ); /* Loop over allpass sections */ for( j = 2; j < shapingLPCOrder; j += 2 ) { /* 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; n_AR_Q14 = silk_SMLAWB( n_AR_Q14, tmp1, AR_shp_Q13[ j - 1 ] ); /* 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; 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 */ /* 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 */ - 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_RSHIFT_ROUND( tmp1, 4 ); /* Q10 */ @@ -530,11 +530,11 @@ static OPUS_INLINE void silk_noise_shape_quantizer_del_dec( /* Add predictions */ 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 */ - psSS[ 0 ].Diff_Q14 = silk_SUB_LSHIFT32( xq_Q14, x_Q10[ i ], 4 ); - sLF_AR_shp_Q14 = silk_SUB32( psSS[ 0 ].Diff_Q14, n_AR_Q14 ); + psSS[ 0 ].Diff_Q14 = silk_SUB32_ovflw( xq_Q14, silk_LSHIFT32( x_Q10[ i ], 4 ) ); + 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 ].LF_AR_Q14 = sLF_AR_shp_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 */ 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 */ - psSS[ 1 ].Diff_Q14 = silk_SUB_LSHIFT32( xq_Q14, x_Q10[ i ], 4 ); - sLF_AR_shp_Q14 = silk_SUB32( psSS[ 1 ].Diff_Q14, n_AR_Q14 ); + psSS[ 1 ].Diff_Q14 = silk_SUB32_ovflw( xq_Q14, silk_LSHIFT32( x_Q10[ i ], 4 ) ); + 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 ].LF_AR_Q14 = sLF_AR_shp_Q14; psSS[ 1 ].LPC_exc_Q14 = LPC_exc_Q14; diff --git a/src/libs/opus/silk/PLC.c b/src/libs/opus/silk/PLC.c index 4667440d..b35bf750 100644 --- a/src/libs/opus/silk/PLC.c +++ b/src/libs/opus/silk/PLC.c @@ -33,6 +33,10 @@ POSSIBILITY OF SUCH DAMAGE. #include "stack_alloc.h" #include "PLC.h" +#ifdef ENABLE_DEEP_PLC +#include "lpcnet.h" +#endif + #define NB_ATT 2 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 */ @@ -47,6 +51,9 @@ static OPUS_INLINE void silk_PLC_conceal( silk_decoder_state *psDec, /* I/O Decoder state */ silk_decoder_control *psDecCtrl, /* I/O Decoder control */ opus_int16 frame[], /* O LPC residual signal */ +#ifdef ENABLE_DEEP_PLC + LPCNetPLCState *lpcnet, +#endif int arch /* I Run-time architecture */ ); @@ -67,6 +74,9 @@ void silk_PLC( silk_decoder_control *psDecCtrl, /* I/O Decoder control */ opus_int16 frame[], /* I/O signal */ opus_int lost, /* I Loss flag */ +#ifdef ENABLE_DEEP_PLC + LPCNetPLCState *lpcnet, +#endif int arch /* I Run-time architecture */ ) { @@ -80,7 +90,11 @@ void silk_PLC( /****************************/ /* Generate Signal */ /****************************/ - silk_PLC_conceal( psDec, psDecCtrl, frame, arch ); + silk_PLC_conceal( psDec, psDecCtrl, frame, +#ifdef ENABLE_DEEP_PLC + lpcnet, +#endif + arch ); psDec->lossCnt++; } else { @@ -88,6 +102,14 @@ void silk_PLC( /* Update state */ /****************************/ 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_control *psDecCtrl, /* I/O Decoder control */ opus_int16 frame[], /* O LPC residual signal */ +#ifdef ENABLE_DEEP_PLC + LPCNetPLCState *lpcnet, +#endif int arch /* I Run-time architecture */ ) { @@ -371,6 +396,24 @@ static OPUS_INLINE void silk_PLC_conceal( /* 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 ) ) ); } +#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 */ 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 ); /* Make slope 4x steeper to avoid missing onsets after DTX */ slope_Q16 = silk_LSHIFT( slope_Q16, 2 ); - - for( i = 0; i < length; i++ ) { - frame[ i ] = silk_SMULWB( gain_Q16, frame[ i ] ); - gain_Q16 += slope_Q16; - if( gain_Q16 > (opus_int32)1 << 16 ) { - break; +#ifdef ENABLE_DEEP_PLC + if ( psDec->sPLC.fs_kHz != 16 ) +#endif + { + for( i = 0; i < length; i++ ) { + frame[ i ] = silk_SMULWB( gain_Q16, frame[ i ] ); + gain_Q16 += slope_Q16; + if( gain_Q16 > (opus_int32)1 << 16 ) { + break; + } } } } diff --git a/src/libs/opus/silk/PLC.h b/src/libs/opus/silk/PLC.h index 6438f516..1bebb786 100644 --- a/src/libs/opus/silk/PLC.h +++ b/src/libs/opus/silk/PLC.h @@ -49,6 +49,9 @@ void silk_PLC( silk_decoder_control *psDecCtrl, /* I/O Decoder control */ opus_int16 frame[], /* I/O signal */ opus_int lost, /* I Loss flag */ +#ifdef ENABLE_DEEP_PLC + LPCNetPLCState *lpcnet, +#endif int arch /* I Run-time architecture */ ); diff --git a/src/libs/opus/silk/arm/NSQ_del_dec_arm.h b/src/libs/opus/silk/arm/NSQ_del_dec_arm.h index 9e76e169..0c4fcfcc 100644 --- a/src/libs/opus/silk/arm/NSQ_del_dec_arm.h +++ b/src/libs/opus/silk/arm/NSQ_del_dec_arm.h @@ -34,7 +34,7 @@ POSSIBILITY OF SUCH DAMAGE. void silk_NSQ_del_dec_neon( const silk_encoder_state *psEncC, silk_nsq_state *NSQ, 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 AR_Q13[MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER], 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])( const silk_encoder_state *psEncC, silk_nsq_state *NSQ, 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 AR_Q13[MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER], const opus_int HarmShapeGain_Q14[MAX_NB_SUBFR], diff --git a/src/libs/opus/silk/arm/NSQ_del_dec_neon_intr.c b/src/libs/opus/silk/arm/NSQ_del_dec_neon_intr.c index 212410f3..668dde6d 100644 --- a/src/libs/opus/silk/arm/NSQ_del_dec_neon_intr.c +++ b/src/libs/opus/silk/arm/NSQ_del_dec_neon_intr.c @@ -35,6 +35,7 @@ POSSIBILITY OF SUCH DAMAGE. #endif #include "main.h" #include "stack_alloc.h" +#include "os_support.h" /* 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. */ @@ -220,7 +221,7 @@ void silk_NSQ_del_dec_neon( SideInfoIndices *psIndices, /* I/O Quantization Indices */ const opus_int16 x16[], /* I Input */ 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 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 */ @@ -279,6 +280,7 @@ void silk_NSQ_del_dec_neon( /* Initialize delayed decision states */ ALLOC( psDelDec, 1, NSQ_del_decs_struct ); + OPUS_CLEAR(psDelDec, 1); /* Only RandState and RD_Q10 need to be initialized to 0. */ silk_memset( psDelDec->RandState, 0, sizeof( psDelDec->RandState ) ); 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( ( shapingLPCOrder & 1 ) == 0 ); /* check that order is even */ 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 ]; 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 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 ) ); + 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. */ silk_assert( Lambda_Q10 <= 32767 ); 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( lessThanMinusRdo, vadd_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 = vshr_n_s16( q1_Q0_s16x4, 10 ); } { 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 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 ); - tmp1_s16x4 = vadd_s16( q1_Q10_s16x4, 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 ) ); + 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 ) ); + 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( 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 ); @@ -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 */ { 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->Shape_Q14[ *smpl_buf_idx ], vld1q_s32( psSampleState[ 0 ].sLTP_shp_Q14 ) ); 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->RandState[ *smpl_buf_idx ], tmp1_s32x4 ); vst1q_s32( psDelDec->RD_Q10, vld1q_s32( psSampleState[ 0 ].RD_Q10 ) ); diff --git a/src/libs/opus/silk/arm/NSQ_neon.h b/src/libs/opus/silk/arm/NSQ_neon.h index b31d9442..f03d8ddd 100644 --- a/src/libs/opus/silk/arm/NSQ_neon.h +++ b/src/libs/opus/silk/arm/NSQ_neon.h @@ -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) #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 @@ -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 */ #undef silk_noise_shape_quantizer_short_prediction #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_c(in, coef, order)) diff --git a/src/libs/opus/silk/arm/arm_silk_map.c b/src/libs/opus/silk/arm/arm_silk_map.c index 0b9bfec2..a91f79b5 100644 --- a/src/libs/opus/silk/arm/arm_silk_map.c +++ b/src/libs/opus/silk/arm/arm_silk_map.c @@ -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, /* Media */ 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 */ @@ -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, /* Media */ silk_LPC_inverse_pred_gain_neon, /* Neon */ + silk_LPC_inverse_pred_gain_neon, /* dotprod */ }; 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 */ const opus_int16 x16[], /* I Input */ 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 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 */ @@ -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, /* Media */ 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 @@ -97,6 +100,7 @@ opus_int32 silk_NSQ_noise_shape_feedback_loop_c, /* EDSP */ silk_NSQ_noise_shape_feedback_loop_c, /* Media */ silk_NSQ_noise_shape_feedback_loop_neon, /* NEON */ + silk_NSQ_noise_shape_feedback_loop_neon, /* dotprod */ }; # 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, /* Media */ silk_warped_autocorrelation_FIX_neon, /* Neon */ + silk_warped_autocorrelation_FIX_neon, /* dotprod */ }; # endif diff --git a/src/libs/opus/silk/control.h b/src/libs/opus/silk/control.h index b76ec33c..f5633e62 100644 --- a/src/libs/opus/silk/control.h +++ b/src/libs/opus/silk/control.h @@ -77,6 +77,9 @@ typedef struct { /* I: Flag to enable in-band Forward Error Correction (FEC); 0/1 */ 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 */ 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 */ 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; #ifdef __cplusplus diff --git a/src/libs/opus/silk/dec_API.c b/src/libs/opus/silk/dec_API.c index 7d5ca7fb..c1091d13 100644 --- a/src/libs/opus/silk/dec_API.c +++ b/src/libs/opus/silk/dec_API.c @@ -33,6 +33,11 @@ POSSIBILITY OF SUCH DAMAGE. #include "stack_alloc.h" #include "os_support.h" +#ifdef ENABLE_OSCE +#include "osce.h" +#include "osce_structs.h" +#endif + /************************/ /* Decoder Super Struct */ /************************/ @@ -42,12 +47,33 @@ typedef struct { opus_int nChannelsAPI; opus_int nChannelsInternal; opus_int prev_decode_only_middle; +#ifdef ENABLE_OSCE + OSCEModel osce_model; +#endif } silk_decoder; /*********************/ /* 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 *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 */ +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 */ void *decState /* I/O State */ ) { opus_int n, ret = SILK_NO_ERROR; 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++ ) { 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 */ opus_int16 *samplesOut, /* O Decoded output speech vector */ opus_int32 *nSamplesOut, /* O Number of samples decoded */ +#ifdef ENABLE_DEEP_PLC + LPCNetPLCState *lpcnet, +#endif 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 || (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 */ for( n = 0; n < decControl->nChannelsInternal; n++ ) { if( n == 0 || has_side ) { @@ -297,7 +352,19 @@ opus_int silk_Decode( /* O Returns error co } else { 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 { silk_memset( &samplesOut1_tmp[ n ][ 2 ], 0, nSamplesOutDec * sizeof( opus_int16 ) ); } diff --git a/src/libs/opus/silk/decode_frame.c b/src/libs/opus/silk/decode_frame.c index 4f36f854..9bc4ca2b 100644 --- a/src/libs/opus/silk/decode_frame.c +++ b/src/libs/opus/silk/decode_frame.c @@ -33,6 +33,10 @@ POSSIBILITY OF SUCH DAMAGE. #include "stack_alloc.h" #include "PLC.h" +#ifdef ENABLE_OSCE +#include "osce.h" +#endif + /****************/ /* Decode frame */ /****************/ @@ -43,6 +47,12 @@ opus_int silk_decode_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 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 */ ) { @@ -61,6 +71,10 @@ opus_int silk_decode_frame( ( lostFlag == FLAG_DECODE_LBRR && psDec->LBRR_flags[ psDec->nFramesDecoded ] == 1 ) ) { 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) & ~(SHELL_CODEC_FRAME_LENGTH - 1), opus_int16 ); /*********************************************/ @@ -84,10 +98,29 @@ opus_int silk_decode_frame( /********************************************************/ 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 */ /********************************************************/ - silk_PLC( psDec, psDecCtrl, pOut, 0, arch ); + silk_PLC( psDec, psDecCtrl, pOut, 0, +#ifdef ENABLE_DEEP_PLC + lpcnet, +#endif + arch ); psDec->lossCnt = 0; psDec->prevSignalType = psDec->indices.signalType; @@ -97,16 +130,23 @@ opus_int silk_decode_frame( psDec->first_frame_after_reset = 0; } else { /* 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 ); - /*************************/ - /* 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 + osce_reset( &psDec->osce, psDec->osce.method ); +#endif + /*************************/ + /* 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 ) ); + } /************************************************/ /* Comfort noise generation / estimation */ diff --git a/src/libs/opus/silk/enc_API.c b/src/libs/opus/silk/enc_API.c index 548e0736..369caddd 100644 --- a/src/libs/opus/silk/enc_API.c +++ b/src/libs/opus/silk/enc_API.c @@ -41,6 +41,10 @@ POSSIBILITY OF SUCH DAMAGE. #include "main_FLP.h" #endif +#ifdef ENABLE_DRED +#include "dred_encoder.h" +#endif + /***************************************/ /* Read control structure from encoder */ /***************************************/ diff --git a/src/libs/opus/silk/fixed/encode_frame_FIX.c b/src/libs/opus/silk/fixed/encode_frame_FIX.c index a02bf87d..7c83360b 100644 --- a/src/libs/opus/silk/fixed/encode_frame_FIX.c +++ b/src/libs/opus/silk/fixed/encode_frame_FIX.c @@ -105,8 +105,11 @@ opus_int silk_encode_frame_FIX( opus_int gain_lock[ MAX_NB_SUBFR ] = {0}; opus_int16 best_gain_mult[ MAX_NB_SUBFR ]; opus_int best_sum[ MAX_NB_SUBFR ]; + opus_int bits_margin; SAVE_STACK; + /* For CBR, 5 bits below budget is close enough. For VBR, allow up to 25% below the cap if we initially busted the budget. */ + bits_margin = useCBR ? 5 : maxBits/4; /* This is totally unnecessary but many compilers (including gcc) are too dumb to realise it */ LastGainIndex_copy2 = nBits_lower = nBits_upper = gainMult_lower = gainMult_upper = 0; @@ -282,7 +285,7 @@ opus_int silk_encode_frame_FIX( gainMult_upper = gainMult_Q8; gainsID_upper = gainsID; } - } else if( nBits < maxBits - 5 ) { + } else if( nBits < maxBits - bits_margin ) { found_lower = 1; nBits_lower = nBits; gainMult_lower = gainMult_Q8; @@ -296,7 +299,7 @@ opus_int silk_encode_frame_FIX( LastGainIndex_copy2 = psEnc->sShape.LastGainIndex; } } else { - /* Within 5 bits of budget: close enough */ + /* Close enough */ break; } @@ -318,17 +321,10 @@ opus_int silk_encode_frame_FIX( if( ( found_lower & found_upper ) == 0 ) { /* Adjust gain according to high-rate rate/distortion curve */ if( nBits > maxBits ) { - if (gainMult_Q8 < 16384) { - gainMult_Q8 *= 2; - } else { - gainMult_Q8 = 32767; - } + gainMult_Q8 = silk_min_32( 1024, gainMult_Q8*3/2 ); } else { - opus_int32 gain_factor_Q16; - gain_factor_Q16 = silk_log2lin( silk_LSHIFT( nBits - maxBits, 7 ) / psEnc->sCmn.frame_length + SILK_FIX_CONST( 16, 7 ) ); - gainMult_Q8 = silk_SMULWB( gain_factor_Q16, gainMult_Q8 ); + gainMult_Q8 = silk_max_32( 64, gainMult_Q8*4/5 ); } - } else { /* Adjust gain by interpolating */ gainMult_Q8 = gainMult_lower + silk_DIV32_16( silk_MUL( gainMult_upper - gainMult_lower, maxBits - nBits_lower ), nBits_upper - nBits_lower ); diff --git a/src/libs/opus/silk/float/SigProc_FLP.h b/src/libs/opus/silk/float/SigProc_FLP.h index 953de8b0..ff9281b8 100644 --- a/src/libs/opus/silk/float/SigProc_FLP.h +++ b/src/libs/opus/silk/float/SigProc_FLP.h @@ -30,6 +30,7 @@ POSSIBILITY OF SUCH DAMAGE. #include "SigProc_FIX.h" #include "float_cast.h" +#include "main.h" #include #ifdef __cplusplus @@ -73,7 +74,8 @@ void silk_autocorrelation_FLP( silk_float *results, /* O result (length correlationCount) */ const silk_float *inputData, /* I input data to correlate */ opus_int inputDataSize, /* I length of input */ - opus_int correlationCount /* I number of correlation taps to compute */ + opus_int correlationCount, /* I number of correlation taps to compute */ + int arch ); opus_int silk_pitch_analysis_core_FLP( /* O Voicing estimate: 0 voiced, 1 unvoiced */ @@ -105,7 +107,8 @@ silk_float silk_burg_modified_FLP( /* O returns residual energy const silk_float minInvGain, /* I minimum inverse prediction gain */ const opus_int subfr_length, /* I input signal subframe length (incl. D preceding samples) */ const opus_int nb_subfr, /* I number of subframes stacked in x */ - const opus_int D /* I order */ + const opus_int D, /* I order */ + int arch ); /* multiply a vector by a constant */ @@ -124,12 +127,17 @@ void silk_scale_copy_vector_FLP( ); /* inner product of two silk_float arrays, with result as double */ -double silk_inner_product_FLP( +double silk_inner_product_FLP_c( const silk_float *data1, const silk_float *data2, opus_int dataSize ); +#ifndef OVERRIDE_inner_product_FLP +#define silk_inner_product_FLP(data1, data2, dataSize, arch) ((void)arch,silk_inner_product_FLP_c(data1, data2, dataSize)) +#endif + + /* sum of squares of a silk_float array, with result as double */ double silk_energy_FLP( const silk_float *data, diff --git a/src/libs/opus/silk/float/autocorrelation_FLP.c b/src/libs/opus/silk/float/autocorrelation_FLP.c index 8b8a9e65..4253b26e 100644 --- a/src/libs/opus/silk/float/autocorrelation_FLP.c +++ b/src/libs/opus/silk/float/autocorrelation_FLP.c @@ -37,7 +37,8 @@ void silk_autocorrelation_FLP( silk_float *results, /* O result (length correlationCount) */ const silk_float *inputData, /* I input data to correlate */ opus_int inputDataSize, /* I length of input */ - opus_int correlationCount /* I number of correlation taps to compute */ + opus_int correlationCount, /* I number of correlation taps to compute */ + int arch ) { opus_int i; @@ -47,6 +48,6 @@ void silk_autocorrelation_FLP( } for( i = 0; i < correlationCount; i++ ) { - results[ i ] = (silk_float)silk_inner_product_FLP( inputData, inputData + i, inputDataSize - i ); + results[ i ] = (silk_float)silk_inner_product_FLP( inputData, inputData + i, inputDataSize - i, arch ); } } diff --git a/src/libs/opus/silk/float/burg_modified_FLP.c b/src/libs/opus/silk/float/burg_modified_FLP.c index 756b76a3..f5bef5dd 100644 --- a/src/libs/opus/silk/float/burg_modified_FLP.c +++ b/src/libs/opus/silk/float/burg_modified_FLP.c @@ -42,7 +42,8 @@ silk_float silk_burg_modified_FLP( /* O returns residual energy const silk_float minInvGain, /* I minimum inverse prediction gain */ const opus_int subfr_length, /* I input signal subframe length (incl. D preceding samples) */ const opus_int nb_subfr, /* I number of subframes stacked in x */ - const opus_int D /* I order */ + const opus_int D, /* I order */ + int arch ) { opus_int k, n, s, reached_max_gain; @@ -60,7 +61,7 @@ silk_float silk_burg_modified_FLP( /* O returns residual energy for( s = 0; s < nb_subfr; s++ ) { x_ptr = x + s * subfr_length; for( n = 1; n < D + 1; n++ ) { - C_first_row[ n - 1 ] += silk_inner_product_FLP( x_ptr, x_ptr + n, subfr_length - n ); + C_first_row[ n - 1 ] += silk_inner_product_FLP( x_ptr, x_ptr + n, subfr_length - n, arch ); } } silk_memcpy( C_last_row, C_first_row, SILK_MAX_ORDER_LPC * sizeof( double ) ); diff --git a/src/libs/opus/silk/float/corrMatrix_FLP.c b/src/libs/opus/silk/float/corrMatrix_FLP.c index eae6a1cf..eef6e8aa 100644 --- a/src/libs/opus/silk/float/corrMatrix_FLP.c +++ b/src/libs/opus/silk/float/corrMatrix_FLP.c @@ -41,7 +41,8 @@ void silk_corrVector_FLP( const silk_float *t, /* I Target vector [L] */ const opus_int L, /* I Length of vecors */ const opus_int Order, /* I Max lag for correlation */ - silk_float *Xt /* O X'*t correlation vector [order] */ + silk_float *Xt, /* O X'*t correlation vector [order] */ + int arch ) { opus_int lag; @@ -50,7 +51,7 @@ void silk_corrVector_FLP( ptr1 = &x[ Order - 1 ]; /* Points to first sample of column 0 of X: X[:,0] */ for( lag = 0; lag < Order; lag++ ) { /* Calculate X[:,lag]'*t */ - Xt[ lag ] = (silk_float)silk_inner_product_FLP( ptr1, t, L ); + Xt[ lag ] = (silk_float)silk_inner_product_FLP( ptr1, t, L, arch ); ptr1--; /* Next column of X */ } } @@ -60,7 +61,8 @@ void silk_corrMatrix_FLP( const silk_float *x, /* I x vector [ L+order-1 ] used to create X */ const opus_int L, /* I Length of vectors */ const opus_int Order, /* I Max lag for correlation */ - silk_float *XX /* O X'*X correlation matrix [order x order] */ + silk_float *XX, /* O X'*X correlation matrix [order x order] */ + int arch ) { opus_int j, lag; @@ -79,7 +81,7 @@ void silk_corrMatrix_FLP( ptr2 = &x[ Order - 2 ]; /* First sample of column 1 of X */ for( lag = 1; lag < Order; lag++ ) { /* Calculate X[:,0]'*X[:,lag] */ - energy = silk_inner_product_FLP( ptr1, ptr2, L ); + energy = silk_inner_product_FLP( ptr1, ptr2, L, arch ); matrix_ptr( XX, lag, 0, Order ) = ( silk_float )energy; matrix_ptr( XX, 0, lag, Order ) = ( silk_float )energy; /* Calculate X[:,j]'*X[:,j + lag] */ diff --git a/src/libs/opus/silk/float/encode_frame_FLP.c b/src/libs/opus/silk/float/encode_frame_FLP.c index b029c3f5..8a327c56 100644 --- a/src/libs/opus/silk/float/encode_frame_FLP.c +++ b/src/libs/opus/silk/float/encode_frame_FLP.c @@ -107,7 +107,10 @@ opus_int silk_encode_frame_FLP( opus_int gain_lock[ MAX_NB_SUBFR ] = {0}; opus_int16 best_gain_mult[ MAX_NB_SUBFR ]; opus_int best_sum[ MAX_NB_SUBFR ]; + opus_int bits_margin; + /* For CBR, 5 bits below budget is close enough. For VBR, allow up to 25% below the cap if we initially busted the budget. */ + bits_margin = useCBR ? 5 : maxBits/4; /* This is totally unnecessary but many compilers (including gcc) are too dumb to realise it */ LastGainIndex_copy2 = nBits_lower = nBits_upper = gainMult_lower = gainMult_upper = 0; @@ -270,7 +273,7 @@ opus_int silk_encode_frame_FLP( gainMult_upper = gainMult_Q8; gainsID_upper = gainsID; } - } else if( nBits < maxBits - 5 ) { + } else if( nBits < maxBits - bits_margin ) { found_lower = 1; nBits_lower = nBits; gainMult_lower = gainMult_Q8; @@ -284,7 +287,7 @@ opus_int silk_encode_frame_FLP( LastGainIndex_copy2 = psEnc->sShape.LastGainIndex; } } else { - /* Within 5 bits of budget: close enough */ + /* Close enough */ break; } @@ -306,15 +309,9 @@ opus_int silk_encode_frame_FLP( if( ( found_lower & found_upper ) == 0 ) { /* Adjust gain according to high-rate rate/distortion curve */ if( nBits > maxBits ) { - if (gainMult_Q8 < 16384) { - gainMult_Q8 *= 2; - } else { - gainMult_Q8 = 32767; - } + gainMult_Q8 = silk_min_32( 1024, gainMult_Q8*3/2 ); } else { - opus_int32 gain_factor_Q16; - gain_factor_Q16 = silk_log2lin( silk_LSHIFT( nBits - maxBits, 7 ) / psEnc->sCmn.frame_length + SILK_FIX_CONST( 16, 7 ) ); - gainMult_Q8 = silk_SMULWB( gain_factor_Q16, gainMult_Q8 ); + gainMult_Q8 = silk_max_32( 64, gainMult_Q8*4/5 ); } } else { /* Adjust gain by interpolating */ diff --git a/src/libs/opus/silk/float/find_LPC_FLP.c b/src/libs/opus/silk/float/find_LPC_FLP.c index fa3ffe7f..6ccd711d 100644 --- a/src/libs/opus/silk/float/find_LPC_FLP.c +++ b/src/libs/opus/silk/float/find_LPC_FLP.c @@ -38,7 +38,8 @@ void silk_find_LPC_FLP( silk_encoder_state *psEncC, /* I/O Encoder state */ opus_int16 NLSF_Q15[], /* O NLSFs */ const silk_float x[], /* I Input signal */ - const silk_float minInvGain /* I Inverse of max prediction gain */ + const silk_float minInvGain, /* I Inverse of max prediction gain */ + int arch ) { opus_int k, subfr_length; @@ -56,12 +57,12 @@ void silk_find_LPC_FLP( psEncC->indices.NLSFInterpCoef_Q2 = 4; /* Burg AR analysis for the full frame */ - res_nrg = silk_burg_modified_FLP( a, x, minInvGain, subfr_length, psEncC->nb_subfr, psEncC->predictLPCOrder ); + res_nrg = silk_burg_modified_FLP( a, x, minInvGain, subfr_length, psEncC->nb_subfr, psEncC->predictLPCOrder, arch ); if( psEncC->useInterpolatedNLSFs && !psEncC->first_frame_after_reset && psEncC->nb_subfr == MAX_NB_SUBFR ) { /* Optimal solution for last 10 ms; subtract residual energy here, as that's easier than */ /* adding it to the residual energy of the first 10 ms in each iteration of the search below */ - res_nrg -= silk_burg_modified_FLP( a_tmp, x + ( MAX_NB_SUBFR / 2 ) * subfr_length, minInvGain, subfr_length, MAX_NB_SUBFR / 2, psEncC->predictLPCOrder ); + res_nrg -= silk_burg_modified_FLP( a_tmp, x + ( MAX_NB_SUBFR / 2 ) * subfr_length, minInvGain, subfr_length, MAX_NB_SUBFR / 2, psEncC->predictLPCOrder, arch ); /* Convert to NLSFs */ silk_A2NLSF_FLP( NLSF_Q15, a_tmp, psEncC->predictLPCOrder ); diff --git a/src/libs/opus/silk/float/find_LTP_FLP.c b/src/libs/opus/silk/float/find_LTP_FLP.c index f9706493..90aeeac0 100644 --- a/src/libs/opus/silk/float/find_LTP_FLP.c +++ b/src/libs/opus/silk/float/find_LTP_FLP.c @@ -38,7 +38,8 @@ void silk_find_LTP_FLP( const silk_float r_ptr[], /* I LPC residual */ const opus_int lag[ MAX_NB_SUBFR ], /* I LTP lags */ const opus_int subfr_length, /* I Subframe length */ - const opus_int nb_subfr /* I number of subframes */ + const opus_int nb_subfr, /* I number of subframes */ + int arch ) { opus_int k; @@ -50,8 +51,8 @@ void silk_find_LTP_FLP( XX_ptr = XX; for( k = 0; k < nb_subfr; k++ ) { lag_ptr = r_ptr - ( lag[ k ] + LTP_ORDER / 2 ); - silk_corrMatrix_FLP( lag_ptr, subfr_length, LTP_ORDER, XX_ptr ); - silk_corrVector_FLP( lag_ptr, r_ptr, subfr_length, LTP_ORDER, xX_ptr ); + silk_corrMatrix_FLP( lag_ptr, subfr_length, LTP_ORDER, XX_ptr, arch ); + silk_corrVector_FLP( lag_ptr, r_ptr, subfr_length, LTP_ORDER, xX_ptr, arch ); xx = ( silk_float )silk_energy_FLP( r_ptr, subfr_length + LTP_ORDER ); temp = 1.0f / silk_max( xx, LTP_CORR_INV_MAX * 0.5f * ( XX_ptr[ 0 ] + XX_ptr[ 24 ] ) + 1.0f ); silk_scale_vector_FLP( XX_ptr, temp, LTP_ORDER * LTP_ORDER ); diff --git a/src/libs/opus/silk/float/find_pitch_lags_FLP.c b/src/libs/opus/silk/float/find_pitch_lags_FLP.c index dedbcd28..1f6bd599 100644 --- a/src/libs/opus/silk/float/find_pitch_lags_FLP.c +++ b/src/libs/opus/silk/float/find_pitch_lags_FLP.c @@ -82,7 +82,7 @@ void silk_find_pitch_lags_FLP( silk_apply_sine_window_FLP( Wsig_ptr, x_buf_ptr, 2, psEnc->sCmn.la_pitch ); /* Calculate autocorrelation sequence */ - silk_autocorrelation_FLP( auto_corr, Wsig, psEnc->sCmn.pitch_LPC_win_length, psEnc->sCmn.pitchEstimationLPCOrder + 1 ); + silk_autocorrelation_FLP( auto_corr, Wsig, psEnc->sCmn.pitch_LPC_win_length, psEnc->sCmn.pitchEstimationLPCOrder + 1, arch ); /* Add white noise, as a fraction of the energy */ auto_corr[ 0 ] += auto_corr[ 0 ] * FIND_PITCH_WHITE_NOISE_FRACTION + 1; diff --git a/src/libs/opus/silk/float/find_pred_coefs_FLP.c b/src/libs/opus/silk/float/find_pred_coefs_FLP.c index 6f790788..f3c54cf4 100644 --- a/src/libs/opus/silk/float/find_pred_coefs_FLP.c +++ b/src/libs/opus/silk/float/find_pred_coefs_FLP.c @@ -63,7 +63,7 @@ void silk_find_pred_coefs_FLP( celt_assert( psEnc->sCmn.ltp_mem_length - psEnc->sCmn.predictLPCOrder >= psEncCtrl->pitchL[ 0 ] + LTP_ORDER / 2 ); /* LTP analysis */ - silk_find_LTP_FLP( XXLTP, xXLTP, res_pitch, psEncCtrl->pitchL, psEnc->sCmn.subfr_length, psEnc->sCmn.nb_subfr ); + silk_find_LTP_FLP( XXLTP, xXLTP, res_pitch, psEncCtrl->pitchL, psEnc->sCmn.subfr_length, psEnc->sCmn.nb_subfr, psEnc->sCmn.arch ); /* Quantize LTP gain parameters */ silk_quant_LTP_gains_FLP( psEncCtrl->LTPCoef, psEnc->sCmn.indices.LTPIndex, &psEnc->sCmn.indices.PERIndex, @@ -102,7 +102,7 @@ void silk_find_pred_coefs_FLP( } /* LPC_in_pre contains the LTP-filtered input for voiced, and the unfiltered input for unvoiced */ - silk_find_LPC_FLP( &psEnc->sCmn, NLSF_Q15, LPC_in_pre, minInvGain ); + silk_find_LPC_FLP( &psEnc->sCmn, NLSF_Q15, LPC_in_pre, minInvGain, psEnc->sCmn.arch ); /* Quantize LSFs */ silk_process_NLSFs_FLP( &psEnc->sCmn, psEncCtrl->PredCoef, NLSF_Q15, psEnc->sCmn.prev_NLSFq_Q15 ); diff --git a/src/libs/opus/silk/float/inner_product_FLP.c b/src/libs/opus/silk/float/inner_product_FLP.c index cdd39d24..88b160ab 100644 --- a/src/libs/opus/silk/float/inner_product_FLP.c +++ b/src/libs/opus/silk/float/inner_product_FLP.c @@ -32,7 +32,7 @@ POSSIBILITY OF SUCH DAMAGE. #include "SigProc_FLP.h" /* inner product of two silk_float arrays, with result as double */ -double silk_inner_product_FLP( +double silk_inner_product_FLP_c( const silk_float *data1, const silk_float *data2, opus_int dataSize diff --git a/src/libs/opus/silk/float/main_FLP.h b/src/libs/opus/silk/float/main_FLP.h index 5dc0ccf4..2e4435cc 100644 --- a/src/libs/opus/silk/float/main_FLP.h +++ b/src/libs/opus/silk/float/main_FLP.h @@ -138,7 +138,8 @@ void silk_find_LPC_FLP( silk_encoder_state *psEncC, /* I/O Encoder state */ opus_int16 NLSF_Q15[], /* O NLSFs */ const silk_float x[], /* I Input signal */ - const silk_float minInvGain /* I Prediction gain from LTP (dB) */ + const silk_float minInvGain, /* I Prediction gain from LTP (dB) */ + int arch ); /* LTP analysis */ @@ -148,7 +149,8 @@ void silk_find_LTP_FLP( const silk_float r_ptr[], /* I LPC residual */ const opus_int lag[ MAX_NB_SUBFR ], /* I LTP lags */ const opus_int subfr_length, /* I Subframe length */ - const opus_int nb_subfr /* I number of subframes */ + const opus_int nb_subfr, /* I number of subframes */ + int arch ); void silk_LTP_analysis_filter_FLP( @@ -221,7 +223,8 @@ void silk_corrMatrix_FLP( const silk_float *x, /* I x vector [ L+order-1 ] used to create X */ const opus_int L, /* I Length of vectors */ const opus_int Order, /* I Max lag for correlation */ - silk_float *XX /* O X'*X correlation matrix [order x order] */ + silk_float *XX, /* O X'*X correlation matrix [order x order] */ + int arch ); /* Calculates correlation vector X'*t */ @@ -230,7 +233,8 @@ void silk_corrVector_FLP( const silk_float *t, /* I Target vector [L] */ const opus_int L, /* I Length of vecors */ const opus_int Order, /* I Max lag for correlation */ - silk_float *Xt /* O X'*t correlation vector [order] */ + silk_float *Xt, /* O X'*t correlation vector [order] */ + int arch ); /* Apply sine window to signal vector. */ diff --git a/src/libs/opus/silk/float/noise_shape_analysis_FLP.c b/src/libs/opus/silk/float/noise_shape_analysis_FLP.c index cb3d8a50..0b5ea952 100644 --- a/src/libs/opus/silk/float/noise_shape_analysis_FLP.c +++ b/src/libs/opus/silk/float/noise_shape_analysis_FLP.c @@ -255,7 +255,7 @@ void silk_noise_shape_analysis_FLP( psEnc->sCmn.shapeWinLength, psEnc->sCmn.shapingLPCOrder ); } else { /* Calculate regular auto correlation */ - silk_autocorrelation_FLP( auto_corr, x_windowed, psEnc->sCmn.shapeWinLength, psEnc->sCmn.shapingLPCOrder + 1 ); + silk_autocorrelation_FLP( auto_corr, x_windowed, psEnc->sCmn.shapeWinLength, psEnc->sCmn.shapingLPCOrder + 1, psEnc->sCmn.arch ); } /* Add white noise, as a fraction of energy */ diff --git a/src/libs/opus/silk/float/pitch_analysis_core_FLP.c b/src/libs/opus/silk/float/pitch_analysis_core_FLP.c index f351bc37..0530a883 100644 --- a/src/libs/opus/silk/float/pitch_analysis_core_FLP.c +++ b/src/libs/opus/silk/float/pitch_analysis_core_FLP.c @@ -291,7 +291,7 @@ opus_int silk_pitch_analysis_core_FLP( /* O Voicing estimate: 0 voiced, for( j = 0; j < length_d_comp; j++ ) { d = d_comp[ j ]; basis_ptr = target_ptr - d; - cross_corr = silk_inner_product_FLP( basis_ptr, target_ptr, sf_length_8kHz ); + cross_corr = silk_inner_product_FLP( basis_ptr, target_ptr, sf_length_8kHz, arch ); if( cross_corr > 0.0f ) { energy = silk_energy_FLP( basis_ptr, sf_length_8kHz ); C[ k ][ d ] = (silk_float)( 2 * cross_corr / ( energy + energy_tmp ) ); diff --git a/src/libs/opus/silk/float/warped_autocorrelation_FLP.c b/src/libs/opus/silk/float/warped_autocorrelation_FLP.c index 09186e73..116dab92 100644 --- a/src/libs/opus/silk/float/warped_autocorrelation_FLP.c +++ b/src/libs/opus/silk/float/warped_autocorrelation_FLP.c @@ -54,11 +54,13 @@ void silk_warped_autocorrelation_FLP( /* Loop over allpass sections */ for( i = 0; i < order; i += 2 ) { /* Output of allpass section */ - tmp2 = state[ i ] + warping * ( state[ i + 1 ] - tmp1 ); + /* We voluntarily use two multiples instead of factoring the expression to + reduce the length of the dependency chain (tmp1->tmp2->tmp1... ). */ + tmp2 = state[ i ] + warping * state[ i + 1 ] - warping * tmp1; state[ i ] = tmp1; C[ i ] += state[ 0 ] * tmp1; /* Output of allpass section */ - tmp1 = state[ i + 1 ] + warping * ( state[ i + 2 ] - tmp2 ); + tmp1 = state[ i + 1 ] + warping * state[ i + 2 ] - warping * tmp2; state[ i + 1 ] = tmp2; C[ i + 1 ] += state[ 0 ] * tmp2; } diff --git a/src/libs/opus/silk/init_decoder.c b/src/libs/opus/silk/init_decoder.c index 16c03dcd..01bc4b7a 100644 --- a/src/libs/opus/silk/init_decoder.c +++ b/src/libs/opus/silk/init_decoder.c @@ -31,15 +31,21 @@ POSSIBILITY OF SUCH DAMAGE. #include "main.h" +#ifdef ENABLE_OSCE +#include "osce.h" +#endif + +#include "structs.h" + /************************/ -/* Init Decoder State */ +/* Reset Decoder State */ /************************/ -opus_int silk_init_decoder( +opus_int silk_reset_decoder( silk_decoder_state *psDec /* I/O Decoder state pointer */ ) { /* Clear the entire encoder state, except anything copied */ - silk_memset( psDec, 0, sizeof( silk_decoder_state ) ); + silk_memset( &psDec->SILK_DECODER_STATE_RESET_START, 0, sizeof( silk_decoder_state ) - ((char*) &psDec->SILK_DECODER_STATE_RESET_START - (char*)psDec) ); /* Used to deactivate LSF interpolation */ psDec->first_frame_after_reset = 1; @@ -52,6 +58,27 @@ opus_int silk_init_decoder( /* Reset PLC state */ silk_PLC_Reset( psDec ); +#ifdef ENABLE_OSCE + /* Reset OSCE state and method */ + osce_reset(&psDec->osce, OSCE_DEFAULT_METHOD); +#endif + + return 0; +} + + +/************************/ +/* Init Decoder State */ +/************************/ +opus_int silk_init_decoder( + silk_decoder_state *psDec /* I/O Decoder state pointer */ +) +{ + /* Clear the entire encoder state, except anything copied */ + silk_memset( psDec, 0, sizeof( silk_decoder_state ) ); + + silk_reset_decoder( psDec ); + return(0); } diff --git a/src/libs/opus/silk/init_encoder.c b/src/libs/opus/silk/init_encoder.c index 65995c33..10d41287 100644 --- a/src/libs/opus/silk/init_encoder.c +++ b/src/libs/opus/silk/init_encoder.c @@ -36,6 +36,10 @@ POSSIBILITY OF SUCH DAMAGE. #include "tuning_parameters.h" #include "cpu_support.h" +#ifdef ENABLE_DRED +#include "dred_encoder.h" +#endif + /*********************************/ /* Initialize Silk Encoder state */ /*********************************/ diff --git a/src/libs/opus/silk/main.h b/src/libs/opus/silk/main.h index a5f56875..cd576d8c 100644 --- a/src/libs/opus/silk/main.h +++ b/src/libs/opus/silk/main.h @@ -252,7 +252,7 @@ void silk_NSQ_c( SideInfoIndices *psIndices, /* I/O Quantization Indices */ const opus_int16 x16[], /* I Input */ 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 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 */ @@ -278,7 +278,7 @@ void silk_NSQ_del_dec_c( SideInfoIndices *psIndices, /* I/O Quantization Indices */ const opus_int16 x16[], /* I Input */ 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 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 */ @@ -389,6 +389,10 @@ void silk_NLSF_decode( /****************************************************/ /* Decoder Functions */ /****************************************************/ +opus_int silk_reset_decoder( + silk_decoder_state *psDec /* I/O Decoder state pointer */ +); + opus_int silk_init_decoder( silk_decoder_state *psDec /* I/O Decoder state pointer */ ); @@ -410,6 +414,12 @@ opus_int silk_decode_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 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 */ ); diff --git a/src/libs/opus/silk/meson.build b/src/libs/opus/silk/meson.build index 917048b2..35d95578 100644 --- a/src/libs/opus/silk/meson.build +++ b/src/libs/opus/silk/meson.build @@ -2,6 +2,8 @@ silk_sources = sources['SILK_SOURCES'] silk_sources_sse4_1 = sources['SILK_SOURCES_SSE4_1'] +silk_sources_avx2 = sources['SILK_SOURCES_AVX2'] + silk_sources_neon_intr = sources['SILK_SOURCES_ARM_NEON_INTR'] silk_sources_fixed_neon_intr = sources['SILK_SOURCES_FIXED_ARM_NEON_INTR'] @@ -10,6 +12,10 @@ silk_sources_fixed = sources['SILK_SOURCES_FIXED'] silk_sources_fixed_sse4_1 = sources['SILK_SOURCES_FIXED_SSE4_1'] +silk_sources_float_sse4_1 = [] +silk_sources_float_neon_intr = [] +silk_sources_float_avx2 = sources['SILK_SOURCES_FLOAT_AVX2'] + silk_sources_float = sources['SILK_SOURCES_FLOAT'] if opt_fixed_point @@ -31,15 +37,15 @@ if host_cpu_family in ['arm', 'aarch64'] and have_arm_intrinsics_or_asm endif endif -foreach intr_name : ['sse4_1', 'neon_intr'] +foreach intr_name : ['sse4_1', 'avx2', 'neon_intr'] have_intr = get_variable('have_' + intr_name) if not have_intr continue endif intr_sources = get_variable('silk_sources_' + intr_name) - if opt_fixed_point - intr_sources += get_variable('silk_sources_fixed_' + intr_name) + if not opt_fixed_point + intr_sources += get_variable('silk_sources_float_' + intr_name) endif intr_args = get_variable('opus_@0@_args'.format(intr_name), []) @@ -58,6 +64,6 @@ silk_lib = static_library('opus-silk', silk_sources, c_args: silk_c_args, include_directories: silk_includes, - link_whole: silk_static_libs, + link_whole: [silk_static_libs], dependencies: libm, install: false) diff --git a/src/libs/opus/silk/mips/NSQ_del_dec_mipsr1.h b/src/libs/opus/silk/mips/NSQ_del_dec_mipsr1.h index cd70713a..85bfb637 100644 --- a/src/libs/opus/silk/mips/NSQ_del_dec_mipsr1.h +++ b/src/libs/opus/silk/mips/NSQ_del_dec_mipsr1.h @@ -25,8 +25,8 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#ifndef __NSQ_DEL_DEC_MIPSR1_H__ -#define __NSQ_DEL_DEC_MIPSR1_H__ +#ifndef NSQ_DEL_DEC_MIPSR1_H__ +#define NSQ_DEL_DEC_MIPSR1_H__ #ifdef HAVE_CONFIG_H #include "config.h" @@ -407,4 +407,4 @@ static inline void silk_noise_shape_quantizer_del_dec( } } -#endif /* __NSQ_DEL_DEC_MIPSR1_H__ */ +#endif /* NSQ_DEL_DEC_MIPSR1_H__ */ diff --git a/src/libs/opus/silk/mips/macros_mipsr1.h b/src/libs/opus/silk/mips/macros_mipsr1.h index 12ed981a..af408802 100644 --- a/src/libs/opus/silk/mips/macros_mipsr1.h +++ b/src/libs/opus/silk/mips/macros_mipsr1.h @@ -26,8 +26,8 @@ POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#ifndef __SILK_MACROS_MIPSR1_H__ -#define __SILK_MACROS_MIPSR1_H__ +#ifndef SILK_MACROS_MIPSR1_H__ +#define SILK_MACROS_MIPSR1_H__ #define mips_clz(x) __builtin_clz(x) @@ -89,4 +89,4 @@ static inline opus_int32 silk_CLZ32(opus_int32 in32) return re32; } -#endif /* __SILK_MACROS_MIPSR1_H__ */ +#endif /* SILK_MACROS_MIPSR1_H__ */ diff --git a/src/libs/opus/silk/structs.h b/src/libs/opus/silk/structs.h index 3380c757..38243be1 100644 --- a/src/libs/opus/silk/structs.h +++ b/src/libs/opus/silk/structs.h @@ -34,6 +34,21 @@ POSSIBILITY OF SUCH DAMAGE. #include "entenc.h" #include "entdec.h" +#ifdef ENABLE_DEEP_PLC +#include "lpcnet.h" +#include "lpcnet_private.h" +#endif + +#ifdef ENABLE_DRED +#include "dred_encoder.h" +#include "dred_decoder.h" +#endif + +#ifdef ENABLE_OSCE +#include "osce_config.h" +#include "osce_structs.h" +#endif + #ifdef __cplusplus extern "C" { @@ -228,6 +243,14 @@ typedef struct { } silk_encoder_state; +#ifdef ENABLE_OSCE +typedef struct { + OSCEFeatureState features; + OSCEState state; + int method; +} silk_OSCE_struct; +#endif + /* Struct for Packet Loss Concealment */ typedef struct { opus_int32 pitchL_Q8; /* Pitch lag to use for voiced concealment */ @@ -243,6 +266,7 @@ typedef struct { opus_int fs_kHz; opus_int nb_subfr; opus_int subfr_length; + opus_int enable_deep_plc; } silk_PLC_struct; /* Struct for CNG */ @@ -259,6 +283,10 @@ typedef struct { /* Decoder state */ /********************************/ typedef struct { +#ifdef ENABLE_OSCE + silk_OSCE_struct osce; +#endif +#define SILK_DECODER_STATE_RESET_START prev_gain_Q16 opus_int32 prev_gain_Q16; opus_int32 exc_Q14[ MAX_FRAME_LENGTH ]; opus_int32 sLPC_Q14_buf[ MAX_LPC_ORDER ]; diff --git a/src/libs/opus/silk/tests/test_unit_LPC_inv_pred_gain.c b/src/libs/opus/silk/tests/test_unit_LPC_inv_pred_gain.c index 7ca902ad..acdd31af 100644 --- a/src/libs/opus/silk/tests/test_unit_LPC_inv_pred_gain.c +++ b/src/libs/opus/silk/tests/test_unit_LPC_inv_pred_gain.c @@ -125,5 +125,6 @@ int main(void) { } } printf("silk_LPC_inverse_pred_gain() optimization passed\n"); + RESTORE_STACK; return 0; } diff --git a/src/libs/opus/silk/x86/NSQ_del_dec_avx2.c b/src/libs/opus/silk/x86/NSQ_del_dec_avx2.c index 43485871..21f00c2d 100644 --- a/src/libs/opus/silk/x86/NSQ_del_dec_avx2.c +++ b/src/libs/opus/silk/x86/NSQ_del_dec_avx2.c @@ -73,7 +73,6 @@ static OPUS_INLINE int verify_assumptions(const silk_encoder_state *psEncC) /* Intrinsics not defined on MSVC */ #ifdef _MSC_VER #include -#define __m128i_u __m128i static inline int __builtin_sadd_overflow(opus_int32 a, opus_int32 b, opus_int32* res) { *res = a+b; @@ -959,7 +958,7 @@ static OPUS_INLINE void silk_nsq_del_dec_scale_states_avx2( { __m256i x = _mm256_cvtepi16_epi64(_mm_loadu_si64(&x16[i])); x = _mm256_slli_epi64(_mm256_mul_epi32(x, _mm256_set1_epi32(inv_gain_Q26)), 16); - _mm_storeu_si128((__m128i_u*)&x_sc_Q10[i], silk_cvtepi64_epi32_high(x)); + _mm_storeu_si128((__m128i*)&x_sc_Q10[i], silk_cvtepi64_epi32_high(x)); } /* After rewhitening the LTP state is un-scaled, so scale with inv_gain_Q16 */ @@ -985,8 +984,8 @@ static OPUS_INLINE void silk_nsq_del_dec_scale_states_avx2( /* Scale long-term shaping state */ for (i = NSQ->sLTP_shp_buf_idx - psEncC->ltp_mem_length; i < NSQ->sLTP_shp_buf_idx; i+=4) { - __m128i_u* p = (__m128i_u*)&NSQ->sLTP_shp_Q14[i]; - *p = silk_mm_smulww_epi32(*p, gain_adj_Q16); + opus_int32 *p = &NSQ->sLTP_shp_Q14[i]; + _mm_storeu_si128((__m128i*)p, silk_mm_smulww_epi32(_mm_loadu_si128((__m128i*)p), gain_adj_Q16)); } /* Scale long-term prediction state */ @@ -1041,13 +1040,13 @@ static OPUS_INLINE void silk_LPC_analysis_filter_avx2( /* Allowing wrap around so that two wraps can cancel each other. The rare cases where the result wraps around can only be triggered by invalid streams*/ - __m256i in_v = _mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i_u*)&in_ptr[-8])); - __m256i B_v = _mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i_u*)& B[0])); + __m256i in_v = _mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i*)&in_ptr[-8])); + __m256i B_v = _mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i*)& B[0])); __m256i sum = _mm256_mullo_epi32(in_v, silk_mm256_reverse_epi32(B_v)); if (order > 10) { - in_v = _mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i_u*)&in_ptr[-16])); - B_v = _mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i_u*)&B [8])); + in_v = _mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i*)&in_ptr[-16])); + B_v = _mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i*)&B [8])); B_v = silk_mm256_reverse_epi32(B_v); } else diff --git a/src/libs/opus/silk/x86/NSQ_del_dec_sse4_1.c b/src/libs/opus/silk/x86/NSQ_del_dec_sse4_1.c index a58a76cd..5937682d 100644 --- a/src/libs/opus/silk/x86/NSQ_del_dec_sse4_1.c +++ b/src/libs/opus/silk/x86/NSQ_del_dec_sse4_1.c @@ -119,7 +119,7 @@ void silk_NSQ_del_dec_sse4_1( SideInfoIndices *psIndices, /* I/O Quantization Indices */ const opus_int16 x16[], /* I Input */ 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 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 */ @@ -428,7 +428,7 @@ static OPUS_INLINE void silk_noise_shape_quantizer_del_dec_sse4_1( LTP_pred_Q14 = 2; { __m128i tmpa, tmpb, pred_lag_ptr_tmp; - pred_lag_ptr_tmp = _mm_loadu_si128( (__m128i *)(&pred_lag_ptr[ -3 ] ) ); + pred_lag_ptr_tmp = _mm_loadu_si128( (__m128i *)(void*)(&pred_lag_ptr[ -3 ] ) ); pred_lag_ptr_tmp = _mm_shuffle_epi32( pred_lag_ptr_tmp, 0x1B ); tmpa = _mm_mul_epi32( pred_lag_ptr_tmp, b_Q12_0123 ); tmpa = _mm_srli_si128( tmpa, 2 ); @@ -483,7 +483,7 @@ static OPUS_INLINE void silk_noise_shape_quantizer_del_dec_sse4_1( tmpb = _mm_setzero_si128(); /* step 1 */ - psLPC_Q14_tmp = _mm_loadu_si128( (__m128i *)(&psLPC_Q14[ -3 ] ) ); /* -3, -2 , -1, 0 */ + psLPC_Q14_tmp = _mm_loadu_si128( (__m128i *)(void*)(&psLPC_Q14[ -3 ] ) ); /* -3, -2 , -1, 0 */ psLPC_Q14_tmp = _mm_shuffle_epi32( psLPC_Q14_tmp, 0x1B ); /* 0, -1, -2, -3 */ tmpa = _mm_mul_epi32( psLPC_Q14_tmp, a_Q12_0123 ); /* 0, -1, -2, -3 * 0123 -> 0*0, 2*-2 */ @@ -497,7 +497,7 @@ static OPUS_INLINE void silk_noise_shape_quantizer_del_dec_sse4_1( tmpb = _mm_add_epi32( tmpb, psLPC_Q14_tmp ); /* step 2 */ - psLPC_Q14_tmp = _mm_loadu_si128( (__m128i *)(&psLPC_Q14[ -7 ] ) ); + psLPC_Q14_tmp = _mm_loadu_si128( (__m128i *)(void*)(&psLPC_Q14[ -7 ] ) ); psLPC_Q14_tmp = _mm_shuffle_epi32( psLPC_Q14_tmp, 0x1B ); tmpa = _mm_mul_epi32( psLPC_Q14_tmp, a_Q12_4567 ); tmpa = _mm_srli_epi64( tmpa, 16 ); @@ -512,7 +512,7 @@ static OPUS_INLINE void silk_noise_shape_quantizer_del_dec_sse4_1( if ( opus_likely( predictLPCOrder == 16 ) ) { /* step 3 */ - psLPC_Q14_tmp = _mm_loadu_si128( (__m128i *)(&psLPC_Q14[ -11 ] ) ); + psLPC_Q14_tmp = _mm_loadu_si128( (__m128i *)(void*)(&psLPC_Q14[ -11 ] ) ); psLPC_Q14_tmp = _mm_shuffle_epi32( psLPC_Q14_tmp, 0x1B ); tmpa = _mm_mul_epi32( psLPC_Q14_tmp, a_Q12_89AB ); tmpa = _mm_srli_epi64( tmpa, 16 ); @@ -525,7 +525,7 @@ static OPUS_INLINE void silk_noise_shape_quantizer_del_dec_sse4_1( tmpb = _mm_add_epi32( tmpb, psLPC_Q14_tmp ); /* step 4 */ - psLPC_Q14_tmp = _mm_loadu_si128( (__m128i *)(&psLPC_Q14[ -15 ] ) ); + psLPC_Q14_tmp = _mm_loadu_si128( (__m128i *)(void*)(&psLPC_Q14[ -15 ] ) ); psLPC_Q14_tmp = _mm_shuffle_epi32( psLPC_Q14_tmp, 0x1B ); tmpa = _mm_mul_epi32( psLPC_Q14_tmp, a_Q12_CDEF ); tmpa = _mm_srli_epi64( tmpa, 16 ); @@ -561,18 +561,18 @@ static OPUS_INLINE void silk_noise_shape_quantizer_del_dec_sse4_1( /* Output of lowpass section */ tmp2 = silk_SMLAWB( psDD->Diff_Q14, psDD->sAR2_Q14[ 0 ], warping_Q16 ); /* 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; n_AR_Q14 = silk_RSHIFT( shapingLPCOrder, 1 ); n_AR_Q14 = silk_SMLAWB( n_AR_Q14, tmp2, AR_shp_Q13[ 0 ] ); /* Loop over allpass sections */ for( j = 2; j < shapingLPCOrder; j += 2 ) { /* 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; n_AR_Q14 = silk_SMLAWB( n_AR_Q14, tmp1, AR_shp_Q13[ j - 1 ] ); /* 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; n_AR_Q14 = silk_SMLAWB( n_AR_Q14, tmp2, AR_shp_Q13[ j ] ); } @@ -590,7 +590,7 @@ static OPUS_INLINE void silk_noise_shape_quantizer_del_dec_sse4_1( /* Input minus prediction plus noise feedback */ /* 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 */ - 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_RSHIFT_ROUND( tmp1, 4 ); /* Q10 */ @@ -667,11 +667,11 @@ static OPUS_INLINE void silk_noise_shape_quantizer_del_dec_sse4_1( /* Add predictions */ 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 */ - psSS[ 0 ].Diff_Q14 = silk_SUB_LSHIFT32( xq_Q14, x_Q10[ i ], 4 ); - sLF_AR_shp_Q14 = silk_SUB32( psSS[ 0 ].Diff_Q14, n_AR_Q14 ); + psSS[ 0 ].Diff_Q14 = silk_SUB32_ovflw( xq_Q14, silk_LSHIFT32( x_Q10[ i ], 4 ) ); + 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 ].LF_AR_Q14 = sLF_AR_shp_Q14; psSS[ 0 ].LPC_exc_Q14 = LPC_exc_Q14; @@ -687,11 +687,11 @@ static OPUS_INLINE void silk_noise_shape_quantizer_del_dec_sse4_1( /* Add predictions */ 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 */ - psSS[ 1 ].Diff_Q14 = silk_SUB_LSHIFT32( xq_Q14, x_Q10[ i ], 4 ); - sLF_AR_shp_Q14 = silk_SUB32( psSS[ 1 ].Diff_Q14, n_AR_Q14 ); + psSS[ 1 ].Diff_Q14 = silk_SUB32_ovflw( xq_Q14, silk_LSHIFT32( x_Q10[ i ], 4 ) ); + 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 ].LF_AR_Q14 = sLF_AR_shp_Q14; psSS[ 1 ].LPC_exc_Q14 = LPC_exc_Q14; @@ -830,7 +830,7 @@ static OPUS_INLINE void silk_nsq_del_dec_scale_states_sse4_1( xmm_x16_x2x0 = _mm_blend_epi16( xmm_x16_x2x0, xmm_x16_x3x1, 0xCC ); - _mm_storeu_si128( (__m128i *)(&(x_sc_Q10[ i ] ) ), xmm_x16_x2x0 ); + _mm_storeu_si128( (__m128i *)(void*)(&(x_sc_Q10[ i ] ) ), xmm_x16_x2x0 ); } for( ; i < psEncC->subfr_length; i++ ) { @@ -862,7 +862,7 @@ static OPUS_INLINE void silk_nsq_del_dec_scale_states_sse4_1( for( i = NSQ->sLTP_shp_buf_idx - psEncC->ltp_mem_length; i < NSQ->sLTP_shp_buf_idx - 3; i += 4 ) { - xmm_sLTP_shp_Q14_x2x0 = _mm_loadu_si128( (__m128i *)(&(NSQ->sLTP_shp_Q14[ i ] ) ) ); + xmm_sLTP_shp_Q14_x2x0 = _mm_loadu_si128( (__m128i *)(void*)(&(NSQ->sLTP_shp_Q14[ i ] ) ) ); /* equal shift right 4 bytes*/ xmm_sLTP_shp_Q14_x3x1 = _mm_shuffle_epi32( xmm_sLTP_shp_Q14_x2x0, _MM_SHUFFLE( 0, 3, 2, 1 ) ); @@ -874,7 +874,7 @@ static OPUS_INLINE void silk_nsq_del_dec_scale_states_sse4_1( xmm_sLTP_shp_Q14_x2x0 = _mm_blend_epi16( xmm_sLTP_shp_Q14_x2x0, xmm_sLTP_shp_Q14_x3x1, 0xCC ); - _mm_storeu_si128( (__m128i *)(&(NSQ->sLTP_shp_Q14[ i ] ) ), xmm_sLTP_shp_Q14_x2x0 ); + _mm_storeu_si128( (__m128i *)(void*)(&(NSQ->sLTP_shp_Q14[ i ] ) ), xmm_sLTP_shp_Q14_x2x0 ); } for( ; i < NSQ->sLTP_shp_buf_idx; i++ ) { diff --git a/src/libs/opus/silk/x86/NSQ_sse4_1.c b/src/libs/opus/silk/x86/NSQ_sse4_1.c index d5ae1d3b..3c9aca7b 100644 --- a/src/libs/opus/silk/x86/NSQ_sse4_1.c +++ b/src/libs/opus/silk/x86/NSQ_sse4_1.c @@ -77,7 +77,7 @@ void silk_NSQ_sse4_1( SideInfoIndices *psIndices, /* I/O Quantization Indices */ const opus_int16 x16[], /* I Input */ 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 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 */ @@ -338,21 +338,21 @@ static OPUS_INLINE void silk_noise_shape_quantizer_10_16_sse4_1( xmm_one = _mm_set_epi8( 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14 ); /* load a_Q12[0] - a_Q12[7] */ - a_Q12_01234567 = _mm_loadu_si128( (__m128i *)(&a_Q12[ 0 ] ) ); + a_Q12_01234567 = _mm_loadu_si128( (__m128i *)(void*)(&a_Q12[ 0 ] ) ); /* load a_Q12[ 8 ] - a_Q12[ 15 ] */ - a_Q12_89ABCDEF = _mm_loadu_si128( (__m128i *)(&a_Q12[ 8 ] ) ); + a_Q12_89ABCDEF = _mm_loadu_si128( (__m128i *)(void*)(&a_Q12[ 8 ] ) ); a_Q12_01234567 = _mm_shuffle_epi8( a_Q12_01234567, xmm_one ); a_Q12_89ABCDEF = _mm_shuffle_epi8( a_Q12_89ABCDEF, xmm_one ); /* load AR_shp_Q13 */ - AR_shp_Q13_76543210 = _mm_loadu_si128( (__m128i *)(&AR_shp_Q13[0] ) ); + AR_shp_Q13_76543210 = _mm_loadu_si128( (__m128i *)(void*)(&AR_shp_Q13[0] ) ); /* load psLPC_Q14 */ xmm_one = _mm_set_epi8(15, 14, 11, 10, 7, 6, 3, 2, 13, 12, 9, 8, 5, 4, 1, 0 ); - xmm_tempa = _mm_loadu_si128( (__m128i *)(&psLPC_Q14[-16]) ); - xmm_tempb = _mm_loadu_si128( (__m128i *)(&psLPC_Q14[-12]) ); + xmm_tempa = _mm_loadu_si128( (__m128i *)(void*)(&psLPC_Q14[-16]) ); + xmm_tempb = _mm_loadu_si128( (__m128i *)(void*)(&psLPC_Q14[-12]) ); xmm_tempa = _mm_shuffle_epi8( xmm_tempa, xmm_one ); xmm_tempb = _mm_shuffle_epi8( xmm_tempb, xmm_one ); @@ -360,8 +360,8 @@ static OPUS_INLINE void silk_noise_shape_quantizer_10_16_sse4_1( psLPC_Q14_hi_89ABCDEF = _mm_unpackhi_epi64( xmm_tempa, xmm_tempb ); psLPC_Q14_lo_89ABCDEF = _mm_unpacklo_epi64( xmm_tempa, xmm_tempb ); - xmm_tempa = _mm_loadu_si128( (__m128i *)(&psLPC_Q14[ -8 ]) ); - xmm_tempb = _mm_loadu_si128( (__m128i *)(&psLPC_Q14[ -4 ]) ); + xmm_tempa = _mm_loadu_si128( (__m128i *)(void*)(&psLPC_Q14[ -8 ]) ); + xmm_tempb = _mm_loadu_si128( (__m128i *)(void*)(&psLPC_Q14[ -4 ]) ); xmm_tempa = _mm_shuffle_epi8( xmm_tempa, xmm_one ); xmm_tempb = _mm_shuffle_epi8( xmm_tempb, xmm_one ); @@ -370,8 +370,8 @@ static OPUS_INLINE void silk_noise_shape_quantizer_10_16_sse4_1( psLPC_Q14_lo_01234567 = _mm_unpacklo_epi64( xmm_tempa, xmm_tempb ); /* load sAR2_Q14 */ - xmm_tempa = _mm_loadu_si128( (__m128i *)(&(NSQ->sAR2_Q14[ 0 ]) ) ); - xmm_tempb = _mm_loadu_si128( (__m128i *)(&(NSQ->sAR2_Q14[ 4 ]) ) ); + xmm_tempa = _mm_loadu_si128( (__m128i *)(void*)(&(NSQ->sAR2_Q14[ 0 ]) ) ); + xmm_tempb = _mm_loadu_si128( (__m128i *)(void*)(&(NSQ->sAR2_Q14[ 4 ]) ) ); xmm_tempa = _mm_shuffle_epi8( xmm_tempa, xmm_one ); xmm_tempb = _mm_shuffle_epi8( xmm_tempb, xmm_one ); @@ -443,7 +443,7 @@ static OPUS_INLINE void silk_noise_shape_quantizer_10_16_sse4_1( b_Q14_0123 = _mm_shuffle_epi32( b_Q14_3210, 0x1B ); /* loaded: [0] [-1] [-2] [-3] */ - pred_lag_ptr_0123 = _mm_loadu_si128( (__m128i *)(&pred_lag_ptr[ -3 ] ) ); + pred_lag_ptr_0123 = _mm_loadu_si128( (__m128i *)(void*)(&pred_lag_ptr[ -3 ] ) ); /* shuffle to [-3] [-2] [-1] [0] and to new xmm */ xmm_tempa = _mm_shuffle_epi32( pred_lag_ptr_0123, 0x1B ); /*64-bit multiply, a[2] * b[-2], a[0] * b[0] */ @@ -595,8 +595,8 @@ static OPUS_INLINE void silk_noise_shape_quantizer_10_16_sse4_1( /* write back sAR2_Q14 */ xmm_tempa = _mm_unpackhi_epi16( sAR2_Q14_lo_76543210, sAR2_Q14_hi_76543210 ); xmm_tempb = _mm_unpacklo_epi16( sAR2_Q14_lo_76543210, sAR2_Q14_hi_76543210 ); - _mm_storeu_si128( (__m128i *)(&NSQ->sAR2_Q14[ 4 ]), xmm_tempa ); - _mm_storeu_si128( (__m128i *)(&NSQ->sAR2_Q14[ 0 ]), xmm_tempb ); + _mm_storeu_si128( (__m128i *)(void*)(&NSQ->sAR2_Q14[ 4 ]), xmm_tempa ); + _mm_storeu_si128( (__m128i *)(void*)(&NSQ->sAR2_Q14[ 0 ]), xmm_tempb ); /* xq[ i ] = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( silk_SMULWW( psLPC_Q14[ i ], Gain_Q10 ), 8 ) ); */ { @@ -612,8 +612,8 @@ static OPUS_INLINE void silk_noise_shape_quantizer_10_16_sse4_1( /* process xq */ for (i = 0; i < length - 7; i += 8) { - xmm_xq_Q14_3210 = _mm_loadu_si128( (__m128i *)(&(psLPC_Q14[ i + 0 ] ) ) ); - xmm_xq_Q14_7654 = _mm_loadu_si128( (__m128i *)(&(psLPC_Q14[ i + 4 ] ) ) ); + xmm_xq_Q14_3210 = _mm_loadu_si128( (__m128i *)(void*)(&(psLPC_Q14[ i + 0 ] ) ) ); + xmm_xq_Q14_7654 = _mm_loadu_si128( (__m128i *)(void*)(&(psLPC_Q14[ i + 4 ] ) ) ); /* equal shift right 4 bytes*/ xmm_xq_Q14_x3x1 = _mm_shuffle_epi32( xmm_xq_Q14_3210, _MM_SHUFFLE( 0, 3, 2, 1 ) ); @@ -644,7 +644,7 @@ static OPUS_INLINE void silk_noise_shape_quantizer_10_16_sse4_1( xmm_xq_Q14_3210 = _mm_packs_epi32( xmm_xq_Q14_3210, xmm_xq_Q14_7654 ); /* save to xq */ - _mm_storeu_si128( (__m128i *)(&xq[ i ] ), xmm_xq_Q14_3210 ); + _mm_storeu_si128( (__m128i *)(void*)(&xq[ i ] ), xmm_xq_Q14_3210 ); } } for ( ; i < length; i++) @@ -698,7 +698,7 @@ static OPUS_INLINE void silk_nsq_scale_states_sse4_1( xmm_x16_x2x0 = _mm_blend_epi16( xmm_x16_x2x0, xmm_x16_x3x1, 0xCC ); - _mm_storeu_si128( (__m128i *)(&(x_sc_Q10[ i ] ) ), xmm_x16_x2x0 ); + _mm_storeu_si128( (__m128i *)(void*)(&(x_sc_Q10[ i ] ) ), xmm_x16_x2x0 ); } for( ; i < psEncC->subfr_length; i++ ) { @@ -729,7 +729,7 @@ static OPUS_INLINE void silk_nsq_scale_states_sse4_1( for( i = NSQ->sLTP_shp_buf_idx - psEncC->ltp_mem_length; i < NSQ->sLTP_shp_buf_idx - 3; i += 4 ) { - xmm_sLTP_shp_Q14_x2x0 = _mm_loadu_si128( (__m128i *)(&(NSQ->sLTP_shp_Q14[ i ] ) ) ); + xmm_sLTP_shp_Q14_x2x0 = _mm_loadu_si128( (__m128i *)(void*)(&(NSQ->sLTP_shp_Q14[ i ] ) ) ); /* equal shift right 4 bytes*/ xmm_sLTP_shp_Q14_x3x1 = _mm_shuffle_epi32( xmm_sLTP_shp_Q14_x2x0, _MM_SHUFFLE( 0, 3, 2, 1 ) ); @@ -741,7 +741,7 @@ static OPUS_INLINE void silk_nsq_scale_states_sse4_1( xmm_sLTP_shp_Q14_x2x0 = _mm_blend_epi16( xmm_sLTP_shp_Q14_x2x0, xmm_sLTP_shp_Q14_x3x1, 0xCC ); - _mm_storeu_si128( (__m128i *)(&(NSQ->sLTP_shp_Q14[ i ] ) ), xmm_sLTP_shp_Q14_x2x0 ); + _mm_storeu_si128( (__m128i *)(void*)(&(NSQ->sLTP_shp_Q14[ i ] ) ), xmm_sLTP_shp_Q14_x2x0 ); } for( ; i < NSQ->sLTP_shp_buf_idx; i++ ) { diff --git a/src/libs/opus/silk/x86/VAD_sse4_1.c b/src/libs/opus/silk/x86/VAD_sse4_1.c index e7eaf971..9e06bc79 100644 --- a/src/libs/opus/silk/x86/VAD_sse4_1.c +++ b/src/libs/opus/silk/x86/VAD_sse4_1.c @@ -144,7 +144,7 @@ opus_int silk_VAD_GetSA_Q8_sse4_1( /* O Return value, 0 if s for( i = 0; i < dec_subframe_length - 7; i += 8 ) { - xmm_X = _mm_loadu_si128( (__m128i *)&(X[ X_offset[ b ] + i + dec_subframe_offset ] ) ); + xmm_X = _mm_loadu_si128( (__m128i *)(void*)&(X[ X_offset[ b ] + i + dec_subframe_offset ] ) ); xmm_X = _mm_srai_epi16( xmm_X, 3 ); xmm_X = _mm_madd_epi16( xmm_X, xmm_X ); xmm_acc = _mm_add_epi32( xmm_acc, xmm_X ); diff --git a/src/libs/opus/silk/x86/VQ_WMat_EC_sse4_1.c b/src/libs/opus/silk/x86/VQ_WMat_EC_sse4_1.c index 2c7d18d0..df4626b6 100644 --- a/src/libs/opus/silk/x86/VQ_WMat_EC_sse4_1.c +++ b/src/libs/opus/silk/x86/VQ_WMat_EC_sse4_1.c @@ -65,7 +65,7 @@ void silk_VQ_WMat_EC_sse4_1( neg_xX_Q24[ 3 ] = -silk_LSHIFT32( xX_Q17[ 3 ], 7 ); neg_xX_Q24[ 4 ] = -silk_LSHIFT32( xX_Q17[ 4 ], 7 ); - v_XX_31_Q17 = _mm_loadu_si128( (__m128i *)(&XX_Q17[ 1 ] ) ); + v_XX_31_Q17 = _mm_loadu_si128( (__m128i *)(void*)(&XX_Q17[ 1 ] ) ); v_XX_42_Q17 = _mm_shuffle_epi32( v_XX_31_Q17, _MM_SHUFFLE( 0, 3, 2, 1 ) ); /* Loop over codebook */ diff --git a/src/libs/opus/silk/x86/main_sse.h b/src/libs/opus/silk/x86/main_sse.h index a01d7f6c..b254d53e 100644 --- a/src/libs/opus/silk/x86/main_sse.h +++ b/src/libs/opus/silk/x86/main_sse.h @@ -88,7 +88,7 @@ void silk_NSQ_sse4_1( SideInfoIndices *psIndices, /* I/O Quantization Indices */ const opus_int16 x16[], /* I Input */ 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 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 */ @@ -116,7 +116,7 @@ extern void (*const SILK_NSQ_IMPL[OPUS_ARCHMASK + 1])( SideInfoIndices *psIndices, /* I/O Quantization Indices */ const opus_int16 x16[], /* I Input */ 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 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 */ @@ -142,7 +142,7 @@ void silk_NSQ_del_dec_sse4_1( SideInfoIndices *psIndices, /* I/O Quantization Indices */ const opus_int16 x16[], /* I Input */ 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 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 */ @@ -154,7 +154,33 @@ void silk_NSQ_del_dec_sse4_1( const opus_int LTP_scale_Q14 /* I LTP state scaling */ ); -# if defined OPUS_X86_PRESUME_SSE4_1 +void silk_NSQ_del_dec_avx2( + const silk_encoder_state *psEncC, /* I Encoder State */ + silk_nsq_state *NSQ, /* I/O NSQ state */ + SideInfoIndices *psIndices, /* I/O Quantization Indices */ + const opus_int16 x16[], /* I Input */ + opus_int8 pulses[], /* O Quantized pulse signal */ + 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 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 Tilt_Q14[MAX_NB_SUBFR], /* I Spectral tilt */ + const opus_int32 LF_shp_Q14[MAX_NB_SUBFR], /* I Low frequency shaping coefs */ + const opus_int32 Gains_Q16[MAX_NB_SUBFR], /* I Quantization step sizes */ + const opus_int32 pitchL[MAX_NB_SUBFR], /* I Pitch lags */ + const opus_int Lambda_Q10, /* I Rate/distortion tradeoff */ + const opus_int LTP_scale_Q14 /* I LTP state scaling */ +); + +# if defined (OPUS_X86_PRESUME_AVX2) + +# define OVERRIDE_silk_NSQ_del_dec +# define silk_NSQ_del_dec(psEncC, NSQ, psIndices, x16, pulses, PredCoef_Q12, LTPCoef_Q14, AR_Q13, \ + HarmShapeGain_Q14, Tilt_Q14, LF_shp_Q14, Gains_Q16, pitchL, Lambda_Q10, LTP_scale_Q14, arch) \ + ((void)(arch),silk_NSQ_del_dec_avx2(psEncC, NSQ, psIndices, x16, pulses, PredCoef_Q12, LTPCoef_Q14, AR_Q13, \ + HarmShapeGain_Q14, Tilt_Q14, LF_shp_Q14, Gains_Q16, pitchL, Lambda_Q10, LTP_scale_Q14)) + +# elif defined (OPUS_X86_PRESUME_SSE4_1) && !defined(OPUS_X86_MAY_HAVE_AVX2) # define OVERRIDE_silk_NSQ_del_dec # define silk_NSQ_del_dec(psEncC, NSQ, psIndices, x16, pulses, PredCoef_Q12, LTPCoef_Q14, AR_Q13, \ @@ -170,7 +196,7 @@ extern void (*const SILK_NSQ_DEL_DEC_IMPL[OPUS_ARCHMASK + 1])( SideInfoIndices *psIndices, /* I/O Quantization Indices */ const opus_int16 x16[], /* I Input */ 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 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 */ @@ -243,5 +269,31 @@ extern opus_int (*const SILK_VAD_GETSA_Q8_IMPL[OPUS_ARCHMASK + 1])( # endif +#ifndef FIXED_POINT +double silk_inner_product_FLP_avx2( + const silk_float *data1, + const silk_float *data2, + opus_int dataSize +); + +#if defined (OPUS_X86_PRESUME_AVX2) + +#define OVERRIDE_inner_product_FLP +#define silk_inner_product_FLP(data1, data2, dataSize, arch) ((void)arch,silk_inner_product_FLP_avx2(data1, data2, dataSize)) + +#elif defined(OPUS_HAVE_RTCD) && defined(OPUS_X86_MAY_HAVE_AVX2) + +#define OVERRIDE_inner_product_FLP +extern double (*const SILK_INNER_PRODUCT_FLP_IMPL[OPUS_ARCHMASK + 1])( + const silk_float *data1, + const silk_float *data2, + opus_int dataSize +); + +#define silk_inner_product_FLP(data1, data2, dataSize, arch) ((void)arch,(*SILK_INNER_PRODUCT_FLP_IMPL[(arch) & OPUS_ARCHMASK])(data1, data2, dataSize)) + +#endif +#endif + # endif #endif diff --git a/src/libs/opus/silk/x86/x86_silk_map.c b/src/libs/opus/silk/x86/x86_silk_map.c index 70f60078..39ad7527 100644 --- a/src/libs/opus/silk/x86/x86_silk_map.c +++ b/src/libs/opus/silk/x86/x86_silk_map.c @@ -32,10 +32,13 @@ #include "celt/x86/x86cpu.h" #include "structs.h" #include "SigProc_FIX.h" +#ifndef FIXED_POINT +#include "SigProc_FLP.h" +#endif #include "pitch.h" #include "main.h" -#if defined(OPUS_HAVE_RTCD) && !defined(OPUS_X86_PRESUME_SSE4_1) +#if defined(OPUS_HAVE_RTCD) && !defined(OPUS_X86_PRESUME_AVX2) #if defined(FIXED_POINT) @@ -72,7 +75,7 @@ void (*const SILK_NSQ_IMPL[ OPUS_ARCHMASK + 1 ] )( SideInfoIndices *psIndices, /* I/O Quantization Indices */ const opus_int16 x16[], /* I Input */ 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 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 */ @@ -117,7 +120,7 @@ void (*const SILK_NSQ_DEL_DEC_IMPL[ OPUS_ARCHMASK + 1 ] )( SideInfoIndices *psIndices, /* I/O Quantization Indices */ const opus_int16 x16[], /* I Input */ 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 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 */ @@ -132,7 +135,7 @@ void (*const SILK_NSQ_DEL_DEC_IMPL[ OPUS_ARCHMASK + 1 ] )( silk_NSQ_del_dec_c, silk_NSQ_del_dec_c, MAY_HAVE_SSE4_1( silk_NSQ_del_dec ), /* sse4.1 */ - MAY_HAVE_SSE4_1( silk_NSQ_del_dec ) /* avx */ + MAY_HAVE_AVX2( silk_NSQ_del_dec ) /* avx */ }; #if defined(FIXED_POINT) @@ -156,4 +159,21 @@ void (*const SILK_BURG_MODIFIED_IMPL[ OPUS_ARCHMASK + 1 ] )( }; #endif + +#ifndef FIXED_POINT + +double (*const SILK_INNER_PRODUCT_FLP_IMPL[ OPUS_ARCHMASK + 1 ] )( + const silk_float *data1, + const silk_float *data2, + opus_int dataSize +) = { + silk_inner_product_FLP_c, /* non-sse */ + silk_inner_product_FLP_c, + silk_inner_product_FLP_c, + silk_inner_product_FLP_c, /* sse4.1 */ + MAY_HAVE_AVX2( silk_inner_product_FLP ) /* avx */ +}; + +#endif + #endif diff --git a/src/libs/opus/silk_sources.mk b/src/libs/opus/silk_sources.mk index 3df24816..3780b164 100644 --- a/src/libs/opus/silk_sources.mk +++ b/src/libs/opus/silk_sources.mk @@ -86,6 +86,9 @@ silk/x86/NSQ_del_dec_sse4_1.c \ silk/x86/VAD_sse4_1.c \ silk/x86/VQ_WMat_EC_sse4_1.c +SILK_SOURCES_AVX2 = \ +silk/x86/NSQ_del_dec_avx2.c + SILK_SOURCES_ARM_RTCD = \ silk/arm/arm_silk_map.c @@ -156,3 +159,6 @@ silk/float/scale_copy_vector_FLP.c \ silk/float/scale_vector_FLP.c \ silk/float/schur_FLP.c \ silk/float/sort_FLP.c + +SILK_SOURCES_FLOAT_AVX2 = \ +silk/float/x86/inner_product_FLP_avx2.c \ No newline at end of file diff --git a/src/libs/opus/src/analysis.c b/src/libs/opus/src/analysis.c index 058328f0..1f580138 100644 --- a/src/libs/opus/src/analysis.c +++ b/src/libs/opus/src/analysis.c @@ -929,9 +929,9 @@ static void tonality_analysis(TonalityAnalysisState *tonal, const CELTMode *celt features[23] = info->tonality_slope + 0.069216f; features[24] = tonal->lowECount - 0.067930f; - compute_dense(&layer0, layer_out, features); - compute_gru(&layer1, tonal->rnn_state, layer_out); - compute_dense(&layer2, frame_probs, tonal->rnn_state); + analysis_compute_dense(&layer0, layer_out, features); + analysis_compute_gru(&layer1, tonal->rnn_state, layer_out); + analysis_compute_dense(&layer2, frame_probs, tonal->rnn_state); /* Probability of speech or music vs noise */ info->activity_probability = frame_probs[1]; diff --git a/src/libs/opus/src/mapping_matrix.c b/src/libs/opus/src/mapping_matrix.c index 31298af0..3f78ab59 100644 --- a/src/libs/opus/src/mapping_matrix.c +++ b/src/libs/opus/src/mapping_matrix.c @@ -302,6 +302,287 @@ const opus_int16 mapping_matrix_toa_mixing_data[324] = { 0, 0, 0, 32767 }; +const MappingMatrix mapping_matrix_fourthoa_mixing = { 27, 27, 0 }; +const opus_int16 mapping_matrix_fourthoa_mixing_data[729] = { + 9243, 0, 16010, 0, 0, 0, 20669, 0, + 0, 0, 0, 0, 24456, 0, 0, 0, + 0, 0, 0, 0, 27731, 0, 0, 0, + 0, 0, 0, 9243, 0, 10884, 11741, 0, + 0, 3995, 17849, 9626, 0, 0, 0, -5727, + 14399, 17315, 7625, 0, 0, 0, 0, -11747, + 2574, 18637, 15552, 5930, 0, 0, 9243, -14302, + -2682, -6677, 13337, 5357, -9464, 2501, -11170, 4770, + -5911, 11501, 5858, 5369, 4951, 17901, -19071, -2397, + -9281, -9198, 7576, -4294, 7773, -8997, -3399, 0, + 0, 9243, 9940, 11991, -3705, -5144, 16647, 7057, + -6206, -5941, -2698, -10194, 16781, -1788, -6256, -11772, + 4935, 3912, -6062, -13039, 9446, -9758, -3521, -15058, + 11089, 565, 0, 0, 9243, -15376, 3720, 2461, + -5285, -7989, -8660, 1278, -16087, 15811, -3249, 10500, + -7757, -1680, -9890, -8153, 10884, 11022, 2847, 12828, + 5137, -2053, 8666, -5684, 14776, 0, 0, 9243, + -10577, 10304, -6186, 9139, -15222, 2507, -8902, -5140, + -145, 15562, -10596, -7311, -6197, -8753, 8667, -6014, + -281, 15033, 938, -11859, 548, -8456, 16735, -3654, + 0, 0, 9243, 8974, 4839, -12343, -15472, 6066, + -7501, -8343, 5015, 15920, -12374, -4559, -9400, 6271, + 4011, 5191, -9932, 14438, 4828, -8768, 1909, 12059, + -1565, 4707, -13711, 0, 0, 9243, 15799, 2085, + -1534, -3386, 4602, -9808, -447, -17267, -18054, -1167, + -13525, -4644, 1313, -5951, 5397, 7485, -7056, 2584, + -8120, 8669, 788, 13177, 2109, 18349, 0, 0, + 9243, 12371, -10036, 1597, 2760, -17341, 1848, -2239, + -10509, -8474, -4577, 11164, 7935, 1441, 17430, -3436, + -3713, 15936, 4184, 2647, -11730, 341, -15934, 6462, + 6581, 0, 0, 9243, -8963, 2184, 13084, -16381, + -2734, -9757, 3991, 6345, -18297, -5912, 7604, -4849, + -11100, 2290, -4304, -13305, -7488, 12338, 4805, 8505, + -7014, -4779, -1761, -14597, 0, 0, 9243, 1301, + -15498, 3799, 690, -2816, 18718, -8223, 889, 255, + -1768, 4485, -19951, 13097, -2278, 167, 78, -740, + 3324, -6139, 19488, -17925, 4283, -486, 20, 0, + 0, 9243, -13470, -6719, 5452, -10257, 12641, -4873, + -5116, -10595, 5856, 11389, 1502, 10876, -608, 11765, + -13218, 13911, -7373, -2070, -13679, -4154, 5536, -2138, + 16643, 451, 0, 0, 9243, 2455, -3679, -15387, + -5277, -1261, -8697, 7906, 16112, 8147, 3208, -1690, + 7687, 10593, -9796, -15852, -10884, -5616, 2881, 2032, + 5246, -12735, -8796, 10928, 14833, 0, 0, 9243, + -6849, 2775, -14202, 13586, -2655, -9402, -5505, 10809, + -18013, 6231, 5444, -6041, 11288, 4958, -4078, 18799, + -9368, -9291, 4535, 7383, 9405, -7391, -2121, -4336, + 0, 0, 9243, 6423, -9040, 11548, 10359, -8109, + -450, -14580, 6431, 10857, -15475, 3569, 9707, 6416, + -9607, 521, 8528, -18391, 11049, 3815, -10423, 6860, + 6860, -883, -4221, 0, 0, 9243, 11932, -5968, + -8850, -14749, -9946, -6026, 7377, -4472, 5206, 14547, + -3406, 10508, 2526, 4411, 14543, 8444, -5822, 347, + 12347, -1709, -9158, 105, -16265, -12642, 0, 0, + 9243, 13044, -150, 9282, 16910, -274, -10332, -194, + -5864, 5428, -420, -12196, 344, -8679, 145, -18554, + -12695, -152, -14635, 503, 10389, 358, 5076, 522, + -16100, 0, 0, 9243, -8374, -13590, -1221, 1428, + 15896, 12005, 2318, -4793, 2590, -3209, -20390, -6256, + -2974, 10766, 1202, -876, -6597, 5004, 19896, -1541, + 2902, -16788, -3062, 1340, 0, 0, 9243, 9879, + 10267, 7300, 10073, 14167, 2416, 10469, -3094, 2899, + 17092, 9762, -7400, 7214, -5250, -8238, -3989, 5578, + 16392, -1050, -11848, -776, -5034, -15850, -5882, 0, + 0, 9243, -4974, -9068, 12221, -8490, 6299, -388, + -15478, 8702, -9920, 12723, -2810, 9668, 6905, -13040, + 4325, -9456, 16856, -9159, -2909, -10476, 7149, 9387, + -7350, 233, 0, 0, 9243, 3627, -13823, -7218, + -3656, -7002, 12776, 13935, 2719, 2446, 8352, 9252, + -7676, -18413, -6212, -429, -1272, -6335, -13356, -9510, + 295, 18926, 9934, 1112, -382, 0, 0, 9243, + -6383, -9343, -11326, 10097, 8329, 223, 14780, 6114, + -10348, -15590, -4195, 9257, -7445, -9439, -323, 7902, + 18117, 12101, -3142, -10944, -5577, 7327, 566, -4133, + 0, 0, 9243, 2626, 865, 15769, 5783, 317, + -10244, 1905, 16884, 9144, 826, -2420, -1972, -14536, + 2413, 16939, 12500, 1482, -4906, -578, 10096, -3476, + -14323, 2745, 16105, 0, 0, 9243, -8975, 12086, + 5450, -6832, -15149, 7333, 9200, -3550, -362, -13645, + -15525, -1391, 9428, -7091, -5442, 3105, -820, -17685, + -9175, -9462, 5572, -9191, -12325, -2180, 0, 0, + 9243, -114, 11576, -11058, 177, -185, 5875, -17880, + 8539, -198, 339, -173, -3411, -16698, 16336, -6369, + 193, -430, 408, -75, -10806, -7225, 19670, -13817, + 4665, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 32767, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 32767 +}; + +const MappingMatrix mapping_matrix_fifthoa_mixing = { 38, 38, 0 }; +const opus_int16 mapping_matrix_fifthoa_mixing_data[1444] = { + 9243, 0, 16010, 0, 0, 0, 20669, 0, + 0, 0, 0, 0, 24456, 0, 0, 0, + 0, 0, 0, 0, 27731, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 30657, 0, + 0, 0, 0, 0, 0, 0, 9243, 0, + -7023, 14387, 0, 0, -4369, -14112, 14455, 0, + 0, 0, 10931, -510, -16777, 14031, 0, 0, + 0, 0, -5118, 14286, 4343, -18465, 13374, 0, + 0, 0, 0, 0, -6494, -12221, 11761, 8513, + -19458, 12605, 0, 0, 9243, -14128, 5093, 5547, + -10946, -10050, -7197, 3945, -11790, 7142, -9213, 6529, + -9701, -2563, -9923, -14846, 16521, 6816, 2764, 14103, + 1118, -5537, 2977, -14168, 1228, 4866, 17430, -528, + 10639, 2641, 10437, -1037, 11460, 1098, 1296, 15737, + 0, 0, 9243, 1128, -14775, 6062, 955, -2329, + 16069, -12511, 2477, 579, -2333, 3440, -14197, 18478, + -6050, 940, 303, -1604, 4106, -4223, 9829, -22688, + 10647, -2604, 334, 145, -927, 3203, -6017, 4507, + -3812, 24212, -15600, 5198, -1023, 110, 0, 0, + 9243, 1158, 12997, 9277, 1501, 2103, 10097, 16840, + 5916, 1402, 3225, 2488, 2929, 19916, 12706, 3585, + 1137, 3415, 4698, 2078, -5442, 16634, 18511, 8731, + 2095, 850, 3061, 5733, 5225, 960, -11728, 7689, + 20588, 14659, 5642, 1187, 0, 0, 9243, -4663, + -3081, -15003, 9771, 2007, -9185, 6457, 14199, -14357, + -4976, 3554, 6625, 11434, -7231, -11297, 17760, 8291, + -6267, -3368, 6712, -10837, -9107, 6524, 6793, -19531, + -11338, 7934, 7335, -2205, -9215, -7094, 10659, 6243, + -4337, -1250, 0, 0, 9243, -13515, 7679, -3831, + 7232, -14496, -3201, -4109, -11731, 8828, 9178, -1901, + -10848, -539, -14888, 9626, -10860, 12703, 3824, 12334, + -7104, 3496, -6203, 13852, 5461, -2109, -17277, 7837, + -4714, 13901, 4097, 3940, 7647, 8546, 8688, -10986, + 0, 0, 9243, 8113, -9860, 9657, 10943, -11174, + 1426, -13300, 1915, 8178, -17833, 6805, 8309, 8100, + -3121, -4742, 2683, -15111, 15688, 2358, -11590, 2807, + 2746, 8762, -7430, -2251, -5481, 16370, -4081, -9694, + 5872, -11539, -714, -9492, 15177, -6126, 0, 0, + 9243, 9933, -9215, -8528, -11831, -12785, -62, 10976, + -1811, 5593, 18018, 6100, 9455, -5237, 2758, 8971, + 2743, -9659, -13517, 5330, -10737, -4576, -2069, -15491, + -8749, -7226, -5237, 9191, -181, -12277, 2815, 10540, + -27, 14741, 16703, 3103, 0, 0, 9243, -10067, + -8881, -8723, 12265, 12487, -793, 10821, -1762, -6021, + -18002, -5072, 9912, -4395, 2587, 9368, -2767, 10021, + 12259, -6468, -10113, -5605, -1761, -15590, -9430, 7800, + 5092, -8835, 2293, 12314, 1222, 10671, -329, 13745, + 17349, 3563, 0, 0, 9243, -6485, 12991, -6743, + 6108, -11768, 10080, -12236, 238, -2883, 13115, -13907, + 2900, -14460, 511, 2564, 186, -7019, 19094, -11597, + -5472, -12058, 744, 6243, -2384, 930, 501, -11778, + 21214, -5330, -11746, -5542, 827, 10475, -6418, 1132, + 0, 0, 9243, 3862, 5238, -14627, -7891, 2826, + -7015, -10701, 13900, 11410, -6831, -1679, -9861, 6359, + 12032, -11660, -14041, 11199, 1713, -3895, 657, 14749, + -3017, -11445, 8380, 15575, -15236, -346, 7690, -923, + 10317, 3498, -13545, 354, 9093, -4476, 0, 0, + 9243, -8417, 13183, 3418, -4018, -15498, 10685, 6294, + -4132, 1419, -8755, -18818, 3926, 7642, -9001, -3235, + 2125, 3506, -13037, -16570, -4337, 6729, -13404, -7991, + 59, 443, 5804, 6005, -15011, -9060, -11044, 3679, + -15434, -13685, 161, 1185, 0, 0, 9243, -5288, + 6773, -13508, 9977, -5002, -4784, -12780, 10790, -12942, + 11168, 519, -10890, 1326, 12078, -6274, 13780, -16427, + 2186, 5352, -4328, 13671, 2364, -7963, 1080, -12568, + 19336, -6557, -8574, 4084, 7277, 10433, -9273, -3178, + 1516, 3817, 0, 0, 9243, 9660, 7817, 10093, + 13619, 10548, -2942, 11021, 597, 9663, 17594, 1736, + -10794, 1814, 771, -8469, 1041, 14155, 7891, -8597, + -7498, -8982, 346, -12407, -11848, -6809, 1686, 9181, + -8306, -10247, 3538, -10706, -364, -8047, -19188, -8493, + 0, 0, 9243, -7163, -1020, 14282, -14289, 1021, + -10208, -2036, 10660, -18919, 2410, 6564, 2323, -13088, + -1798, 3365, -19498, 3619, 12022, -1858, 9978, 3705, + -8969, -643, -5794, -15523, 4123, 15113, -3949, -6265, + -3596, 12490, 2946, -2688, 1225, -14570, 0, 0, + 9243, -12187, 772, -10354, 17623, -1314, -10262, -1117, + -2885, -9937, 2249, 11267, -1763, 9572, -368, 16506, + -6510, -1438, -15014, 2402, 10157, 2041, 2458, 2389, + -19346, 19860, -1041, 8067, -3704, -10931, 2743, -9286, + 606, -13399, -3095, 7924, 0, 0, 9243, 15545, + -2367, -3011, -6538, -5139, -9657, 995, -16242, -15706, + 2557, -12952, 5226, 2508, 6353, 10156, 13593, 6966, + 4795, 8960, 8183, -1735, 11914, -4504, 14149, 11727, + -6665, 10460, -3962, 10145, -7648, -1965, -9845, -6764, + -6938, -16633, 0, 0, 9243, 3098, 12983, -8841, + -3826, 5618, 10053, -16031, 4787, 3283, -8209, 6632, + 2856, -18922, 10272, -2055, -2344, 7987, -11939, 5516, + -5520, -15739, 14940, -5001, 530, 1465, -6306, 13388, + -13243, 2513, -11772, -7170, 16572, -8384, 1426, 168, + 0, 0, 9243, -15767, -2008, -1916, 4220, 4422, + -9846, 537, -17105, 17650, -1400, 13589, 4481, 1651, + 5677, 6701, -9241, -6642, -3252, -7827, 8792, -951, + 13182, -2522, 17586, -17005, 3845, -12562, 2213, -11472, + -6688, -1394, -8970, -4769, -7316, -11753, 0, 0, + 9243, -13344, -3829, 7975, -14863, 7136, -8561, -4265, + -7992, -801, 9405, 8912, 7937, -5326, 5057, -17681, + 15207, 575, 7717, -11360, 4847, 6789, 4150, 12686, + -10050, 16730, -12063, 322, -12920, -3313, -10267, 1980, + -6948, 7112, 7972, 8042, 0, 0, 9243, 7791, + -1021, 13949, 15180, -1111, -10208, -1989, 9348, 19199, + -2561, -7140, 2323, -12782, -1577, 817, 18164, -3673, + -12771, 2022, 9978, 3620, -7865, -156, -9155, 11924, + -3842, -15336, 4196, 6814, -3596, 12199, 2583, -652, + 1936, -17637, 0, 0, 9243, -4810, -15144, -1958, + 1315, 10175, 17406, 4142, -1348, 263, -3292, -15632, + -17046, -6363, 3374, 605, -227, -748, 5997, 20334, + 14481, 8277, -6146, -1717, 5, 27, 712, 1542, + -9197, -23572, -10163, -9595, 9425, 3539, -17, -72, + 0, 0, 9243, -7366, 8261, 11568, -11901, -8499, + -2079, 13347, 5556, -12049, -16247, -2282, -10529, 3584, + 7585, -1577, -8464, -18652, -8902, 5913, -8688, -9287, + 4156, -2442, -7089, -2993, -14485, -13949, 5422, 8459, + 1638, -13285, -2531, -1826, -12132, -9456, 0, 0, + 9243, 11716, 698, -10889, -17818, 1143, -10275, -1062, + -1305, 12057, -2057, -10855, -1595, 10088, -150, 15043, + 2978, 1578, 15225, -2090, 10201, 1943, 1115, 1969, + -20211, -17636, 430, -9826, 3391, 10572, 2485, -9826, + 248, -12259, -2924, 12131, 0, 0, 9243, 4361, + -4594, -14703, -8956, -2798, -7781, 9434, 13769, 12936, + 6800, -2400, 9082, 8091, -10453, -11023, -15786, -11136, + 3285, 4153, 2658, -14002, -5051, 9489, 7000, 17206, + 15024, -2777, -8491, -42, -10626, 141, 13053, 2366, + -6662, -2231, 0, 0, 9243, -752, -11933, -10646, + 1119, 1254, 6890, 17745, 7875, -1203, -2207, -1251, + 2024, -17706, -15532, -5600, 1128, 2691, 2800, 683, + -9927, 9661, 19706, 12522, 3889, -978, -2789, -3992, + -2440, 206, 12695, 2921, -17173, -18575, -9616, -2657, + 0, 0, 9243, 4791, -15001, -2887, -1931, -10037, + 16885, 6048, -1020, 46, 4789, 15191, -15922, -9154, + 2530, 823, 252, -130, -8608, -19335, 12613, 11651, + -4549, -2314, -172, -101, -784, 265, 12975, 21741, + -7551, -13101, 6856, 4710, 535, -46, 0, 0, + 9243, -12153, -10395, 754, -1281, 17644, 2735, -1095, + -10274, 8359, 2200, -12593, 7083, 782, 17650, -1573, + 1685, -16282, -2164, -530, -11878, 32, -17359, 3065, + 6651, -5212, -3628, 19365, 965, 13180, 8243, -818, + 7746, -3645, -14323, 1670, 0, 0, 9243, -6961, + -11198, 9081, -8829, 10887, 4833, -14202, 2374, -6524, + 16339, -9417, 4737, 12284, -4394, -2691, -2683, 13690, + -18539, 2830, -11438, -3692, 4985, 5648, -4628, 514, + 6225, -18409, 12672, 5311, 11170, -6928, -3407, -7595, + 10737, -3977, 0, 0, 9243, 12099, -10405, 1294, + 2187, -17582, 2760, -1880, -10105, -8058, -3760, 12583, + 7058, 1346, 17376, -2667, -2829, 15710, 3705, 468, + -11880, 50, -17123, 5201, 6230, 4698, 6098, -18716, + -1665, -13088, 8285, -1400, 7696, -6196, -13429, 2770, + 0, 0, 9243, 8602, 13392, 1722, 2070, 16090, + 11359, 3222, -4960, -2638, 4581, 20106, 5099, 4026, + -10978, -1778, -1314, -6620, 6988, 18701, -2965, 3745, + -16745, -4461, 1300, 584, -3646, -11588, 8350, 11847, + -10050, 2372, -20010, -7809, 3608, 887, 0, 0, + 9243, 14252, -1958, 7026, 13986, -3899, -9870, -1922, + -10736, -3693, -4527, -12333, 4376, -6080, 3475, -18537, + -19222, 1355, -10843, 6913, 8869, 3408, 8323, 6804, + -5141, -13648, 7800, 2649, 7171, 10505, -6548, 5179, + -5505, 13299, 2086, 15579, 0, 0, 9243, 11323, + 9021, -6835, -10810, 14267, -489, -8613, -5689, 639, + -16117, 6224, -9731, -3757, -8482, 10882, 7873, 1080, + -11447, -6791, -10388, 4099, -6025, 18396, -5407, -7536, + 14714, 984, 1267, -13940, -1889, 8416, 666, 16762, + -10106, -3418, 0, 0, 9243, 871, 4833, 15238, + 1855, 588, -7508, 10287, 16162, 2857, 1481, -443, + -9392, -7758, 12910, 16506, 3837, 2588, -581, -851, + 1928, -14879, -5066, 14950, 16498, 4773, 3842, -425, + -1785, -82, 10578, -1435, -15554, -2459, 16520, 16250, + 0, 0, 9243, 14762, 5967, 1673, 3450, 12303, + -6027, 1394, -15022, -14571, 3402, -4217, -10507, -478, + -14813, -5131, -6634, -16293, -82, -15276, -1705, -1731, + 358, -5738, 13681, 12503, -8200, -3023, -3290, -7384, + 9272, -837, 14328, -1064, 16913, 7915, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 32767, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 32767 +}; + const MappingMatrix mapping_matrix_foa_demixing = { 6, 6, 0 }; const opus_int16 mapping_matrix_foa_demixing_data[36] = { 16384, 16384, 16384, 16384, 0, 0, 0, 23170, @@ -376,3 +657,283 @@ const opus_int16 mapping_matrix_toa_demixing_data[324] = { 0, 0, 0, 32767 }; +const MappingMatrix mapping_matrix_fourthoa_demixing = { 27, 27, 0 }; +const opus_int16 mapping_matrix_fourthoa_demixing_data[729] = { + 4870, 4484, 4870, 4347, 4440, 4726, 4683, 4821, + 4883, 4842, 4603, 4484, 4683, 4698, 4234, 4368, + 4603, 4783, 4783, 4820, 4821, 4347, 4820, 4440, + 4698, 0, 0, 101, 84, -7818, 4640, -7178, + -5492, 4629, 8384, 6547, -4966, 617, -6345, 1061, + -3241, 2939, 5549, 6390, -4434, 4994, -2610, 1993, + -2873, 1547, -4356, -164, 0, 0, 8797, 5074, + -1553, 5383, 1906, 5297, 2722, 1158, -5226, 1311, + -7760, -3327, -1940, 1586, -4093, -2951, -214, -6873, + 5450, -4875, -7193, -4438, 558, 5593, 5607, 0, + 0, -26, 5761, -3723, -1460, 1195, -3065, -6357, + -1175, 608, 6965, 2310, 2759, -8023, -7138, 5162, + -3624, 5006, -809, 3592, 6209, -4159, -4968, 8150, + 2513, -5702, 0, 0, 301, 109, 7161, -2462, + -2443, 5044, -7125, -2256, 1967, -9107, 259, -4928, + -2592, 6514, 4111, -7236, 8695, 635, 5009, -4025, + -1937, 4794, 3420, -3507, -400, 0, 0, -134, + 85, 2771, 7842, -3649, -8225, 2866, 2586, -9200, + -1945, -1563, 6155, -720, -1061, -3494, -4513, -487, + 8389, 7317, 3348, -3721, 3806, 371, -6896, 70, + 0, 0, 10919, 2072, -4867, 3472, -4429, 1721, + -4066, -5193, 1032, -5253, 9501, -2017, -3971, -5261, + -306, -2737, -5137, 5713, 1237, -8, 6387, 364, + -5423, 3364, 2888, 0, 0, -48, 8946, 1048, + -2691, 602, -4332, -4302, -514, -1730, 2459, -4328, + -2156, 3335, -2748, -6029, 4023, 155, 897, 5268, + -8380, 7625, 7395, 508, 3945, -8951, 0, 0, + 39, 4151, -5965, -3398, -7006, -3534, 2697, -8989, + -5237, 2913, 46, -5540, 8196, 5766, 2711, -2520, + -3043, -2146, -948, 4965, 1806, 2472, 8988, -1266, + 4840, 0, 0, -407, -189, 2179, -1627, 6516, + 259, 7196, -9449, -4905, -9766, 561, 4021, 3371, + -8650, 5032, 3329, 2534, 641, 2224, -5747, 1047, + -4074, 5252, -24, 674, 0, 0, 664, 237, + -2837, -4072, -1205, 8252, -5875, -1670, -2743, -3984, + 381, 5059, 1765, 2666, -8295, 7403, 1154, -2086, + 7622, 7105, 3677, -6943, 1050, -6632, -694, 0, + 0, 382, -133, 5699, 7650, 5154, -5713, -1645, + -6902, 6181, 4450, 1151, 410, -993, 3829, 2444, + -2405, -6618, -9514, 5366, -1896, 5844, -2886, -1524, + -7321, -1007, 0, 0, 12767, -2530, 3183, -1409, + -4015, -2894, -5155, -1710, 3841, -2107, -10274, 5119, + 3979, -4010, 5550, 4822, -746, -2507, -3080, 4289, + -3675, 4333, -1416, -1230, -1122, 0, 0, 17, + 8048, 2398, -2167, -73, -3606, 3125, 398, 731, + -5973, 5705, -1032, 4679, 7305, 3134, 1301, -3858, + -89, 2938, 4359, -9155, -4805, -8407, 3673, -8645, + 0, 0, 187, 7355, 3145, -6719, -4432, -5939, + 2541, -2810, 9723, 778, -1105, 5687, -4174, 2534, + -4461, 1017, -244, 5481, -1655, -6765, -3350, -4894, + 1592, -2318, 8827, 0, 0, 196, 3588, 9631, + 3063, -4564, 6043, 2683, 2595, -2488, -2186, 173, + -6059, -8270, -2386, 409, 7441, -8608, 376, -4364, + 2321, -280, 97, 8331, -3022, -4721, 0, 0, + 117, -748, -10833, 1533, 4200, -2875, -997, -109, + -3661, -6119, 4454, 8808, -9189, 8294, 1521, 7265, + -2348, -5094, -948, -5400, -3193, 8914, 5763, 1716, + -1070, 0, 0, 2497, 399, -5201, -2038, 7843, + -376, 7567, -5073, 7616, -5537, 2086, -3453, -5544, + -56, -11648, -1314, 3546, -3432, -117, 8694, -4245, + 9621, 3098, -2582, -2351, 0, 0, 4386, -3104, + -3132, -10512, 566, 5217, 5128, 4967, 1348, 7035, + -1470, 91, -125, -3548, 8244, -3029, -10033, 2186, + 9745, -6440, -2074, 3638, -1477, -7045, -562, 0, + 0, 2154, 8116, -6102, 6570, 12998, -712, -4126, + -4996, 30, 1571, -6393, -12794, 425, 5036, 1190, + 5763, 5653, 12933, -6671, 5197, -2964, -3316, -6354, + -10554, -2652, 0, 0, 12618, -3737, 93, -5901, + 4262, -3364, 4444, 3103, -2767, 3403, 4925, -2584, + -989, 4977, -3714, -1965, 3076, 326, -2946, -2568, + 1026, -2980, 3362, -6132, -5966, 0, 0, 6001, + 48, -1979, -7275, 3476, -2096, 10591, 3793, 2629, + -447, -14747, -3689, -5525, 8358, 6883, -9703, -4556, + 7471, 2965, 4056, 13221, -7327, -3073, -2353, -6720, + 0, 0, 621, 11034, -44, -2828, 5978, -1850, + -1772, 3894, -7471, -1397, 945, -2028, -2928, -2240, + 3172, 2222, 4544, -4243, -5645, 3745, 2573, 3511, + -8206, -7286, 5700, 0, 0, 321, 10818, -4982, + 7813, -749, 9907, 1360, -1443, 568, -1103, 2305, + 6045, 2270, -1063, -1920, -3073, 5893, -3476, -11346, + -1657, -588, 2957, -2287, -8527, -8041, 0, 0, + 119, -268, 2372, -3040, 4979, -3789, -5630, 10619, + 5900, -5109, -4585, -3862, 10467, -3527, -385, -10034, + -9991, 4860, 984, 2362, 2311, -6804, 6324, 433, + 5291, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 32767, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 32767 +}; + +const MappingMatrix mapping_matrix_fifthoa_demixing = { 38, 38, 0 }; +const opus_int16 mapping_matrix_fifthoa_demixing_data[1444] = { + 3188, 3247, 3268, 3368, 3368, 3138, 3268, 3099, + 3211, 3368, 3099, 3247, 3211, 3368, 3368, 3368, + 3149, 3268, 3247, 3211, 3099, 3188, 3138, 3149, + 3099, 3188, 3368, 3149, 3188, 3247, 3268, 3138, + 3211, 3368, 3138, 3149, 0, 0, 118, -47, + -5011, 282, 333, -1497, -4584, 2908, 3388, -3647, + -2493, 1139, -2882, -1719, 3604, -2543, -4328, 5443, + 1286, -5498, -4583, 2510, -1743, -2556, 4168, 1446, + -290, 1812, -4074, -2377, 4152, 2847, 4991, 3980, + 393, 5072, 0, 0, 5489, -2235, 1507, -5326, + 4609, -1096, 2926, -3427, -3301, -3078, 4226, 1730, + 4627, 2561, 2966, -592, 143, -677, 4617, -755, + -956, -433, -5138, 3037, 157, -1394, -4498, -4984, + -3661, -4112, -3756, 4628, -570, 3356, 1605, 1803, + 0, 0, -162, 5162, 2132, 2392, 3556, -5141, + -1536, 2975, -3001, -3350, -2231, -5230, 1294, -4965, + 3494, 5230, -3292, -1359, -2945, -773, 2670, 4867, + -660, 3720, -3415, -5112, -3700, -1211, 407, 3013, + 763, 591, 2481, -2657, 5210, 784, 0, 0, + -156, 338, -4246, 510, 462, 3296, 2846, 3333, + -4292, 4574, 1940, -2986, -1275, 3701, 5022, -5250, + 5780, -2676, -1180, 1516, -4852, 4877, 342, -3923, + -5703, -2920, 379, -657, -361, -3346, 1044, 795, + 5257, -4004, 698, 1115, 0, 0, 47, -140, + -3292, -1097, 652, 855, -5260, -3691, -4470, 4521, + -3863, 1093, -5552, -2016, 3831, 334, -456, -1532, + 2068, 1788, 2054, -295, 3668, -2820, 328, -994, + 295, -3301, 5770, 4282, -6353, 5632, -1371, 5005, + 238, 4041, 0, 0, 6764, -1659, -2730, 5726, + 3715, -3216, -933, 531, -52, -345, 3022, -2818, + 4005, -1617, -1189, -3748, -3403, -3592, 4040, -3553, + -2806, -3444, 6023, -711, -3298, -2503, 2548, 5564, + 940, 1848, 1207, 4010, -3488, -358, -2511, -1966, + 0, 0, -64, -5039, 1403, -4455, 6240, 2189, + -1716, -4348, 4183, 3951, -4042, -3606, 2399, -4563, + 4050, -612, -395, 348, -5791, 391, -1440, -735, + 1398, 4359, -518, 2969, 6556, 1951, -518, -4993, + -925, 998, -569, -2934, 3460, 420, 0, 0, + 16, 5482, -4122, 770, 2082, 5020, -3961, 485, + -584, -793, 3, 5222, -1416, 3673, 78, 3549, + -937, -5723, 1673, -6162, -2540, 3082, -355, 1838, + -615, 4601, 2832, -359, -3346, 668, -3393, -1583, + -3774, -2206, 5754, -4961, 0, 0, -328, 299, + 2470, 317, 525, -4494, 2805, 2617, 2383, -2363, + -1037, 4085, 895, -4622, 3218, -6607, -3381, -5933, + 1397, 6394, -446, 5694, 14, -4510, 4329, 3690, + -334, 0, 2932, -2478, -2944, -577, -599, -230, + 1553, -4736, 0, 0, -324, 142, -3252, -867, + 1111, -1882, 3378, -6055, 6502, -6840, 4280, -2694, + -2876, 4190, 6454, 655, 1061, 626, -2669, -798, + 3192, -985, -898, -5482, -548, 2315, -558, 1302, + 900, 5747, -1325, 1599, -1384, -5749, 624, 1110, + 0, 0, 321, 312, 2188, 1322, 237, 708, + -304, 2463, 1500, -1094, -5112, -1010, -6799, 646, + 992, 1969, 3423, -3996, 2628, 4451, 3432, -2833, + -6101, -330, -3768, -3, -707, 5961, -4037, -3736, + 4080, 7254, -4113, 2151, 54, -2150, 0, 0, + 7735, 4064, -3884, -5240, 577, 2229, -3947, 2914, + 3555, 4011, 774, -3519, 1985, -3701, -3824, 330, + -905, 2085, 1155, 2176, 3006, 340, -5533, -3264, + -902, 3114, 344, -5060, 1524, 1805, 1926, 2350, + 1905, -3203, -2762, -4162, 0, 0, 193, -151, + -1434, 6289, 7354, 4234, 169, 2868, -1977, -1375, + -4987, 2345, 2742, 599, 939, -4837, 2688, 991, + -6907, 716, -1542, -4346, -1833, 1493, 3134, 2903, + -7019, -2835, 93, 4395, 621, 870, -2357, -975, + -2933, -127, 0, 0, -616, -5968, -3479, -1651, + 4932, -2445, -5512, -1451, 691, 739, 479, 4227, + -2886, 3853, 8, -501, 188, 1990, 3842, 2270, + 1662, -174, 1290, 2456, 67, -3267, -5535, 483, + 5721, -1642, 6501, -3432, 1184, -3246, 4101, -4880, + 0, 0, -465, 5264, -4812, 682, 1683, -4539, + 2916, -1985, 2899, 3324, 1060, -4398, -745, -2137, + -3827, 1044, 6225, 3609, -532, 1980, -6001, 564, + -209, -1299, 5336, -3605, -1484, 37, 19, -1295, + -665, -385, -6773, 3651, 6153, -1291, 0, 0, + 193, -415, 5166, -110, 626, 6743, -2860, 1425, + 1101, -1341, 80, -4533, 249, 4231, -119, -6009, + -2970, 5170, -822, -2610, 4527, 5948, 182, -2589, + 837, -5471, 371, -43, 373, -665, -1233, -626, + -7353, 2606, 1339, -1398, 0, 0, -533, 147, + 2075, -672, 1043, 3503, 4402, -4971, -3287, 3731, + -2606, 3817, 1972, -5603, 5114, 1185, -1318, 1906, + 3018, -1999, 343, -1943, 207, -6744, 913, -4060, + 645, -349, -5667, 4766, 5575, -1733, 1116, 160, + 1534, -5690, 0, 0, -137, -36, 1556, 1325, + 1553, -2230, 1188, 5296, -5104, 4673, 6295, 498, + -4723, 933, 2994, 4067, -4700, 1758, -4116, -1252, + 2444, -4092, 1653, -2802, 5069, 1133, 790, -2355, + -934, -6304, 1642, 2045, -4259, -3873, -213, 215, + 0, 0, -364, 423, 4888, -1316, 118, -950, + 4027, 114, 2961, -3136, -3012, -883, -6192, 1340, + -3210, -1193, 1376, 3128, 1596, -2994, -3194, 533, + 8502, 2487, -1485, 1032, 301, -8007, -577, 887, + 297, 7778, 3121, -1901, -94, -6401, 0, 0, + 9260, -1845, 668, 2787, -2255, 2699, -2512, -3737, + -3675, -3601, -1803, 210, -1701, -1442, -2700, 3457, + 2868, 2079, -2113, 3178, 1277, 3578, 5240, -2482, + 3324, 1020, -4027, 3835, -3758, -3633, -3170, -1310, + 2509, -3110, 713, 174, 0, 0, -399, 4969, + -2321, -7744, 6494, -3776, 1478, 758, -1794, -2233, + -4059, 4932, 2770, 4761, -3475, 1243, 829, -651, + -5358, -436, 2381, 1360, 2561, -3118, 858, -4366, + 3933, 3646, -43, -1310, -16, 924, 1197, 1415, + -5036, -376, 0, 0, 100, 1410, 1290, 3199, + 7091, -3638, -2641, 1118, 45, -441, 794, -974, + -5033, 889, 438, -3102, 895, 3555, 4672, 4795, + 1129, -2408, -2153, 1742, 159, -2040, 7578, -2006, + -5737, 1986, -5568, -6413, 2428, -1387, -2441, 667, + 0, 0, -37, -6031, -4434, -904, 3290, 1806, + 4736, 2516, -5905, -5927, 1754, -4300, -2468, -2203, + -4836, -672, 1444, -1591, -1631, -1789, 4311, -153, + -688, -1222, 1058, 3139, 4659, -353, 1543, 1838, + 2180, -1448, 2432, 6277, 5304, -1692, 0, 0, + -280, 4506, 807, -477, 823, 3550, 1427, -1856, + -3003, -3501, -1203, 2679, 933, 778, -4954, -1977, + -7458, 4687, 435, 7045, -4053, -3130, 257, -3917, + -6165, 1889, 927, 235, 1889, -1097, 1985, 630, + -2172, -2130, 7080, 4810, 0, 0, -300, 496, + 2808, 279, 667, -7179, -2661, -526, -2832, 1751, + 2849, 4829, -906, -4151, -1124, -3062, 8166, 5361, + -1656, -6017, 3265, 2551, -864, -432, -6966, 6295, + -168, 901, 442, -582, 269, 236, -3574, 799, + 472, 565, 0, 0, 805, -2466, 6208, -4592, + -170, -6701, -5610, 3678, -4242, 4561, -724, -5534, + 2415, 7354, 2761, 2699, -349, 3822, -2372, 1756, + -5523, -3445, -588, -5749, -3986, 9804, -3871, 5375, + -2308, 5504, -2766, -1651, 1472, 6832, 2705, -5104, + 0, 0, -700, -1179, 4402, 400, 1383, 939, + -1342, 6013, 2577, -3472, 472, 2883, 1450, -3917, + 2849, 5084, 4990, 5392, 342, -4925, -3329, -5372, + -2674, -6035, -5072, -836, 179, 2506, 7987, -3647, + -8202, -1437, 1891, 2400, 1607, -3611, 0, 0, + -4706, -4003, 9928, -379, 5557, 3738, -8789, 685, + 1937, -5157, 13388, 7995, -4119, -9909, -5079, 4804, + 5586, 774, -5430, 299, -9943, 3264, -3690, -3901, + -1133, -6199, 3182, 1544, 5467, 3686, -2639, 4068, + 1163, -185, -1299, -506, 0, 0, 843, 1005, + -1059, 467, -1279, -2259, 6057, -1694, -5885, 5342, + -5160, -3748, -1382, 4420, -697, -2000, -3808, 3100, + 2685, -4073, 531, 318, -7822, 2414, 2901, 3399, + -1340, 8449, 3685, 463, -3341, 2423, 2304, -2723, + 84, -2622, 0, 0, 12088, -265, 2562, -435, + -4348, -2426, 3538, 1552, 1279, 883, -4166, 2634, + -6130, 2994, 3729, -1570, -601, -1753, -5124, -2788, + -2096, -1920, -2649, 2793, -1079, -1952, 2983, -1530, + 2499, 1769, 1492, -6757, -2108, 2841, 1466, 2597, + 0, 0, -3830, -4093, 2448, 12720, 7737, -665, + -832, -9257, 2971, -2400, 791, 1873, 1072, -587, + -7440, 8055, 1531, -4736, 616, -1782, -2982, 9663, + -5057, -5926, 1610, -4489, 7033, -8658, 6010, -5673, + 5648, 812, -271, -1802, -4500, 4392, 0, 0, + -888, -327, 3373, -1084, 7959, 2430, 1898, -2360, + -1820, -1377, -1090, -4436, -3422, -1106, -3230, 3876, + -41, -5128, 6375, -1848, -3824, 5844, 617, -1957, + 4232, 1345, -1439, -83, 3046, -214, 5458, -5566, + -4387, -3738, -5740, 8657, 0, 0, 6978, 6239, + -3686, -981, -2854, 78, 5859, -357, 4618, 7391, + -138, 971, -5799, 2135, 4478, -7004, -5949, 1668, + -6933, -1163, 7010, -5624, 2990, 6192, -8075, 3567, + -8308, 2236, -5098, -2120, -4355, -4238, 4955, 10230, + 692, -5606, 0, 0, -1348, -7069, -12, -4927, + 1211, 651, 1360, 7744, 3404, 5069, -2438, -105, + 2332, 1494, -4686, 1336, -3628, -881, 2474, 1736, + -26, -257, 2135, -4452, 446, -641, -4704, 2605, + -6436, 6662, -4939, 990, -1100, -3782, 5028, 4753, + 0, 0, -2875, 6410, 3518, 3950, 1271, 869, + -2842, -5837, 1532, -2899, 1140, -597, 1712, -1988, + -4819, -4783, 4773, -8796, 2240, -4596, 3565, -4853, + -556, -3974, 7366, -4370, 3113, -3548, 3552, -5450, + 3869, 2514, 6736, -4570, 6074, 3151, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 32767, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 32767 +}; diff --git a/src/libs/opus/src/mapping_matrix.h b/src/libs/opus/src/mapping_matrix.h index 98bc82df..53646cb1 100644 --- a/src/libs/opus/src/mapping_matrix.h +++ b/src/libs/opus/src/mapping_matrix.h @@ -117,6 +117,12 @@ extern const opus_int16 mapping_matrix_soa_mixing_data[121]; extern const MappingMatrix mapping_matrix_toa_mixing; extern const opus_int16 mapping_matrix_toa_mixing_data[324]; +extern const MappingMatrix mapping_matrix_fourthoa_mixing; +extern const opus_int16 mapping_matrix_fourthoa_mixing_data[729]; + +extern const MappingMatrix mapping_matrix_fifthoa_mixing; +extern const opus_int16 mapping_matrix_fifthoa_mixing_data[1444]; + extern const MappingMatrix mapping_matrix_foa_demixing; extern const opus_int16 mapping_matrix_foa_demixing_data[36]; @@ -126,6 +132,12 @@ extern const opus_int16 mapping_matrix_soa_demixing_data[121]; extern const MappingMatrix mapping_matrix_toa_demixing; extern const opus_int16 mapping_matrix_toa_demixing_data[324]; +extern const MappingMatrix mapping_matrix_fourthoa_demixing; +extern const opus_int16 mapping_matrix_fourthoa_demixing_data[729]; + +extern const MappingMatrix mapping_matrix_fifthoa_demixing; +extern const opus_int16 mapping_matrix_fifthoa_demixing_data[1444]; + #ifdef __cplusplus } #endif diff --git a/src/libs/opus/src/meson.build b/src/libs/opus/src/meson.build index cc07ff06..5537c67c 100644 --- a/src/libs/opus/src/meson.build +++ b/src/libs/opus/src/meson.build @@ -17,7 +17,7 @@ opus_lib = library('opus', darwin_versions: macosversion, c_args: opus_lib_c_args, include_directories: opus_includes, - link_with: [celt_lib, silk_lib], + link_whole: [celt_lib, silk_lib, dnn_lib], dependencies: libm, install: true) diff --git a/src/libs/opus/src/mlp.c b/src/libs/opus/src/mlp.c index 964c6a98..e658ccde 100644 --- a/src/libs/opus/src/mlp.c +++ b/src/libs/opus/src/mlp.c @@ -33,35 +33,23 @@ #include "opus_types.h" #include "opus_defines.h" #include "arch.h" -#include "tansig_table.h" #include "mlp.h" +#define fmadd(a, b, c) ((a)*(b)+(c)) static OPUS_INLINE float tansig_approx(float x) { - int i; - float y, dy; - float sign=1; - /* Tests are reversed to catch NaNs */ - if (!(x<8)) - return 1; - if (!(x>-8)) - return -1; -#ifndef FIXED_POINT - /* Another check in case of -ffast-math */ - if (celt_isnan(x)) - return 0; -#endif - if (x<0) - { - x=-x; - sign=-1; - } - i = (int)floor(.5f+25*x); - x -= .04f*i; - y = tansig_table[i]; - dy = 1-y*y; - y = y + x*dy*(1 - y*x); - return sign*y; + const float N0 = 952.52801514f; + const float N1 = 96.39235687f; + const float N2 = 0.60863042f; + const float D0 = 952.72399902f; + const float D1 = 413.36801147f; + const float D2 = 11.88600922f; + float X2, num, den; + X2 = x*x; + num = fmadd(fmadd(N2, X2, N1), X2, N0); + den = fmadd(fmadd(D2, X2, D1), X2, D0); + num = num*x/den; + return MAX32(-1.f, MIN32(1.f, num)); } static OPUS_INLINE float sigmoid_approx(float x) @@ -79,7 +67,7 @@ static void gemm_accum(float *out, const opus_int8 *weights, int rows, int cols, } } -void compute_dense(const DenseLayer *layer, float *output, const float *input) +void analysis_compute_dense(const AnalysisDenseLayer *layer, float *output, const float *input) { int i; int N, M; @@ -101,7 +89,7 @@ void compute_dense(const DenseLayer *layer, float *output, const float *input) } } -void compute_gru(const GRULayer *gru, float *state, const float *input) +void analysis_compute_gru(const AnalysisGRULayer *gru, float *state, const float *input) { int i; int N, M; diff --git a/src/libs/opus/src/mlp.h b/src/libs/opus/src/mlp.h index d7670550..e6b1a8f7 100644 --- a/src/libs/opus/src/mlp.h +++ b/src/libs/opus/src/mlp.h @@ -24,8 +24,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _MLP_H_ -#define _MLP_H_ +#ifndef MLP_H_ +#define MLP_H_ #include "opus_types.h" @@ -39,7 +39,7 @@ typedef struct { int nb_inputs; int nb_neurons; int sigmoid; -} DenseLayer; +} AnalysisDenseLayer; typedef struct { const opus_int8 *bias; @@ -47,14 +47,14 @@ typedef struct { const opus_int8 *recurrent_weights; int nb_inputs; int nb_neurons; -} GRULayer; +} AnalysisGRULayer; -extern const DenseLayer layer0; -extern const GRULayer layer1; -extern const DenseLayer layer2; +extern const AnalysisDenseLayer layer0; +extern const AnalysisGRULayer layer1; +extern const AnalysisDenseLayer layer2; -void compute_dense(const DenseLayer *layer, float *output, const float *input); +void analysis_compute_dense(const AnalysisDenseLayer *layer, float *output, const float *input); -void compute_gru(const GRULayer *gru, float *state, const float *input); +void analysis_compute_gru(const AnalysisGRULayer *gru, float *state, const float *input); -#endif /* _MLP_H_ */ +#endif /* MLP_H_ */ diff --git a/src/libs/opus/src/mlp_data.c b/src/libs/opus/src/mlp_data.c index ae4178df..65f7448e 100644 --- a/src/libs/opus/src/mlp_data.c +++ b/src/libs/opus/src/mlp_data.c @@ -651,20 +651,20 @@ static const opus_int8 layer2_bias[2] = { 14, 117 }; -const DenseLayer layer0 = { +const AnalysisDenseLayer layer0 = { layer0_bias, layer0_weights, 25, 32, 0 }; -const GRULayer layer1 = { +const AnalysisGRULayer layer1 = { layer1_bias, layer1_weights, layer1_recur_weights, 32, 24 }; -const DenseLayer layer2 = { +const AnalysisDenseLayer layer2 = { layer2_bias, layer2_weights, 24, 2, 1 diff --git a/src/libs/opus/src/opus.c b/src/libs/opus/src/opus.c index 538b5ea7..816a4dd5 100644 --- a/src/libs/opus/src/opus.c +++ b/src/libs/opus/src/opus.c @@ -194,7 +194,8 @@ int opus_packet_get_samples_per_frame(const unsigned char *data, int opus_packet_parse_impl(const unsigned char *data, opus_int32 len, int self_delimited, unsigned char *out_toc, const unsigned char *frames[48], opus_int16 size[48], - int *payload_offset, opus_int32 *packet_offset) + int *payload_offset, opus_int32 *packet_offset, + const unsigned char **padding, opus_int32 *padding_len) { int i, bytes; int count; @@ -337,6 +338,11 @@ int opus_packet_parse_impl(const unsigned char *data, opus_int32 len, data += size[i]; } + if (padding != NULL) + { + *padding = data; + *padding_len = pad; + } if (packet_offset) *packet_offset = pad+(opus_int32)(data-data0); @@ -351,6 +357,6 @@ int opus_packet_parse(const unsigned char *data, opus_int32 len, opus_int16 size[48], int *payload_offset) { return opus_packet_parse_impl(data, len, 0, out_toc, - frames, size, payload_offset, NULL); + frames, size, payload_offset, NULL, NULL, NULL); } diff --git a/src/libs/opus/src/opus_decoder.c b/src/libs/opus/src/opus_decoder.c index 6520e748..b57c8094 100644 --- a/src/libs/opus/src/opus_decoder.c +++ b/src/libs/opus/src/opus_decoder.c @@ -52,6 +52,15 @@ #include "mathops.h" #include "cpu_support.h" +#ifdef ENABLE_DEEP_PLC +#include "dred_rdovae_dec_data.h" +#include "dred_rdovae_dec.h" +#endif + +#ifdef ENABLE_OSCE +#include "osce.h" +#endif + struct OpusDecoder { int celt_dec_offset; int silk_dec_offset; @@ -59,7 +68,11 @@ struct OpusDecoder { opus_int32 Fs; /** Sampling rate (at the API level) */ silk_DecControlStruct DecControl; int decode_gain; + int complexity; int arch; +#ifdef ENABLE_DEEP_PLC + LPCNetPLCState lpcnet; +#endif /* Everything beyond this point gets cleared on a reset */ #define OPUS_DECODER_RESET_START stream_channels @@ -135,6 +148,7 @@ int opus_decoder_init(OpusDecoder *st, opus_int32 Fs, int channels) silk_dec = (char*)st+st->silk_dec_offset; celt_dec = (CELTDecoder*)((char*)st+st->celt_dec_offset); st->stream_channels = st->channels = channels; + st->complexity = 0; st->Fs = Fs; st->DecControl.API_sampleRate = st->Fs; @@ -152,6 +166,9 @@ int opus_decoder_init(OpusDecoder *st, opus_int32 Fs, int channels) st->prev_mode = 0; st->frame_size = Fs/400; +#ifdef ENABLE_DEEP_PLC + lpcnet_plc_init( &st->lpcnet); +#endif st->arch = opus_select_arch(); return OPUS_OK; } @@ -370,7 +387,7 @@ static int opus_decode_frame(OpusDecoder *st, const unsigned char *data, pcm_ptr = pcm_silk; if (st->prev_mode==MODE_CELT_ONLY) - silk_InitDecoder( silk_dec ); + silk_ResetDecoder( silk_dec ); /* The SILK PLC cannot produce frames of less than 10 ms */ st->DecControl.payloadSize_ms = IMAX(10, 1000 * audiosize / st->Fs); @@ -394,14 +411,28 @@ static int opus_decode_frame(OpusDecoder *st, const unsigned char *data, st->DecControl.internalSampleRate = 16000; } } + st->DecControl.enable_deep_plc = st->complexity >= 5; +#ifdef ENABLE_OSCE + st->DecControl.osce_method = OSCE_METHOD_NONE; +#ifndef DISABLE_LACE + if (st->complexity >= 6) {st->DecControl.osce_method = OSCE_METHOD_LACE;} +#endif +#ifndef DISABLE_NOLACE + if (st->complexity >= 7) {st->DecControl.osce_method = OSCE_METHOD_NOLACE;} +#endif +#endif - lost_flag = data == NULL ? 1 : 2 * decode_fec; + lost_flag = data == NULL ? 1 : 2 * !!decode_fec; decoded_samples = 0; do { /* Call SILK decoder */ int first_frame = decoded_samples == 0; silk_ret = silk_Decode( silk_dec, &st->DecControl, - lost_flag, first_frame, &dec, pcm_ptr, &silk_frame_size, st->arch ); + lost_flag, first_frame, &dec, pcm_ptr, &silk_frame_size, +#ifdef ENABLE_DEEP_PLC + &st->lpcnet, +#endif + st->arch ); if( silk_ret ) { if (lost_flag) { /* PLC failure should not be fatal */ @@ -521,8 +552,12 @@ static int opus_decode_frame(OpusDecoder *st, const unsigned char *data, if (mode != st->prev_mode && st->prev_mode > 0 && !st->prev_redundancy) MUST_SUCCEED(celt_decoder_ctl(celt_dec, OPUS_RESET_STATE)); /* Decode CELT */ - celt_ret = celt_decode_with_ec(celt_dec, decode_fec ? NULL : data, - len, pcm, celt_frame_size, &dec, celt_accum); + celt_ret = celt_decode_with_ec_dred(celt_dec, decode_fec ? NULL : data, + len, pcm, celt_frame_size, &dec, celt_accum +#ifdef ENABLE_DEEP_PLC + , &st->lpcnet +#endif + ); } else { unsigned char silence[2] = {0xFF, 0xFF}; if (!celt_accum) @@ -634,7 +669,7 @@ static int opus_decode_frame(OpusDecoder *st, const unsigned char *data, int opus_decode_native(OpusDecoder *st, const unsigned char *data, opus_int32 len, opus_val16 *pcm, int frame_size, int decode_fec, - int self_delimited, opus_int32 *packet_offset, int soft_clip) + int self_delimited, opus_int32 *packet_offset, int soft_clip, const OpusDRED *dred, opus_int32 dred_offset) { int i, nb_samples; int count, offset; @@ -648,6 +683,35 @@ int opus_decode_native(OpusDecoder *st, const unsigned char *data, /* For FEC/PLC, frame_size has to be to have a multiple of 2.5 ms */ if ((decode_fec || len==0 || data==NULL) && frame_size%(st->Fs/400)!=0) return OPUS_BAD_ARG; +#ifdef ENABLE_DRED + if (dred != NULL && dred->process_stage == 2) { + int F10; + int features_per_frame; + int needed_feature_frames; + int init_frames; + lpcnet_plc_fec_clear(&st->lpcnet); + F10 = st->Fs/100; + /* if blend==0, the last PLC call was "update" and we need to feed two extra 10-ms frames. */ + init_frames = (st->lpcnet.blend == 0) ? 2 : 0; + features_per_frame = IMAX(1, frame_size/F10); + needed_feature_frames = init_frames + features_per_frame; + lpcnet_plc_fec_clear(&st->lpcnet); + for (i=0;idred_offset*F10/4)/F10); + if (feature_offset <= 4*dred->nb_latents-1 && feature_offset >= 0) { + lpcnet_plc_fec_add(&st->lpcnet, dred->fec_features+feature_offset*DRED_NUM_FEATURES); + } else { + if (feature_offset >= 0) lpcnet_plc_fec_add(&st->lpcnet, NULL); + } + + } + } +#else + (void)dred; + (void)dred_offset; +#endif if (len==0 || data==NULL) { int pcm_count=0; @@ -672,7 +736,7 @@ int opus_decode_native(OpusDecoder *st, const unsigned char *data, packet_stream_channels = opus_packet_get_nb_channels(data); count = opus_packet_parse_impl(data, len, self_delimited, &toc, NULL, - size, &offset, packet_offset); + size, &offset, packet_offset, NULL, NULL); if (count<0) return count; @@ -684,12 +748,12 @@ int opus_decode_native(OpusDecoder *st, const unsigned char *data, int ret; /* If no FEC can be present, run the PLC (recursive call) */ if (frame_size < packet_frame_size || packet_mode == MODE_CELT_ONLY || st->mode == MODE_CELT_ONLY) - return opus_decode_native(st, NULL, 0, pcm, frame_size, 0, 0, NULL, soft_clip); + return opus_decode_native(st, NULL, 0, pcm, frame_size, 0, 0, NULL, soft_clip, NULL, 0); /* Otherwise, run the PLC on everything except the size for which we might have FEC */ duration_copy = st->last_packet_duration; if (frame_size-packet_frame_size!=0) { - ret = opus_decode_native(st, NULL, 0, pcm, frame_size-packet_frame_size, 0, 0, NULL, soft_clip); + ret = opus_decode_native(st, NULL, 0, pcm, frame_size-packet_frame_size, 0, 0, NULL, soft_clip, NULL, 0); if (ret<0) { st->last_packet_duration = duration_copy; @@ -753,7 +817,7 @@ int opus_decode(OpusDecoder *st, const unsigned char *data, { if(frame_size<=0) return OPUS_BAD_ARG; - return opus_decode_native(st, data, len, pcm, frame_size, decode_fec, 0, NULL, 0); + return opus_decode_native(st, data, len, pcm, frame_size, decode_fec, 0, NULL, 0, NULL, 0); } #ifndef DISABLE_FLOAT_API @@ -781,7 +845,7 @@ int opus_decode_float(OpusDecoder *st, const unsigned char *data, celt_assert(st->channels == 1 || st->channels == 2); ALLOC(out, frame_size*st->channels, opus_int16); - ret = opus_decode_native(st, data, len, out, frame_size, decode_fec, 0, NULL, 0); + ret = opus_decode_native(st, data, len, out, frame_size, decode_fec, 0, NULL, 0, NULL, 0); if (ret > 0) { for (i=0;ichannels;i++) @@ -819,7 +883,7 @@ int opus_decode(OpusDecoder *st, const unsigned char *data, celt_assert(st->channels == 1 || st->channels == 2); ALLOC(out, frame_size*st->channels, float); - ret = opus_decode_native(st, data, len, out, frame_size, decode_fec, 0, NULL, 1); + ret = opus_decode_native(st, data, len, out, frame_size, decode_fec, 0, NULL, 1, NULL, 0); if (ret > 0) { for (i=0;ichannels;i++) @@ -834,7 +898,7 @@ int opus_decode_float(OpusDecoder *st, const unsigned char *data, { if(frame_size<=0) return OPUS_BAD_ARG; - return opus_decode_native(st, data, len, pcm, frame_size, decode_fec, 0, NULL, 0); + return opus_decode_native(st, data, len, pcm, frame_size, decode_fec, 0, NULL, 0, NULL, 0); } #endif @@ -864,6 +928,27 @@ int opus_decoder_ctl(OpusDecoder *st, int request, ...) *value = st->bandwidth; } break; + case OPUS_SET_COMPLEXITY_REQUEST: + { + opus_int32 value = va_arg(ap, opus_int32); + if(value<0 || value>10) + { + goto bad_arg; + } + st->complexity = value; + celt_decoder_ctl(celt_dec, OPUS_SET_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 OPUS_GET_FINAL_RANGE_REQUEST: { opus_uint32 *value = va_arg(ap, opus_uint32*); @@ -881,9 +966,12 @@ int opus_decoder_ctl(OpusDecoder *st, int request, ...) ((char*)&st->OPUS_DECODER_RESET_START - (char*)st)); celt_decoder_ctl(celt_dec, OPUS_RESET_STATE); - silk_InitDecoder( silk_dec ); + silk_ResetDecoder( silk_dec ); st->stream_channels = st->channels; st->frame_size = st->Fs/400; +#ifdef ENABLE_DEEP_PLC + lpcnet_plc_reset( &st->lpcnet ); +#endif } break; case OPUS_GET_SAMPLE_RATE_REQUEST: @@ -959,6 +1047,20 @@ int opus_decoder_ctl(OpusDecoder *st, int request, ...) ret = celt_decoder_ctl(celt_dec, OPUS_GET_PHASE_INVERSION_DISABLED(value)); } break; +#ifdef USE_WEIGHTS_FILE + case OPUS_SET_DNN_BLOB_REQUEST: + { + const unsigned char *data = va_arg(ap, const unsigned char *); + opus_int32 len = va_arg(ap, opus_int32); + if(len<0 || data == NULL) + { + goto bad_arg; + } + ret = lpcnet_plc_load_model(&st->lpcnet, data, len); + ret = silk_LoadOSCEModels(silk_dec, data, len) || ret; + } + break; +#endif default: /*fprintf(stderr, "unknown opus_decoder_ctl() request: %d", request);*/ ret = OPUS_UNIMPLEMENTED; @@ -1034,8 +1136,373 @@ int opus_packet_get_nb_samples(const unsigned char packet[], opus_int32 len, return samples; } +int opus_packet_has_lbrr(const unsigned char packet[], opus_int32 len) +{ + int ret; + const unsigned char *frames[48]; + opus_int16 size[48]; + int packet_mode, packet_frame_size, packet_stream_channels; + int nb_frames=1; + int lbrr; + + packet_mode = opus_packet_get_mode(packet); + if (packet_mode == MODE_CELT_ONLY) + return 0; + packet_frame_size = opus_packet_get_samples_per_frame(packet, 48000); + if (packet_frame_size > 960) + nb_frames = packet_frame_size/960; + packet_stream_channels = opus_packet_get_nb_channels(packet); + ret = opus_packet_parse(packet, len, NULL, frames, size, NULL); + if (ret <= 0) + return ret; + lbrr = (frames[0][0] >> (7-nb_frames)) & 0x1; + if (packet_stream_channels == 2) + lbrr = lbrr || ((frames[0][0] >> (6-2*nb_frames)) & 0x1); + return lbrr; +} + int opus_decoder_get_nb_samples(const OpusDecoder *dec, const unsigned char packet[], opus_int32 len) { return opus_packet_get_nb_samples(packet, len, dec->Fs); } + +struct OpusDREDDecoder { +#ifdef ENABLE_DRED + RDOVAEDec model; +#endif + int loaded; + int arch; + opus_uint32 magic; +}; + +#if defined(ENABLE_DRED) && (defined(ENABLE_HARDENING) || defined(ENABLE_ASSERTIONS)) +static void validate_dred_decoder(OpusDREDDecoder *st) +{ + celt_assert(st->magic == 0xD8EDDEC0); +#ifdef OPUS_ARCHMASK + celt_assert(st->arch >= 0); + celt_assert(st->arch <= OPUS_ARCHMASK); +#endif +} +#define VALIDATE_DRED_DECODER(st) validate_dred_decoder(st) +#else +#define VALIDATE_DRED_DECODER(st) +#endif + + +int opus_dred_decoder_get_size(void) +{ + return sizeof(OpusDREDDecoder); +} + +#ifdef ENABLE_DRED +int dred_decoder_load_model(OpusDREDDecoder *dec, const unsigned char *data, int len) +{ + WeightArray *list; + int ret; + parse_weights(&list, data, len); + ret = init_rdovaedec(&dec->model, list); + opus_free(list); + if (ret == 0) dec->loaded = 1; + return (ret == 0) ? OPUS_OK : OPUS_BAD_ARG; +} +#endif + +int opus_dred_decoder_init(OpusDREDDecoder *dec) +{ + int ret = 0; + dec->loaded = 0; +#if defined(ENABLE_DRED) && !defined(USE_WEIGHTS_FILE) + ret = init_rdovaedec(&dec->model, rdovaedec_arrays); + if (ret == 0) dec->loaded = 1; +#endif + dec->arch = opus_select_arch(); + /* To make sure nobody forgets to init, use a magic number. */ + dec->magic = 0xD8EDDEC0; + return (ret == 0) ? OPUS_OK : OPUS_UNIMPLEMENTED; +} + +OpusDREDDecoder *opus_dred_decoder_create(int *error) +{ + int ret; + OpusDREDDecoder *dec; + dec = (OpusDREDDecoder *)opus_alloc(opus_dred_decoder_get_size()); + if (dec == NULL) + { + if (error) + *error = OPUS_ALLOC_FAIL; + return NULL; + } + ret = opus_dred_decoder_init(dec); + if (error) + *error = ret; + if (ret != OPUS_OK) + { + opus_free(dec); + dec = NULL; + } + return dec; +} + +void opus_dred_decoder_destroy(OpusDREDDecoder *dec) +{ + if (dec) dec->magic = 0xDE57801D; + opus_free(dec); +} + +int opus_dred_decoder_ctl(OpusDREDDecoder *dred_dec, int request, ...) +{ +#ifdef ENABLE_DRED + int ret = OPUS_OK; + va_list ap; + + va_start(ap, request); + (void)dred_dec; + switch (request) + { +# ifdef USE_WEIGHTS_FILE + case OPUS_SET_DNN_BLOB_REQUEST: + { + const unsigned char *data = va_arg(ap, const unsigned char *); + opus_int32 len = va_arg(ap, opus_int32); + if(len<0 || data == NULL) + { + goto bad_arg; + } + return dred_decoder_load_model(dred_dec, data, len); + } + break; +# endif + default: + /*fprintf(stderr, "unknown opus_decoder_ctl() request: %d", request);*/ + ret = OPUS_UNIMPLEMENTED; + break; + } + va_end(ap); + return ret; +# ifdef USE_WEIGHTS_FILE +bad_arg: + va_end(ap); + return OPUS_BAD_ARG; +# endif +#else + (void)dred_dec; + (void)request; + return OPUS_UNIMPLEMENTED; +#endif +} + +#ifdef ENABLE_DRED +static int dred_find_payload(const unsigned char *data, opus_int32 len, const unsigned char **payload, int *dred_frame_offset) +{ + const unsigned char *data0; + int len0; + int frame = 0; + int ret; + const unsigned char *frames[48]; + opus_int16 size[48]; + int frame_size; + + *payload = NULL; + /* Get the padding section of the packet. */ + ret = opus_packet_parse_impl(data, len, 0, NULL, frames, size, NULL, NULL, &data0, &len0); + if (ret < 0) + return ret; + frame_size = opus_packet_get_samples_per_frame(data, 48000); + data = data0; + len = len0; + /* Scan extensions in order until we find the earliest frame with DRED data. */ + while (len > 0) + { + opus_int32 header_size; + int id, L; + len0 = len; + data0 = data; + id = *data0 >> 1; + L = *data0 & 0x1; + len = skip_extension(&data, len, &header_size); + if (len < 0) + break; + if (id == 1) + { + if (L==0) + { + frame++; + } else { + frame += data0[1]; + } + } else if (id == DRED_EXTENSION_ID) + { + const unsigned char *curr_payload; + opus_int32 curr_payload_len; + curr_payload = data0+header_size; + curr_payload_len = (data-data0)-header_size; + /* DRED position in the packet, in units of 2.5 ms like for the signaled DRED offset. */ + *dred_frame_offset = frame*frame_size/120; +#ifdef DRED_EXPERIMENTAL_VERSION + /* Check that temporary extension type and version match. + This check will be removed once extension is finalized. */ + if (curr_payload_len > DRED_EXPERIMENTAL_BYTES && curr_payload[0] == 'D' && curr_payload[1] == DRED_EXPERIMENTAL_VERSION) { + *payload = curr_payload+2; + return curr_payload_len-2; + } +#else + if (curr_payload_len > 0) { + *payload = curr_payload; + return curr_payload_len; + } +#endif + } + } + return 0; +} +#endif + +int opus_dred_get_size(void) +{ +#ifdef ENABLE_DRED + return sizeof(OpusDRED); +#else + return 0; +#endif +} + +OpusDRED *opus_dred_alloc(int *error) +{ +#ifdef ENABLE_DRED + OpusDRED *dec; + dec = (OpusDRED *)opus_alloc(opus_dred_get_size()); + if (dec == NULL) + { + if (error) + *error = OPUS_ALLOC_FAIL; + return NULL; + } + return dec; +#else + if (error) + *error = OPUS_UNIMPLEMENTED; + return NULL; +#endif +} + +void opus_dred_free(OpusDRED *dec) +{ +#ifdef ENABLE_DRED + opus_free(dec); +#else + (void)dec; +#endif +} + +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) +{ +#ifdef ENABLE_DRED + const unsigned char *payload; + opus_int32 payload_len; + int dred_frame_offset=0; + VALIDATE_DRED_DECODER(dred_dec); + if (!dred_dec->loaded) return OPUS_UNIMPLEMENTED; + dred->process_stage = -1; + payload_len = dred_find_payload(data, len, &payload, &dred_frame_offset); + if (payload_len < 0) + return payload_len; + if (payload != NULL) + { + int offset; + int min_feature_frames; + offset = 100*max_dred_samples/sampling_rate; + min_feature_frames = IMIN(2 + offset, 2*DRED_NUM_REDUNDANCY_FRAMES); + dred_ec_decode(dred, payload, payload_len, min_feature_frames, dred_frame_offset); + if (!defer_processing) + opus_dred_process(dred_dec, dred, dred); + if (dred_end) *dred_end = IMAX(0, -dred->dred_offset*sampling_rate/400); + return IMAX(0, dred->nb_latents*sampling_rate/25 - dred->dred_offset* sampling_rate/400); + } + if (dred_end) *dred_end = 0; + return 0; +#else + (void)dred_dec; + (void)dred; + (void)data; + (void)len; + (void)max_dred_samples; + (void)sampling_rate; + (void)defer_processing; + (void)dred_end; + return OPUS_UNIMPLEMENTED; +#endif +} + +int opus_dred_process(OpusDREDDecoder *dred_dec, const OpusDRED *src, OpusDRED *dst) +{ +#ifdef ENABLE_DRED + if (dred_dec == NULL || src == NULL || dst == NULL || (src->process_stage != 1 && src->process_stage != 2)) + return OPUS_BAD_ARG; + VALIDATE_DRED_DECODER(dred_dec); + if (!dred_dec->loaded) return OPUS_UNIMPLEMENTED; + if (src != dst) + OPUS_COPY(dst, src, 1); + if (dst->process_stage == 2) + return OPUS_OK; + DRED_rdovae_decode_all(&dred_dec->model, dst->fec_features, dst->state, dst->latents, dst->nb_latents, dred_dec->arch); + dst->process_stage = 2; + return OPUS_OK; +#else + (void)dred_dec; + (void)src; + (void)dst; + return OPUS_UNIMPLEMENTED; +#endif +} + +int opus_decoder_dred_decode(OpusDecoder *st, const OpusDRED *dred, opus_int32 dred_offset, opus_int16 *pcm, opus_int32 frame_size) +{ +#ifdef ENABLE_DRED + VARDECL(float, out); + int ret, i; + ALLOC_STACK; + + if(frame_size<=0) + { + RESTORE_STACK; + return OPUS_BAD_ARG; + } + + celt_assert(st->channels == 1 || st->channels == 2); + ALLOC(out, frame_size*st->channels, float); + + ret = opus_decode_native(st, NULL, 0, out, frame_size, 0, 0, NULL, 1, dred, dred_offset); + if (ret > 0) + { + for (i=0;ichannels;i++) + pcm[i] = FLOAT2INT16(out[i]); + } + RESTORE_STACK; + return ret; +#else + (void)st; + (void)dred; + (void)dred_offset; + (void)pcm; + (void)frame_size; + return OPUS_UNIMPLEMENTED; +#endif +} + +int opus_decoder_dred_decode_float(OpusDecoder *st, const OpusDRED *dred, opus_int32 dred_offset, float *pcm, opus_int32 frame_size) +{ +#ifdef ENABLE_DRED + if(frame_size<=0) + return OPUS_BAD_ARG; + return opus_decode_native(st, NULL, 0, pcm, frame_size, 0, 0, NULL, 0, dred, dred_offset); +#else + (void)st; + (void)dred; + (void)dred_offset; + (void)pcm; + (void)frame_size; + return OPUS_UNIMPLEMENTED; +#endif +} diff --git a/src/libs/opus/src/opus_demo.c b/src/libs/opus/src/opus_demo.c index 4cc26a6c..2876fff8 100644 --- a/src/libs/opus/src/opus_demo.c +++ b/src/libs/opus/src/opus_demo.c @@ -39,9 +39,80 @@ #include "opus_types.h" #include "opus_private.h" #include "opus_multistream.h" +#ifdef ENABLE_LOSSGEN +#include "lossgen.h" +#endif #define MAX_PACKET 1500 +#ifdef USE_WEIGHTS_FILE +# if __unix__ +# include +# include +# include +# include +/* When available, mmap() is preferable to reading the file, as it leads to + better resource utilization, especially if multiple processes are using the same + file (mapping will be shared in cache). */ +void *load_blob(const char *filename, int *len) { + int fd; + void *data; + struct stat st; + if (stat(filename, &st)) { + *len = 0; + return NULL; + } + *len = st.st_size; + fd = open(filename, O_RDONLY); + if (fd<0) { + *len = 0; + return NULL; + } + data = mmap(NULL, *len, PROT_READ, MAP_SHARED, fd, 0); + if (data == MAP_FAILED) { + *len = 0; + data = NULL; + } + close(fd); + return data; +} +void free_blob(void *blob, int len) { + if (blob) munmap(blob, len); +} +# else +void *load_blob(const char *filename, int *len) { + FILE *file; + void *data; + file = fopen(filename, "r"); + if (file == NULL) + { + perror("could not open blob file"); + *len = 0; + return NULL; + } + fseek(file, 0L, SEEK_END); + *len = ftell(file); + fseek(file, 0L, SEEK_SET); + if (*len <= 0) { + *len = 0; + return NULL; + } + data = malloc(*len); + if (!data) { + *len = 0; + return NULL; + } + *len = fread(data, 1, *len, file); + return data; +} +void free_blob(void *blob, int len) { + free(blob); + (void)len; +} +# endif +#endif + + void print_usage( char* argv[] ) { fprintf(stderr, "Usage: %s [-e] " @@ -58,11 +129,17 @@ void print_usage( char* argv[] ) fprintf(stderr, "-bandwidth : audio bandwidth (from narrowband to fullband); default: sampling rate\n" ); fprintf(stderr, "-framesize <2.5|5|10|20|40|60|80|100|120> : frame size in ms; default: 20 \n" ); fprintf(stderr, "-max_payload : maximum payload size in bytes, default: 1024\n" ); - fprintf(stderr, "-complexity : complexity, 0 (lowest) ... 10 (highest); default: 10\n" ); + fprintf(stderr, "-complexity : encoder complexity, 0 (lowest) ... 10 (highest); default: 10\n" ); + fprintf(stderr, "-dec_complexity : decoder complexity, 0 (lowest) ... 10 (highest); default: 0\n" ); fprintf(stderr, "-inbandfec : enable SILK inband FEC\n" ); fprintf(stderr, "-forcemono : force mono encoding, even for stereo input\n" ); fprintf(stderr, "-dtx : enable SILK DTX\n" ); - fprintf(stderr, "-loss : simulate packet loss, in percent (0-100); default: 0\n" ); + fprintf(stderr, "-loss : optimize for loss percentage and simulate packet loss, in percent (0-100); default: 0\n" ); +#ifdef ENABLE_LOSSGEN + fprintf(stderr, "-sim_loss : simulate realistic (bursty) packet loss from percentage, using generative model\n" ); +#endif + fprintf(stderr, "-lossfile : simulate packet loss, reading loss from file\n" ); + fprintf(stderr, "-dred : add Deep REDundancy (in units of 10-ms frames)\n" ); } static void int_to_char(opus_uint32 i, unsigned char ch[4]) @@ -80,6 +157,7 @@ static opus_uint32 char_to_int(unsigned char ch[4]) } #define check_encoder_option(decode_only, opt) do {if (decode_only) {fprintf(stderr, "option %s is only for encoding\n", opt); goto failure;}} while(0) +#define check_decoder_option(encode_only, opt) do {if (encode_only) {fprintf(stderr, "option %s is only for decoding\n", opt); goto failure;}} while(0) static const int silk8_test[][4] = { {MODE_SILK_ONLY, OPUS_BANDWIDTH_NARROWBAND, 960*3, 1}, @@ -207,6 +285,68 @@ static OpusDecoder *ms_opus_decoder_create(opus_int32 Fs, int channels, int *err } #endif + +#ifdef ENABLE_OSCE_TRAINING_DATA +#define COMPLEXITY_MIN 0 +#define COMPLEXITY_MAX 10 + +#define PACKET_LOSS_PERC_MIN 0 +#define PACKET_LOSS_PERC_MAX 50 +#define PACKET_LOSS_PERC_STEP 5 + +#define CBR_BITRATE_LIMIT 8000 + +#define NUM_BITRATES 102 +static int bitrates[NUM_BITRATES] = { + 6000, 6060, 6120, 6180, 6240, 6300, 6360, 6420, 6480, + 6525, 6561, 6598, 6634, 6670, 6707, 6743, 6780, 6816, + 6853, 6889, 6926, 6962, 6999, 7042, 7085, 7128, 7171, + 7215, 7258, 7301, 7344, 7388, 7431, 7474, 7512, 7541, + 7570, 7599, 7628, 7657, 7686, 7715, 7744, 7773, 7802, + 7831, 7860, 7889, 7918, 7947, 7976, 8013, 8096, 8179, + 8262, 8344, 8427, 8511, 8605, 8699, 8792, 8886, 8980, + 9100, 9227, 9354, 9480, 9561, 9634, 9706, 9779, 9851, + 9924, 9996, 10161, 10330, 10499, 10698, 10898, 11124, 11378, + 11575, 11719, 11862, 12014, 12345, 12751, 13195, 13561, 13795, + 14069, 14671, 15403, 15790, 16371, 17399, 17968, 19382, 20468, + 22000, 32000, 64000 +}; + +static int randint(int min, int max, int step) +{ + double r = ((double) rand())/ (RAND_MAX + 1.); + int d; + + d = ((int) ((max + 1 - min) * r / step) * step) + min; + + return d; +} + +static void new_random_setting(OpusEncoder *enc) +{ + int bitrate_bps; + int complexity; + int packet_loss_perc; + int use_vbr; + + bitrate_bps = bitrates[randint(0, NUM_BITRATES - 1, 1)]; + complexity = randint(COMPLEXITY_MIN, COMPLEXITY_MAX, 1); + packet_loss_perc = randint(PACKET_LOSS_PERC_MIN, PACKET_LOSS_PERC_MAX, PACKET_LOSS_PERC_STEP); + use_vbr = bitrate_bps < CBR_BITRATE_LIMIT ? 1 : randint(0, 1, 1); + + if (1) + { + printf("changing settings to %d\t%d\t%d\t%d\n", bitrate_bps, complexity, packet_loss_perc, use_vbr); + } + + opus_encoder_ctl(enc, OPUS_SET_BITRATE(bitrate_bps)); + opus_encoder_ctl(enc, OPUS_SET_COMPLEXITY(complexity)); + opus_encoder_ctl(enc, OPUS_SET_PACKET_LOSS_PERC(packet_loss_perc)); + opus_encoder_ctl(enc, OPUS_SET_VBR(use_vbr)); +} + +#endif + int main(int argc, char *argv[]) { int err; @@ -215,21 +355,28 @@ int main(int argc, char *argv[]) FILE *fout=NULL; OpusEncoder *enc=NULL; OpusDecoder *dec=NULL; + OpusDRED *dred=NULL; + OpusDREDDecoder *dred_dec=NULL; int args; - int len[2]; + int len; int frame_size, channels; opus_int32 bitrate_bps=0; - unsigned char *data[2] = {NULL, NULL}; + unsigned char *data = NULL; unsigned char *fbytes=NULL; opus_int32 sampling_rate; int use_vbr; int max_payload_bytes; int complexity; + int dec_complexity; int use_inbandfec; int use_dtx; int forcechannels; int cvbr = 0; int packet_loss_perc; +#ifdef ENABLE_LOSSGEN + float lossgen_perc = -1.f; + LossGenState lossgen; +#endif opus_int32 count=0, count_act=0; int k; opus_int32 skip=0; @@ -243,8 +390,7 @@ int main(int argc, char *argv[]) int bandwidth=OPUS_AUTO; const char *bandwidth_string; int lost = 0, lost_prev = 1; - int toggle = 0; - opus_uint32 enc_final_range[2]; + opus_uint32 enc_final_range; opus_uint32 dec_final_range; int encode_only=0, decode_only=0; int max_frame_size = 48000*2; @@ -264,6 +410,19 @@ int main(int argc, char *argv[]) int variable_duration=OPUS_FRAMESIZE_ARG; int delayed_decision=0; int ret = EXIT_FAILURE; + int lost_count=0; + FILE *packet_loss_file=NULL; + int dred_duration=0; +#ifdef ENABLE_OSCE_TRAINING_DATA + int silk_random_switching = 0; + int silk_frame_counter = 0; +#endif +#ifdef USE_WEIGHTS_FILE + int blob_len; + void *blob_data; + const char *filename = "weights_blob.bin"; + blob_data = load_blob(filename, &blob_len); +#endif if (argc < 5 ) { @@ -335,6 +494,7 @@ int main(int argc, char *argv[]) use_vbr = 1; max_payload_bytes = MAX_PACKET; complexity = 10; + dec_complexity = 0; use_inbandfec = 0; forcechannels = OPUS_AUTO; use_dtx = 0; @@ -400,6 +560,10 @@ int main(int argc, char *argv[]) check_encoder_option(decode_only, "-complexity"); complexity = atoi( argv[ args + 1 ] ); args += 2; + } else if( strcmp( argv[ args ], "-dec_complexity" ) == 0 ) { + check_decoder_option(encode_only, "-dec_complexity"); + dec_complexity = atoi( argv[ args + 1 ] ); + args += 2; } else if( strcmp( argv[ args ], "-inbandfec" ) == 0 ) { use_inbandfec = 1; args++; @@ -422,6 +586,22 @@ int main(int argc, char *argv[]) } else if( strcmp( argv[ args ], "-loss" ) == 0 ) { packet_loss_perc = atoi( argv[ args + 1 ] ); args += 2; +#ifdef ENABLE_LOSSGEN + } else if( strcmp( argv[ args ], "-sim_loss" ) == 0 ) { + lossgen_perc = atof( argv[ args + 1 ] ); + lossgen_init(&lossgen); + args += 2; +#endif + } else if( strcmp( argv[ args ], "-lossfile" ) == 0 ) { + packet_loss_file = fopen( argv[ args + 1 ], "r" ); + if (packet_loss_file == NULL) { + fprintf(stderr, "failed to open loss file %s\n", argv[ args + 1 ] ); + exit(1); + } + args += 2; + } else if( strcmp( argv[ args ], "-dred" ) == 0 ) { + dred_duration = atoi( argv[ args + 1 ] ); + args += 2; } else if( strcmp( argv[ args ], "-sweep" ) == 0 ) { check_encoder_option(decode_only, "-sweep"); sweep_bps = atoi( argv[ args + 1 ] ); @@ -473,6 +653,12 @@ int main(int argc, char *argv[]) mode_list = celt_hq_test; nb_modes_in_list = 4; args++; +#ifdef ENABLE_OSCE_TRAINING_DATA + } else if( strcmp( argv[ args ], "-silk_random_switching" ) == 0 ){ + silk_random_switching = atoi( argv[ args + 1 ] ); + printf("switching encoding parameters every %dth frame\n", silk_random_switching); + args += 2; +#endif } else { printf( "Error: unrecognized setting: %s\n\n", argv[ args ] ); print_usage( argv ); @@ -537,6 +723,10 @@ int main(int argc, char *argv[]) opus_encoder_ctl(enc, OPUS_GET_LOOKAHEAD(&skip)); opus_encoder_ctl(enc, OPUS_SET_LSB_DEPTH(16)); opus_encoder_ctl(enc, OPUS_SET_EXPERT_FRAME_DURATION(variable_duration)); + if (dred_duration > 0) + { + opus_encoder_ctl(enc, OPUS_SET_DRED_DURATION(dred_duration)); + } } if (!encode_only) { @@ -546,9 +736,8 @@ int main(int argc, char *argv[]) fprintf(stderr, "Cannot create decoder: %s\n", opus_strerror(err)); goto failure; } + opus_decoder_ctl(dec, OPUS_SET_COMPLEXITY(dec_complexity)); } - - switch(bandwidth) { case OPUS_BANDWIDTH_NARROWBAND: @@ -587,10 +776,7 @@ int main(int argc, char *argv[]) out = (short*)malloc(max_frame_size*channels*sizeof(short)); /* We need to allocate for 16-bit PCM data, but we store it as unsigned char. */ fbytes = (unsigned char*)malloc(max_frame_size*channels*sizeof(short)); - data[0] = (unsigned char*)calloc(max_payload_bytes,sizeof(unsigned char)); - if ( use_inbandfec ) { - data[1] = (unsigned char*)calloc(max_payload_bytes,sizeof(unsigned char)); - } + data = (unsigned char*)calloc(max_payload_bytes,sizeof(unsigned char)); if(delayed_decision) { if (frame_size==sampling_rate/400) @@ -614,6 +800,13 @@ int main(int argc, char *argv[]) opus_encoder_ctl(enc, OPUS_SET_EXPERT_FRAME_DURATION(variable_duration)); frame_size = 2*48000; } + dred_dec = opus_dred_decoder_create(&err); + dred = opus_dred_alloc(&err); +#ifdef USE_WEIGHTS_FILE + if (enc) opus_encoder_ctl(enc, OPUS_SET_DNN_BLOB(blob_data, blob_len)); + if (dec) opus_decoder_ctl(dec, OPUS_SET_DNN_BLOB(blob_data, blob_len)); + if (dred_dec) opus_dred_decoder_ctl(dred_dec, OPUS_SET_DNN_BLOB(blob_data, blob_len)); +#endif while (!stop) { if (delayed_celt) @@ -652,22 +845,22 @@ int main(int argc, char *argv[]) num_read = fread(ch, 1, 4, fin); if (num_read!=4) break; - len[toggle] = char_to_int(ch); - if (len[toggle]>max_payload_bytes || len[toggle]<0) + len = char_to_int(ch); + if (len>max_payload_bytes || len<0) { - fprintf(stderr, "Invalid payload length: %d\n",len[toggle]); + fprintf(stderr, "Invalid payload length: %d\n",len); break; } num_read = fread(ch, 1, 4, fin); if (num_read!=4) break; - enc_final_range[toggle] = char_to_int(ch); - num_read = fread(data[toggle], 1, len[toggle], fin); - if (num_read!=(size_t)len[toggle]) + enc_final_range = char_to_int(ch); + num_read = fread(data, 1, len, fin); + if (num_read!=(size_t)len) { fprintf(stderr, "Ran out of input, " "expecting %d bytes got %d\n", - len[toggle],(int)num_read); + len,(int)num_read); break; } } else { @@ -679,6 +872,15 @@ int main(int argc, char *argv[]) opus_encoder_ctl(enc, OPUS_SET_FORCE_CHANNELS(mode_list[curr_mode][3])); frame_size = mode_list[curr_mode][2]; } +#ifdef ENABLE_OSCE_TRAINING_DATA + if (silk_random_switching) + { + silk_frame_counter += 1; + if (silk_frame_counter % silk_random_switching == 0) { + new_random_setting(enc); + } + } +#endif num_read = fread(fbytes, sizeof(short)*channels, frame_size-remaining, fin); curr_read = (int)num_read; tot_in += curr_read; @@ -696,8 +898,13 @@ int main(int argc, char *argv[]) if (encode_only || decode_only) stop = 1; } - len[toggle] = opus_encode(enc, in, frame_size, data[toggle], max_payload_bytes); - nb_encoded = opus_packet_get_samples_per_frame(data[toggle], sampling_rate)*opus_packet_get_nb_frames(data[toggle], len[toggle]); + len = opus_encode(enc, in, frame_size, data, max_payload_bytes); + if (len < 0) + { + fprintf (stderr, "opus_encode() returned %d\n", len); + goto failure; + } + nb_encoded = opus_packet_get_samples_per_frame(data, sampling_rate)*opus_packet_get_nb_frames(data, len); remaining = frame_size-nb_encoded; for(i=0;i mode_switch_time && curr_mode < nb_modes_in_list-1) { @@ -731,56 +933,84 @@ int main(int argc, char *argv[]) } #if 0 /* This is for testing the padding code, do not enable by default */ - if (len[toggle]<1275) + if (len<1275) { - int new_len = len[toggle]+rand()%(max_payload_bytes-len[toggle]); - if ((err = opus_packet_pad(data[toggle], len[toggle], new_len)) != OPUS_OK) + int new_len = len+rand()%(max_payload_bytes-len); + if ((err = opus_packet_pad(data, len, new_len)) != OPUS_OK) { fprintf(stderr, "padding failed: %s\n", opus_strerror(err)); goto failure; } - len[toggle] = new_len; + len = new_len; } #endif if (encode_only) { unsigned char int_field[4]; - int_to_char(len[toggle], int_field); + int_to_char(len, int_field); if (fwrite(int_field, 1, 4, fout) != 4) { fprintf(stderr, "Error writing.\n"); goto failure; } - int_to_char(enc_final_range[toggle], int_field); + int_to_char(enc_final_range, int_field); if (fwrite(int_field, 1, 4, fout) != 4) { fprintf(stderr, "Error writing.\n"); goto failure; } - if (fwrite(data[toggle], 1, len[toggle], fout) != (unsigned)len[toggle]) { + if (fwrite(data, 1, len, fout) != (unsigned)len) { fprintf(stderr, "Error writing.\n"); goto failure; } tot_samples += nb_encoded; } else { - opus_int32 output_samples; - lost = len[toggle]==0 || (packet_loss_perc>0 && rand()%100 < packet_loss_perc); + int fr; + int run_decoder; + int dred_input=0; + int dred_end=0; + if (packet_loss_file != NULL) { + if ( fscanf(packet_loss_file, "%d", &lost) != 1) { + lost = 0; + } +#ifdef ENABLE_LOSSGEN + } else if (lossgen_perc >= 0) { + lost = sample_loss(&lossgen, lossgen_perc*.01f); +#endif + } else { + lost = (packet_loss_perc>0) && (rand()%100 < packet_loss_perc); + } + if (len == 0) lost = 1; if (lost) - opus_decoder_ctl(dec, OPUS_GET_LAST_PACKET_DURATION(&output_samples)); - else - output_samples = max_frame_size; - if( count >= use_inbandfec ) { - /* delay by one packet when using in-band FEC */ - if( use_inbandfec ) { - if( lost_prev ) { - /* attempt to decode with in-band FEC from next packet */ - opus_decoder_ctl(dec, OPUS_GET_LAST_PACKET_DURATION(&output_samples)); - output_samples = opus_decode(dec, lost ? NULL : data[toggle], len[toggle], out, output_samples, 1); - } else { - /* regular decode */ - output_samples = max_frame_size; - output_samples = opus_decode(dec, data[1-toggle], len[1-toggle], out, output_samples, 0); - } + { + lost_count++; + run_decoder = 0; + } else { + run_decoder= 1; + } + if (run_decoder) + run_decoder += lost_count; + if (!lost && lost_count > 0) { + opus_int32 output_samples=0; + opus_decoder_ctl(dec, OPUS_GET_LAST_PACKET_DURATION(&output_samples)); + dred_input = lost_count*output_samples; + /* Only decode the amount we need to fill in the gap. */ + ret = opus_dred_parse(dred_dec, dred, data, len, IMIN(48000, IMAX(0, dred_input)), sampling_rate, &dred_end, 0); + dred_input = ret > 0 ? ret : 0; + } + /* FIXME: Figure out how to trigger the decoder when the last packet of the file is lost. */ + for (fr=0;fr 0) + output_samples = opus_decoder_dred_decode(dec, dred, (lost_count-fr)*output_samples, out, output_samples); + else + output_samples = opus_decode(dec, NULL, 0, out, output_samples, 0); } else { - output_samples = opus_decode(dec, lost ? NULL : data[toggle], len[toggle], out, output_samples, 0); + output_samples = max_frame_size; + output_samples = opus_decode(dec, data, len, out, output_samples, 0); } if (output_samples>0) { @@ -817,24 +1047,26 @@ int main(int argc, char *argv[]) if (!encode_only) opus_decoder_ctl(dec, OPUS_GET_FINAL_RANGE(&dec_final_range)); /* compare final range encoder rng values of encoder and decoder */ - if( enc_final_range[toggle^use_inbandfec]!=0 && !encode_only + if( enc_final_range!=0 && !encode_only && !lost && !lost_prev - && dec_final_range != enc_final_range[toggle^use_inbandfec] ) { + && dec_final_range != enc_final_range ) { fprintf (stderr, "Error: Range coder state mismatch " "between encoder and decoder " "in frame %ld: 0x%8lx vs 0x%8lx\n", (long)count, - (unsigned long)enc_final_range[toggle^use_inbandfec], + (unsigned long)enc_final_range, (unsigned long)dec_final_range); goto failure; } lost_prev = lost; + if (!lost) + lost_count = 0; if( count >= use_inbandfec ) { /* count bits */ - bits += len[toggle]*8; - bits_max = ( len[toggle]*8 > bits_max ) ? len[toggle]*8 : bits_max; - bits2 += len[toggle]*len[toggle]*64; + bits += len*8; + bits_max = ( len*8 > bits_max ) ? len*8 : bits_max; + bits2 += len*len*64; if (!decode_only) { nrg = 0.0; @@ -843,13 +1075,12 @@ int main(int argc, char *argv[]) } nrg /= frame_size * channels; if( nrg > 1e5 ) { - bits_act += len[toggle]*8; + bits_act += len*8; count_act++; } } } count++; - toggle = (toggle + use_inbandfec) & 1; } if(decode_only && count > 0) @@ -879,8 +1110,9 @@ int main(int argc, char *argv[]) failure: opus_encoder_destroy(enc); opus_decoder_destroy(dec); - free(data[0]); - free(data[1]); + opus_dred_free(dred); + opus_dred_decoder_destroy(dred_dec); + free(data); if (fin) fclose(fin); if (fout) @@ -888,5 +1120,8 @@ failure: free(in); free(out); free(fbytes); +#ifdef USE_WEIGHTS_FILE + free_blob(blob_data, blob_len); +#endif return ret; } diff --git a/src/libs/opus/src/opus_encoder.c b/src/libs/opus/src/opus_encoder.c index 8c8db5a5..d18d582f 100644 --- a/src/libs/opus/src/opus_encoder.c +++ b/src/libs/opus/src/opus_encoder.c @@ -45,11 +45,19 @@ #include "analysis.h" #include "mathops.h" #include "tuning_parameters.h" + +#ifdef ENABLE_DRED +#include "dred_coding.h" +#endif + #ifdef FIXED_POINT #include "fixed/structs_FIX.h" #else #include "float/structs_FLP.h" #endif +#ifdef ENABLE_OSCE_TRAINING_DATA +#include +#endif #define MAX_ENCODER_BUFFER 480 @@ -67,6 +75,9 @@ struct OpusEncoder { int celt_enc_offset; int silk_enc_offset; silk_EncControlStruct silk_mode; +#ifdef ENABLE_DRED + DREDEnc dred_encoder; +#endif int application; int channels; int delay_compensation; @@ -115,6 +126,14 @@ struct OpusEncoder { int detected_bandwidth; int nb_no_activity_ms_Q1; opus_val32 peak_signal_energy; +#endif +#ifdef ENABLE_DRED + int dred_duration; + int dred_q0; + int dred_dQ; + int dred_qmax; + int dred_target_chunks; + unsigned char activity_mem[DRED_MAX_FRAMES*4]; /* 2.5ms resolution*/ #endif int nonfinal_frame; /* current frame is not the final in a packet */ opus_uint32 rangeFinal; @@ -224,6 +243,7 @@ int opus_encoder_init(OpusEncoder* st, opus_int32 Fs, int channels, int applicat st->silk_mode.packetLossPercentage = 0; st->silk_mode.complexity = 9; st->silk_mode.useInBandFEC = 0; + st->silk_mode.useDRED = 0; st->silk_mode.useDTX = 0; st->silk_mode.useCBR = 0; st->silk_mode.reducedDependency = 0; @@ -236,6 +256,11 @@ int opus_encoder_init(OpusEncoder* st, opus_int32 Fs, int channels, int applicat celt_encoder_ctl(celt_enc, CELT_SET_SIGNALLING(0)); celt_encoder_ctl(celt_enc, OPUS_SET_COMPLEXITY(st->silk_mode.complexity)); +#ifdef ENABLE_DRED + /* Initialize DRED Encoder */ + dred_encoder_init( &st->dred_encoder, Fs, channels ); +#endif + st->use_vbr = 1; /* Makes constrained VBR the default (safer for real-time use) */ st->vbr_constraint = 1; @@ -544,6 +569,73 @@ OpusEncoder *opus_encoder_create(opus_int32 Fs, int channels, int application, i return st; } +#ifdef ENABLE_DRED + +static const float dred_bits_table[16] = {73.2f, 68.1f, 62.5f, 57.0f, 51.5f, 45.7f, 39.9f, 32.4f, 26.4f, 20.4f, 16.3f, 13.f, 9.3f, 8.2f, 7.2f, 6.4f}; +static int estimate_dred_bitrate(int q0, int dQ, int qmax, int duration, opus_int32 target_bits, int *target_chunks) { + int dred_chunks; + int i; + float bits; + /* Signaling DRED costs 3 bytes. */ + bits = 8*(3+DRED_EXPERIMENTAL_BYTES); + /* Approximation for the size of the IS. */ + bits += 50.f+dred_bits_table[q0]; + dred_chunks = IMIN((duration+5)/4, DRED_NUM_REDUNDANCY_FRAMES/2); + if (target_chunks != NULL) *target_chunks = 0; + for (i=0;isilk_mode.useInBandFEC) { + dred_frac = MIN16(.7f, 3.f*st->silk_mode.packetLossPercentage/100.f); + bitrate_offset = 20000; + } else { + if (st->silk_mode.packetLossPercentage > 5) { + dred_frac = MIN16(.8f, .55f + st->silk_mode.packetLossPercentage/100.f); + } else { + dred_frac = 12*st->silk_mode.packetLossPercentage/100.f; + } + bitrate_offset = 12000; + } + /* Account for the fact that longer packets require less redundancy. */ + dred_frac = dred_frac/(dred_frac + (1-dred_frac)*(frame_size*50.f)/st->Fs); + /* Approximate fit based on a few experiments. Could probably be improved. */ + q0 = IMIN(15, IMAX(4, 51 - 3*EC_ILOG(IMAX(1, bitrate_bps-bitrate_offset)))); + dQ = bitrate_bps-bitrate_offset > 36000 ? 3 : 5; + qmax = 15; + target_dred_bitrate = IMAX(0, (int)(dred_frac*(bitrate_bps-bitrate_offset))); + if (st->dred_duration > 0) { + opus_int32 target_bits = target_dred_bitrate*frame_size/st->Fs; + max_dred_bits = estimate_dred_bitrate(q0, dQ, qmax, st->dred_duration, target_bits, &target_chunks); + } else { + max_dred_bits = 0; + target_chunks=0; + } + dred_bitrate = IMIN(target_dred_bitrate, max_dred_bits*st->Fs/frame_size); + /* If we can't afford enough bits, don't bother with DRED at all. */ + if (target_chunks < 2) + dred_bitrate = 0; + st->dred_q0 = q0; + st->dred_dQ = dQ; + st->dred_qmax = qmax; + st->dred_target_chunks = target_chunks; + return dred_bitrate; +} +#endif + static opus_int32 user_bitrate_to_bitrate(OpusEncoder *st, int frame_size, int max_data_bytes) { if(!frame_size)frame_size=st->Fs/400; @@ -872,7 +964,7 @@ static opus_val32 compute_frame_energy(const opus_val16 *pcm, int frame_size, in /* Compute the right shift required in the MAC to avoid an overflow */ max_shift = celt_ilog2(len); - shift = IMAX(0, (celt_ilog2(sample_max) << 1) + max_shift - 28); + shift = IMAX(0, (celt_ilog2(1+sample_max) << 1) + max_shift - 28); /* Compute the energy */ for (i=0; i2 frames: Code 3 VBR */ - max_header_bytes = nb_frames == 2 ? 3 : (2+(nb_frames-1)*2); - - if (st->use_vbr || st->user_bitrate_bps==OPUS_BITRATE_MAX) - repacketize_len = out_data_bytes; - else { - cbr_bytes = 3*st->bitrate_bps/(3*8*st->Fs/(frame_size*nb_frames)); - repacketize_len = IMIN(cbr_bytes, out_data_bytes); - } - bytes_per_frame = IMIN(1276, 1+(repacketize_len-max_header_bytes)/nb_frames); - - ALLOC(tmp_data, nb_frames*bytes_per_frame, unsigned char); - ALLOC(rp, 1, OpusRepacketizer); - opus_repacketizer_init(rp); - - bak_mode = st->user_forced_mode; - bak_bandwidth = st->user_bandwidth; - bak_channels = st->force_channels; - - st->user_forced_mode = st->mode; - st->user_bandwidth = st->bandwidth; - st->force_channels = st->stream_channels; - - bak_to_mono = st->silk_mode.toMono; - if (bak_to_mono) - st->force_channels = 1; - else - st->prev_channels = st->stream_channels; - - for (i=0;isilk_mode.toMono = 0; - st->nonfinal_frame = i<(nb_frames-1); - - /* When switching from SILK/Hybrid to CELT, only ask for a switch at the last frame */ - if (to_celt && i==nb_frames-1) - st->user_forced_mode = MODE_CELT_ONLY; - - tmp_len = opus_encode_native(st, pcm+i*(st->channels*frame_size), frame_size, - tmp_data+i*bytes_per_frame, bytes_per_frame, lsb_depth, NULL, 0, 0, 0, 0, - NULL, float_api); - - if (tmp_len<0) - { - RESTORE_STACK; - return OPUS_INTERNAL_ERROR; - } - - ret = opus_repacketizer_cat(rp, tmp_data+i*bytes_per_frame, tmp_len); - - if (ret<0) - { - RESTORE_STACK; - return OPUS_INTERNAL_ERROR; - } - } - - ret = opus_repacketizer_out_range_impl(rp, 0, nb_frames, data, repacketize_len, 0, !st->use_vbr); - - if (ret<0) - { - RESTORE_STACK; - return OPUS_INTERNAL_ERROR; - } - - /* Discard configs that were forced locally for the purpose of repacketization */ - st->user_forced_mode = bak_mode; - st->user_bandwidth = bak_bandwidth; - st->force_channels = bak_channels; - st->silk_mode.toMono = bak_to_mono; - - RESTORE_STACK; - return ret; -} - static int compute_redundancy_bytes(opus_int32 max_data_bytes, opus_int32 bitrate_bps, int frame_rate, int channels) { int redundancy_bytes_cap; @@ -1049,6 +1042,18 @@ static int compute_redundancy_bytes(opus_int32 max_data_bytes, opus_int32 bitrat return redundancy_bytes; } +static opus_int32 opus_encode_frame_native(OpusEncoder *st, const opus_val16 *pcm, int frame_size, + unsigned char *data, opus_int32 max_data_bytes, + int float_api, int first_frame, +#ifdef ENABLE_DRED + opus_int32 dred_bitrate_bps, +#endif +#ifndef DISABLE_FLOAT_API + AnalysisInfo *analysis_info, int is_silence, +#endif + int redundancy, int celt_to_silk, int prefill, + opus_int32 equiv_rate, int to_celt); + opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_size, unsigned char *data, opus_int32 out_data_bytes, int lsb_depth, const void *analysis_pcm, opus_int32 analysis_size, int c1, int c2, @@ -1058,28 +1063,17 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ CELTEncoder *celt_enc; int i; int ret=0; - opus_int32 nBytes; - ec_enc enc; - int bytes_target; int prefill=0; - int start_band = 0; int redundancy = 0; - int redundancy_bytes = 0; /* Number of bytes to use for redundancy frame */ int celt_to_silk = 0; - VARDECL(opus_val16, pcm_buf); - int nb_compr_bytes; int to_celt = 0; - opus_uint32 redundant_rng = 0; - int cutoff_Hz, hp_freq_smth1; int voice_est; /* Probability of voice in Q7 */ opus_int32 equiv_rate; - int delay_compensation; int frame_rate; opus_int32 max_rate; /* Max bitrate we're allowed to use */ int curr_bandwidth; - opus_val16 HB_gain; opus_int32 max_data_bytes; /* Max number of bytes we're allowed to use */ - int total_buffer; + opus_int32 cbr_bytes=-1; opus_val16 stereo_width; const CELTMode *celt_mode; #ifndef DISABLE_FLOAT_API @@ -1088,10 +1082,9 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ int analysis_read_subframe_bak=-1; int is_silence = 0; #endif - opus_int activity = VAD_NO_DECISION; - - VARDECL(opus_val16, tmp_prefill); - +#ifdef ENABLE_DRED + opus_int32 dred_bitrate_bps; +#endif ALLOC_STACK; max_data_bytes = IMIN(1276, out_data_bytes); @@ -1112,10 +1105,6 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ silk_enc = (char*)st+st->silk_enc_offset; celt_enc = (CELTEncoder*)((char*)st+st->celt_enc_offset); - if (st->application == OPUS_APPLICATION_RESTRICTED_LOWDELAY) - delay_compensation = 0; - else - delay_compensation = st->delay_compensation; lsb_depth = IMIN(lsb_depth, st->lsb_depth); @@ -1157,20 +1146,6 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ if (!is_silence) st->voice_ratio = -1; - if (is_silence) - { - activity = !is_silence; - } else if (analysis_info.valid) - { - activity = analysis_info.activity_probability >= DTX_ACTIVITY_THRESHOLD; - if (!activity) - { - /* Mark as active if this noise frame is sufficiently loud */ - opus_val32 noise_energy = compute_frame_energy(pcm, frame_size, st->channels, st->arch); - activity = st->peak_signal_energy < (PSEUDO_SNR_THRESHOLD * noise_energy); - } - } - st->detected_bandwidth = 0; if (analysis_info.valid) { @@ -1207,21 +1182,24 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ stereo_width = compute_stereo_width(pcm, frame_size, st->Fs, &st->width_mem); else stereo_width = 0; - total_buffer = delay_compensation; st->bitrate_bps = user_bitrate_to_bitrate(st, frame_size, max_data_bytes); frame_rate = st->Fs/frame_size; if (!st->use_vbr) { - int cbrBytes; /* Multiply by 12 to make sure the division is exact. */ int frame_rate12 = 12*st->Fs/frame_size; /* We need to make sure that "int" values always fit in 16 bits. */ - cbrBytes = IMIN( (12*st->bitrate_bps/8 + frame_rate12/2)/frame_rate12, max_data_bytes); - st->bitrate_bps = cbrBytes*(opus_int32)frame_rate12*8/12; + cbr_bytes = IMIN( (12*st->bitrate_bps/8 + frame_rate12/2)/frame_rate12, max_data_bytes); + st->bitrate_bps = cbr_bytes*(opus_int32)frame_rate12*8/12; /* Make sure we provide at least one byte to avoid failing. */ - max_data_bytes = IMAX(1, cbrBytes); + max_data_bytes = IMAX(1, cbr_bytes); } +#ifdef ENABLE_DRED + /* Allocate some of the bits to DRED if needed. */ + dred_bitrate_bps = compute_dred_bitrate(st, st->bitrate_bps, frame_size); + st->bitrate_bps -= dred_bitrate_bps; +#endif if (max_data_bytes<3 || st->bitrate_bps < 3*frame_rate*8 || (frame_rate<50 && (max_data_bytes*frame_rate<300 || st->bitrate_bps < 2400))) { @@ -1575,6 +1553,15 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ { int enc_frame_size; int nb_frames; + VARDECL(unsigned char, tmp_data); + VARDECL(OpusRepacketizer, rp); + int max_header_bytes; + opus_int32 repacketize_len; + opus_int32 max_len_sum; + opus_int32 tot_size=0; + unsigned char *curr_data; + int tmp_len; + int dtx_count = 0; if (st->mode == MODE_SILK_ONLY) { @@ -1593,17 +1580,186 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ #ifndef DISABLE_FLOAT_API if (analysis_read_pos_bak!= -1) { + /* Reset analysis position to the beginning of the first frame so we + can use it one frame at a time. */ st->analysis.read_pos = analysis_read_pos_bak; st->analysis.read_subframe = analysis_read_subframe_bak; } #endif - ret = encode_multiframe_packet(st, pcm, nb_frames, enc_frame_size, data, - out_data_bytes, to_celt, lsb_depth, float_api); + /* Worst cases: + * 2 frames: Code 2 with different compressed sizes + * >2 frames: Code 3 VBR */ + max_header_bytes = nb_frames == 2 ? 3 : (2+(nb_frames-1)*2); + if (st->use_vbr || st->user_bitrate_bps==OPUS_BITRATE_MAX) + repacketize_len = out_data_bytes; + else { + celt_assert(cbr_bytes>=0); + repacketize_len = IMIN(cbr_bytes, out_data_bytes); + } + max_len_sum = nb_frames + repacketize_len - max_header_bytes; + + ALLOC(tmp_data, max_len_sum, unsigned char); + curr_data = tmp_data; + ALLOC(rp, 1, OpusRepacketizer); + opus_repacketizer_init(rp); + + + int bak_to_mono = st->silk_mode.toMono; + if (bak_to_mono) + st->force_channels = 1; + else + st->prev_channels = st->stream_channels; + + for (i=0;isilk_mode.toMono = 0; + st->nonfinal_frame = i<(nb_frames-1); + + /* When switching from SILK/Hybrid to CELT, only ask for a switch at the last frame */ + frame_to_celt = to_celt && i==nb_frames-1; + frame_redundancy = redundancy && (frame_to_celt || (!to_celt && i==0)); + + curr_max = IMIN(3*st->bitrate_bps/(3*8*st->Fs/enc_frame_size), max_len_sum/nb_frames); +#ifdef ENABLE_DRED + curr_max = IMIN(curr_max, (max_len_sum-3*dred_bitrate_bps/(3*8*st->Fs/frame_size))/nb_frames); + if (first_frame) curr_max += 3*dred_bitrate_bps/(3*8*st->Fs/frame_size); +#endif + curr_max = IMIN(max_len_sum-tot_size, curr_max); +#ifndef DISABLE_FLOAT_API + if (analysis_read_pos_bak != -1) { + is_silence = is_digital_silence(pcm, frame_size, st->channels, lsb_depth); + /* Get analysis for current frame. */ + tonality_get_info(&st->analysis, &analysis_info, enc_frame_size); + } +#endif + + tmp_len = opus_encode_frame_native(st, pcm+i*(st->channels*enc_frame_size), enc_frame_size, curr_data, curr_max, float_api, first_frame, +#ifdef ENABLE_DRED + dred_bitrate_bps, +#endif +#ifndef DISABLE_FLOAT_API + &analysis_info, + is_silence, +#endif + frame_redundancy, celt_to_silk, prefill, + equiv_rate, frame_to_celt + ); + if (tmp_len<0) + { + RESTORE_STACK; + return OPUS_INTERNAL_ERROR; + } else if (tmp_len==1) { + dtx_count++; + } + ret = opus_repacketizer_cat(rp, curr_data, tmp_len); + + if (ret<0) + { + RESTORE_STACK; + return OPUS_INTERNAL_ERROR; + } + tot_size += tmp_len; + curr_data += tmp_len; + } + ret = opus_repacketizer_out_range_impl(rp, 0, nb_frames, data, repacketize_len, 0, !st->use_vbr && (dtx_count != nb_frames), NULL, 0); + if (ret<0) + { + ret = OPUS_INTERNAL_ERROR; + } + st->silk_mode.toMono = bak_to_mono; RESTORE_STACK; return ret; + } else { + ret = opus_encode_frame_native(st, pcm, frame_size, data, max_data_bytes, float_api, 1, +#ifdef ENABLE_DRED + dred_bitrate_bps, +#endif +#ifndef DISABLE_FLOAT_API + &analysis_info, + is_silence, +#endif + redundancy, celt_to_silk, prefill, + equiv_rate, to_celt + ); + RESTORE_STACK; + return ret; } +} + +static opus_int32 opus_encode_frame_native(OpusEncoder *st, const opus_val16 *pcm, int frame_size, + unsigned char *data, opus_int32 max_data_bytes, + int float_api, int first_frame, +#ifdef ENABLE_DRED + opus_int32 dred_bitrate_bps, +#endif +#ifndef DISABLE_FLOAT_API + AnalysisInfo *analysis_info, int is_silence, +#endif + int redundancy, int celt_to_silk, int prefill, + opus_int32 equiv_rate, int to_celt) +{ + void *silk_enc; + CELTEncoder *celt_enc; + const CELTMode *celt_mode; + int i; + int ret=0; + opus_int32 nBytes; + ec_enc enc; + int bytes_target; + int start_band = 0; + int redundancy_bytes = 0; /* Number of bytes to use for redundancy frame */ + int nb_compr_bytes; + opus_uint32 redundant_rng = 0; + int cutoff_Hz; + int hp_freq_smth1; + opus_val16 HB_gain; + int apply_padding; + int frame_rate; + int curr_bandwidth; + int delay_compensation; + int total_buffer; + opus_int activity = VAD_NO_DECISION; + VARDECL(opus_val16, pcm_buf); + VARDECL(opus_val16, tmp_prefill); + SAVE_STACK; + + st->rangeFinal = 0; + silk_enc = (char*)st+st->silk_enc_offset; + celt_enc = (CELTEncoder*)((char*)st+st->celt_enc_offset); + celt_encoder_ctl(celt_enc, CELT_GET_MODE(&celt_mode)); + curr_bandwidth = st->bandwidth; + if (st->application == OPUS_APPLICATION_RESTRICTED_LOWDELAY) + delay_compensation = 0; + else + delay_compensation = st->delay_compensation; + total_buffer = delay_compensation; + + frame_rate = st->Fs/frame_size; + +#ifndef DISABLE_FLOAT_API + if (is_silence) + { + activity = !is_silence; + } else if (analysis_info->valid) + { + activity = analysis_info->activity_probability >= DTX_ACTIVITY_THRESHOLD; + if (!activity) + { + /* Mark as active if this noise frame is sufficiently loud */ + opus_val32 noise_energy = compute_frame_energy(pcm, frame_size, st->channels, st->arch); + activity = st->peak_signal_energy < (PSEUDO_SNR_THRESHOLD * noise_energy); + } + } +#endif /* For the first frame at a new SILK bandwidth */ if (st->silk_bw_switch) @@ -1611,7 +1767,7 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ redundancy = 1; celt_to_silk = 1; st->silk_bw_switch = 0; - /* Do a prefill without reseting the sampling rate control. */ + /* Do a prefill without resetting the sampling rate control. */ prefill=2; } @@ -1651,6 +1807,25 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ if (st->application == OPUS_APPLICATION_VOIP) { hp_cutoff(pcm, cutoff_Hz, &pcm_buf[total_buffer*st->channels], st->hp_mem, frame_size, st->channels, st->Fs, st->arch); + +#ifdef ENABLE_OSCE_TRAINING_DATA + /* write out high pass filtered clean signal*/ + static FILE *fout =NULL; + if (fout == NULL) + { + fout = fopen("clean_hp.s16", "wb"); + } + + { + int idx; + opus_int16 tmp; + for (idx = 0; idx < frame_size; idx++) + { + tmp = (opus_int16) (32768 * pcm_buf[total_buffer + idx] + 0.5f); + fwrite(&tmp, sizeof(tmp), 1, fout); + } + } +#endif } else { dc_reject(pcm, 3, &pcm_buf[total_buffer*st->channels], st->hp_mem, frame_size, st->channels, st->Fs); } @@ -1667,8 +1842,24 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ st->hp_mem[0] = st->hp_mem[1] = st->hp_mem[2] = st->hp_mem[3] = 0; } } +#else + (void)float_api; #endif +#ifdef ENABLE_DRED + if ( st->dred_duration > 0 && st->dred_encoder.loaded ) { + int frame_size_400Hz; + /* DRED Encoder */ + dred_compute_latents( &st->dred_encoder, &pcm_buf[total_buffer*st->channels], frame_size, total_buffer, st->arch ); + frame_size_400Hz = frame_size*400/st->Fs; + OPUS_MOVE(&st->activity_mem[frame_size_400Hz], st->activity_mem, 4*DRED_MAX_FRAMES-frame_size_400Hz); + for (i=0;iactivity_mem[i] = activity; + } else { + st->dred_encoder.latents_buffer_fill = 0; + OPUS_CLEAR(st->activity_mem, DRED_MAX_FRAMES); + } +#endif /* SILK processing */ HB_gain = Q15ONE; @@ -1763,7 +1954,7 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ st->silk_mode.maxInternalSampleRate = 16000; if (st->mode == MODE_SILK_ONLY) { - opus_int32 effective_max_rate = max_rate; + opus_int32 effective_max_rate = frame_rate*max_data_bytes*8; if (frame_rate > 50) effective_max_rate = effective_max_rate*2/3; if (effective_max_rate < 8000) @@ -1793,9 +1984,19 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ } if (st->silk_mode.useCBR) { + /* When we're in CBR mode, but we have non-SILK data to encode, switch SILK to VBR with cap to + save on complexity. Any variations will be absorbed by CELT and/or DRED and we can still + produce a constant bitrate without wasting bits. */ +#ifdef ENABLE_DRED + if (st->mode == MODE_HYBRID || dred_bitrate_bps > 0) +#else if (st->mode == MODE_HYBRID) +#endif { - st->silk_mode.maxBits = IMIN(st->silk_mode.maxBits, st->silk_mode.bitRate * frame_size / st->Fs); + /* Allow SILK to steal up to 25% of the remaining bits */ + opus_int16 other_bits = IMAX(0, st->silk_mode.maxBits - st->silk_mode.bitRate * frame_size / st->Fs); + st->silk_mode.maxBits = IMAX(0, st->silk_mode.maxBits - other_bits*3/4); + st->silk_mode.useCBR = 0; } } else { /* Constrained VBR. */ @@ -1908,26 +2109,10 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ if (st->mode != MODE_SILK_ONLY) { opus_val32 celt_pred=2; - celt_encoder_ctl(celt_enc, OPUS_SET_VBR(0)); /* We may still decide to disable prediction later */ if (st->silk_mode.reducedDependency) celt_pred = 0; celt_encoder_ctl(celt_enc, CELT_SET_PREDICTION(celt_pred)); - - if (st->mode == MODE_HYBRID) - { - if( st->use_vbr ) { - celt_encoder_ctl(celt_enc, OPUS_SET_BITRATE(st->bitrate_bps-st->silk_mode.bitRate)); - celt_encoder_ctl(celt_enc, OPUS_SET_VBR_CONSTRAINT(0)); - } - } else { - if (st->use_vbr) - { - celt_encoder_ctl(celt_enc, OPUS_SET_VBR(1)); - celt_encoder_ctl(celt_enc, OPUS_SET_VBR_CONSTRAINT(st->vbr_constraint)); - celt_encoder_ctl(celt_enc, OPUS_SET_BITRATE(st->bitrate_bps)); - } - } } ALLOC(tmp_prefill, st->channels*st->Fs/400, opus_val16); @@ -2021,13 +2206,27 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ ec_enc_done(&enc); nb_compr_bytes = ret; } else { - nb_compr_bytes = (max_data_bytes-1)-redundancy_bytes; - ec_enc_shrink(&enc, nb_compr_bytes); + nb_compr_bytes = (max_data_bytes-1)-redundancy_bytes; +#ifdef ENABLE_DRED + if (st->dred_duration > 0) + { + int max_celt_bytes; + opus_int32 dred_bytes = dred_bitrate_bps/(frame_rate*8); + /* Allow CELT to steal up to 25% of the remaining bits. */ + max_celt_bytes = nb_compr_bytes - dred_bytes*3/4; + /* But try to give CELT at least 5 bytes to prevent a mismatch with + the redundancy signaling. */ + max_celt_bytes = IMAX((ec_tell(&enc)+7)/8 + 5, max_celt_bytes); + /* Subject to the original max. */ + nb_compr_bytes = IMIN(nb_compr_bytes, max_celt_bytes); + } +#endif + ec_enc_shrink(&enc, nb_compr_bytes); } #ifndef DISABLE_FLOAT_API if (redundancy || st->mode != MODE_SILK_ONLY) - celt_encoder_ctl(celt_enc, CELT_SET_ANALYSIS(&analysis_info)); + celt_encoder_ctl(celt_enc, CELT_SET_ANALYSIS(analysis_info)); #endif if (st->mode == MODE_HYBRID) { SILKInfo info; @@ -2057,6 +2256,34 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ if (st->mode != MODE_SILK_ONLY) { + celt_encoder_ctl(celt_enc, OPUS_SET_VBR(st->use_vbr)); + if (st->mode == MODE_HYBRID) + { + if( st->use_vbr ) { + celt_encoder_ctl(celt_enc, OPUS_SET_BITRATE(st->bitrate_bps-st->silk_mode.bitRate)); + celt_encoder_ctl(celt_enc, OPUS_SET_VBR_CONSTRAINT(0)); + } + } else { + if (st->use_vbr) + { + celt_encoder_ctl(celt_enc, OPUS_SET_VBR(1)); + celt_encoder_ctl(celt_enc, OPUS_SET_VBR_CONSTRAINT(st->vbr_constraint)); + celt_encoder_ctl(celt_enc, OPUS_SET_BITRATE(st->bitrate_bps)); + } + } +#ifdef ENABLE_DRED + /* When Using DRED CBR, we can actually make the CELT part VBR and have DRED pick up the slack. */ + if (!st->use_vbr && st->dred_duration > 0) + { + opus_int32 celt_bitrate = st->bitrate_bps; + celt_encoder_ctl(celt_enc, OPUS_SET_VBR(1)); + celt_encoder_ctl(celt_enc, OPUS_SET_VBR_CONSTRAINT(0)); + if (st->mode == MODE_HYBRID) { + celt_bitrate -= st->silk_mode.bitRate; + } + celt_encoder_ctl(celt_enc, OPUS_SET_BITRATE(celt_bitrate)); + } +#endif if (st->mode != st->prev_mode && st->prev_mode > 0) { unsigned char dummy[2]; @@ -2069,10 +2296,6 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ /* If false, we already busted the budget and we'll end up with a "PLC frame" */ if (ec_tell(&enc) <= 8*nb_compr_bytes) { - /* Set the bitrate again if it was overridden in the redundancy code above*/ - if (redundancy && celt_to_silk && st->mode==MODE_HYBRID && st->use_vbr) - celt_encoder_ctl(celt_enc, OPUS_SET_BITRATE(st->bitrate_bps-st->silk_mode.bitRate)); - celt_encoder_ctl(celt_enc, OPUS_SET_VBR(st->use_vbr)); ret = celt_encode_with_ec(celt_enc, pcm_buf, frame_size, NULL, nb_compr_bytes, &enc); if (ret < 0) { @@ -2080,10 +2303,10 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ return OPUS_INTERNAL_ERROR; } /* Put CELT->SILK redundancy data in the right place. */ - if (redundancy && celt_to_silk && st->mode==MODE_HYBRID && st->use_vbr) + if (redundancy && celt_to_silk && st->mode==MODE_HYBRID && nb_compr_bytes != ret) { OPUS_MOVE(data+ret, data+nb_compr_bytes, redundancy_bytes); - nb_compr_bytes = nb_compr_bytes+redundancy_bytes; + nb_compr_bytes = ret+redundancy_bytes; } } } @@ -2140,7 +2363,7 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ /* DTX decision */ #ifndef DISABLE_FLOAT_API - if (st->use_dtx && (analysis_info.valid || is_silence)) + if (st->use_dtx && (analysis_info->valid || is_silence)) { if (decide_dtx_mode(activity, &st->nb_no_activity_ms_Q1, 2*1000*frame_size/st->Fs)) { @@ -2178,7 +2401,51 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ } /* Count ToC and redundancy */ ret += 1+redundancy_bytes; - if (!st->use_vbr) + apply_padding = !st->use_vbr; +#ifdef ENABLE_DRED + if (st->dred_duration > 0 && st->dred_encoder.loaded && first_frame) { + opus_extension_data extension; + unsigned char buf[DRED_MAX_DATA_SIZE]; + int dred_chunks; + int dred_bytes_left; + dred_chunks = IMIN((st->dred_duration+5)/4, DRED_NUM_REDUNDANCY_FRAMES/2); + if (st->use_vbr) dred_chunks = IMIN(dred_chunks, st->dred_target_chunks); + /* Remaining space for DRED, accounting for cost the 3 extra bytes for code 3, padding length, and extension number. */ + dred_bytes_left = IMIN(DRED_MAX_DATA_SIZE, max_data_bytes-ret-3); + /* Account for the extra bytes required to signal large padding length. */ + dred_bytes_left -= (dred_bytes_left+1+DRED_EXPERIMENTAL_BYTES)/255; + /* Check whether we actually have something to encode. */ + if (dred_chunks >= 1 && dred_bytes_left >= DRED_MIN_BYTES+DRED_EXPERIMENTAL_BYTES) { + int dred_bytes; +#ifdef DRED_EXPERIMENTAL_VERSION + /* Add temporary extension type and version. + These bytes will be removed once extension is finalized. */ + buf[0] = 'D'; + buf[1] = DRED_EXPERIMENTAL_VERSION; +#endif + dred_bytes = dred_encode_silk_frame(&st->dred_encoder, buf+DRED_EXPERIMENTAL_BYTES, dred_chunks, dred_bytes_left-DRED_EXPERIMENTAL_BYTES, + st->dred_q0, st->dred_dQ, st->dred_qmax, st->activity_mem, st->arch); + if (dred_bytes > 0) { + dred_bytes += DRED_EXPERIMENTAL_BYTES; + celt_assert(dred_bytes <= dred_bytes_left); + extension.id = DRED_EXTENSION_ID; + extension.frame = 0; + extension.data = buf; + extension.len = dred_bytes; + ret = opus_packet_pad_impl(data, ret, max_data_bytes, !st->use_vbr, &extension, 1); + if (ret < 0) + { + RESTORE_STACK; + return OPUS_INTERNAL_ERROR; + } + apply_padding = 0; + } + } + } +#else + (void)first_frame; /* Avoids a warning about first_frame being unused. */ +#endif + if (apply_padding) { if (opus_packet_pad(data, ret, max_data_bytes) != OPUS_OK) { @@ -2677,6 +2944,29 @@ int opus_encoder_ctl(OpusEncoder *st, int request, ...) celt_encoder_ctl(celt_enc, OPUS_GET_PHASE_INVERSION_DISABLED(value)); } break; +#ifdef ENABLE_DRED + case OPUS_SET_DRED_DURATION_REQUEST: + { + opus_int32 value = va_arg(ap, opus_int32); + if(value<0 || value>DRED_MAX_FRAMES) + { + goto bad_arg; + } + st->dred_duration = value; + st->silk_mode.useDRED = !!value; + } + break; + case OPUS_GET_DRED_DURATION_REQUEST: + { + opus_int32 *value = va_arg(ap, opus_int32*); + if (!value) + { + goto bad_arg; + } + *value = st->dred_duration; + } + break; +#endif case OPUS_RESET_STATE: { void *silk_enc; @@ -2692,6 +2982,10 @@ int opus_encoder_ctl(OpusEncoder *st, int request, ...) celt_encoder_ctl(celt_enc, OPUS_RESET_STATE); silk_InitEncoder( silk_enc, st->arch, &dummy ); +#ifdef ENABLE_DRED + /* Initialize DRED Encoder */ + dred_encoder_reset( &st->dred_encoder ); +#endif st->stream_channels = st->channels; st->hybrid_stereo_width_Q14 = 1 << 14; st->prev_HB_gain = Q15ONE; @@ -2752,6 +3046,21 @@ int opus_encoder_ctl(OpusEncoder *st, int request, ...) } } break; +#ifdef USE_WEIGHTS_FILE + case OPUS_SET_DNN_BLOB_REQUEST: + { + const unsigned char *data = va_arg(ap, const unsigned char *); + opus_int32 len = va_arg(ap, opus_int32); + if(len<0 || data == NULL) + { + goto bad_arg; + } +#ifdef ENABLE_DRED + ret = dred_encoder_load_model(&st->dred_encoder, data, len); +#endif + } + break; +#endif case CELT_GET_MODE_REQUEST: { const CELTMode ** value = va_arg(ap, const CELTMode**); diff --git a/src/libs/opus/src/opus_multistream_decoder.c b/src/libs/opus/src/opus_multistream_decoder.c index a2837c35..4ae877a7 100644 --- a/src/libs/opus/src/opus_multistream_decoder.c +++ b/src/libs/opus/src/opus_multistream_decoder.c @@ -162,7 +162,7 @@ static int opus_multistream_packet_validate(const unsigned char *data, if (len<=0) return OPUS_INVALID_PACKET; count = opus_packet_parse_impl(data, len, s!=nb_streams-1, &toc, NULL, - size, NULL, &packet_offset); + size, NULL, &packet_offset, NULL, NULL); if (count<0) return count; tmp_samples = opus_packet_get_nb_samples(data, packet_offset, Fs); @@ -250,7 +250,7 @@ int opus_multistream_decode_native( return OPUS_INTERNAL_ERROR; } packet_offset = 0; - ret = opus_decode_native(dec, data, len, buf, frame_size, decode_fec, s!=st->layout.nb_streams-1, &packet_offset, soft_clip); + ret = opus_decode_native(dec, data, len, buf, frame_size, decode_fec, s!=st->layout.nb_streams-1, &packet_offset, soft_clip, NULL, 0); if (!do_plc) { data += packet_offset; diff --git a/src/libs/opus/src/opus_multistream_encoder.c b/src/libs/opus/src/opus_multistream_encoder.c index 213e3eb2..1725ade7 100644 --- a/src/libs/opus/src/opus_multistream_encoder.c +++ b/src/libs/opus/src/opus_multistream_encoder.c @@ -1003,7 +1003,7 @@ int opus_multistream_encode_native return OPUS_INTERNAL_ERROR; } len = opus_repacketizer_out_range_impl(&rp, 0, opus_repacketizer_get_nb_frames(&rp), - data, max_data_bytes-tot_size, s != st->layout.nb_streams-1, !vbr && s == st->layout.nb_streams-1); + data, max_data_bytes-tot_size, s != st->layout.nb_streams-1, !vbr && s == st->layout.nb_streams-1, NULL, 0); data += len; tot_size += len; } diff --git a/src/libs/opus/src/opus_private.h b/src/libs/opus/src/opus_private.h index 5e2463f5..279f5f95 100644 --- a/src/libs/opus/src/opus_private.h +++ b/src/libs/opus/src/opus_private.h @@ -42,8 +42,17 @@ struct OpusRepacketizer { const unsigned char *frames[48]; opus_int16 len[48]; int framesize; + const unsigned char *paddings[48]; + opus_int32 padding_len[48]; }; +typedef struct { + int id; + int frame; + const unsigned char *data; + opus_int32 len; +} opus_extension_data; + typedef struct ChannelLayout { int nb_channels; int nb_streams; @@ -148,7 +157,7 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ int opus_decode_native(OpusDecoder *st, const unsigned char *data, opus_int32 len, opus_val16 *pcm, int frame_size, int decode_fec, int self_delimited, - opus_int32 *packet_offset, int soft_clip); + opus_int32 *packet_offset, int soft_clip, const OpusDRED *dred, opus_int32 dred_offset); /* Make sure everything is properly aligned. */ static OPUS_INLINE int align(int i) @@ -162,13 +171,18 @@ static OPUS_INLINE int align(int i) return ((i + alignment - 1) / alignment) * alignment; } +/* More than that is ridiculous for now (3 * max frames per packet)*/ +opus_int32 skip_extension(const unsigned char **data, opus_int32 len, opus_int32 *header_size); + int opus_packet_parse_impl(const unsigned char *data, opus_int32 len, int self_delimited, unsigned char *out_toc, const unsigned char *frames[48], opus_int16 size[48], - int *payload_offset, opus_int32 *packet_offset); + int *payload_offset, opus_int32 *packet_offset, + const unsigned char **padding, opus_int32 *padding_len); opus_int32 opus_repacketizer_out_range_impl(OpusRepacketizer *rp, int begin, int end, - unsigned char *data, opus_int32 maxlen, int self_delimited, int pad); + unsigned char *data, opus_int32 maxlen, int self_delimited, int pad, + const opus_extension_data *extensions, int nb_extensions); int pad_frame(unsigned char *data, opus_int32 len, opus_int32 new_len); @@ -198,4 +212,12 @@ int opus_multistream_decode_native( void *user_data ); +opus_int32 opus_packet_extensions_parse(const unsigned char *data, opus_int32 len, opus_extension_data *extensions, opus_int32 *nb_extensions); + +opus_int32 opus_packet_extensions_generate(unsigned char *data, opus_int32 len, const opus_extension_data *extensions, opus_int32 nb_extensions, int pad); + +opus_int32 opus_packet_extensions_count(const unsigned char *data, opus_int32 len); + +opus_int32 opus_packet_pad_impl(unsigned char *data, opus_int32 len, opus_int32 new_len, int pad, const opus_extension_data *extensions, int nb_extensions); + #endif /* OPUS_PRIVATE_H */ diff --git a/src/libs/opus/src/opus_projection_encoder.c b/src/libs/opus/src/opus_projection_encoder.c index 06fb2d25..92813ad0 100644 --- a/src/libs/opus/src/opus_projection_encoder.c +++ b/src/libs/opus/src/opus_projection_encoder.c @@ -177,6 +177,20 @@ opus_int32 opus_projection_ambisonics_encoder_get_size(int channels, demixing_matrix_rows = mapping_matrix_toa_demixing.rows; demixing_matrix_cols = mapping_matrix_toa_demixing.cols; } + else if (order_plus_one == 5) + { + mixing_matrix_rows = mapping_matrix_fourthoa_mixing.rows; + mixing_matrix_cols = mapping_matrix_fourthoa_mixing.cols; + demixing_matrix_rows = mapping_matrix_fourthoa_demixing.rows; + demixing_matrix_cols = mapping_matrix_fourthoa_demixing.cols; + } + else if (order_plus_one == 6) + { + mixing_matrix_rows = mapping_matrix_fifthoa_mixing.rows; + mixing_matrix_cols = mapping_matrix_fifthoa_mixing.cols; + demixing_matrix_rows = mapping_matrix_fifthoa_demixing.rows; + demixing_matrix_cols = mapping_matrix_fifthoa_demixing.cols; + } else return 0; @@ -245,6 +259,20 @@ int opus_projection_ambisonics_encoder_init(OpusProjectionEncoder *st, opus_int3 mapping_matrix_toa_mixing_data, sizeof(mapping_matrix_toa_mixing_data)); } + else if (order_plus_one == 5) + { + mapping_matrix_init(mixing_matrix, mapping_matrix_fourthoa_mixing.rows, + mapping_matrix_fourthoa_mixing.cols, mapping_matrix_fourthoa_mixing.gain, + mapping_matrix_fourthoa_mixing_data, + sizeof(mapping_matrix_fourthoa_mixing_data)); + } + else if (order_plus_one == 6) + { + mapping_matrix_init(mixing_matrix, mapping_matrix_fifthoa_mixing.rows, + mapping_matrix_fifthoa_mixing.cols, mapping_matrix_fifthoa_mixing.gain, + mapping_matrix_fifthoa_mixing_data, + sizeof(mapping_matrix_fifthoa_mixing_data)); + } else return OPUS_BAD_ARG; @@ -275,6 +303,20 @@ int opus_projection_ambisonics_encoder_init(OpusProjectionEncoder *st, opus_int3 mapping_matrix_toa_demixing.cols, mapping_matrix_toa_demixing.gain, mapping_matrix_toa_demixing_data, sizeof(mapping_matrix_toa_demixing_data)); + } + else if (order_plus_one == 5) + { + mapping_matrix_init(demixing_matrix, mapping_matrix_fourthoa_demixing.rows, + mapping_matrix_fourthoa_demixing.cols, mapping_matrix_fourthoa_demixing.gain, + mapping_matrix_fourthoa_demixing_data, + sizeof(mapping_matrix_fourthoa_demixing_data)); + } + else if (order_plus_one == 6) + { + mapping_matrix_init(demixing_matrix, mapping_matrix_fifthoa_demixing.rows, + mapping_matrix_fifthoa_demixing.cols, mapping_matrix_fifthoa_demixing.gain, + mapping_matrix_fifthoa_demixing_data, + sizeof(mapping_matrix_fifthoa_demixing_data)); } else return OPUS_BAD_ARG; diff --git a/src/libs/opus/src/repacketizer.c b/src/libs/opus/src/repacketizer.c index bda44a14..79798b02 100644 --- a/src/libs/opus/src/repacketizer.c +++ b/src/libs/opus/src/repacketizer.c @@ -32,6 +32,7 @@ #include "opus.h" #include "opus_private.h" #include "os_support.h" +#include "stack_alloc.h" int opus_repacketizer_get_size(void) @@ -82,10 +83,19 @@ static int opus_repacketizer_cat_impl(OpusRepacketizer *rp, const unsigned char return OPUS_INVALID_PACKET; } - ret=opus_packet_parse_impl(data, len, self_delimited, &tmp_toc, &rp->frames[rp->nb_frames], &rp->len[rp->nb_frames], NULL, NULL); + ret=opus_packet_parse_impl(data, len, self_delimited, &tmp_toc, &rp->frames[rp->nb_frames], &rp->len[rp->nb_frames], + NULL, NULL, &rp->paddings[rp->nb_frames], &rp->padding_len[rp->nb_frames]); if(ret<1)return ret; - rp->nb_frames += curr_nb_frames; + /* set padding length to zero for all but the first frame */ + while (curr_nb_frames > 1) + { + rp->nb_frames++; + rp->padding_len[rp->nb_frames] = 0; + rp->paddings[rp->nb_frames] = NULL; + curr_nb_frames--; + } + rp->nb_frames++; return OPUS_OK; } @@ -100,17 +110,23 @@ int opus_repacketizer_get_nb_frames(OpusRepacketizer *rp) } opus_int32 opus_repacketizer_out_range_impl(OpusRepacketizer *rp, int begin, int end, - unsigned char *data, opus_int32 maxlen, int self_delimited, int pad) + unsigned char *data, opus_int32 maxlen, int self_delimited, int pad, const opus_extension_data *extensions, int nb_extensions) { int i, count; opus_int32 tot_size; opus_int16 *len; const unsigned char **frames; unsigned char * ptr; + int ones_begin=0, ones_end=0; + int ext_begin=0, ext_len=0; + int ext_count, total_ext_count; + VARDECL(opus_extension_data, all_extensions); + SAVE_STACK; if (begin<0 || begin>=end || end>rp->nb_frames) { /*fprintf(stderr, "%d %d %d\n", begin, end, rp->nb_frames);*/ + RESTORE_STACK; return OPUS_BAD_ARG; } count = end-begin; @@ -122,13 +138,51 @@ opus_int32 opus_repacketizer_out_range_impl(OpusRepacketizer *rp, int begin, int else tot_size = 0; + /* figure out total number of extensions */ + total_ext_count = nb_extensions; + for (i=begin;ipaddings[i], rp->padding_len[i]); + if (n > 0) total_ext_count += n; + } + ALLOC(all_extensions, total_ext_count ? total_ext_count : ALLOC_NONE, opus_extension_data); + /* copy over any extensions that were passed in */ + for (ext_count=0;ext_countpaddings[i], rp->padding_len[i], + &all_extensions[ext_count], &frame_ext_count); + if (ret<0) + { + RESTORE_STACK; + return OPUS_INTERNAL_ERROR; + } + /* renumber the extension frame numbers */ + for (j=0;j maxlen) + { + RESTORE_STACK; return OPUS_BUFFER_TOO_SMALL; + } *ptr++ = rp->toc&0xFC; } else if (count==2) { @@ -137,18 +191,24 @@ opus_int32 opus_repacketizer_out_range_impl(OpusRepacketizer *rp, int begin, int /* Code 1 */ tot_size += 2*len[0]+1; if (tot_size > maxlen) + { + RESTORE_STACK; return OPUS_BUFFER_TOO_SMALL; + } *ptr++ = (rp->toc&0xFC) | 0x1; } else { /* Code 2 */ tot_size += len[0]+len[1]+2+(len[0]>=252); if (tot_size > maxlen) + { + RESTORE_STACK; return OPUS_BUFFER_TOO_SMALL; + } *ptr++ = (rp->toc&0xFC) | 0x2; ptr += encode_size(len[0], ptr); } } - if (count > 2 || (pad && tot_size < maxlen)) + if (count > 2 || (pad && tot_size < maxlen) || ext_count > 0) { /* Code 3 */ int vbr; @@ -177,22 +237,45 @@ opus_int32 opus_repacketizer_out_range_impl(OpusRepacketizer *rp, int begin, int tot_size += len[count-1]; if (tot_size > maxlen) + { + RESTORE_STACK; return OPUS_BUFFER_TOO_SMALL; + } *ptr++ = (rp->toc&0xFC) | 0x3; *ptr++ = count | 0x80; } else { tot_size += count*len[0]+2; if (tot_size > maxlen) + { + RESTORE_STACK; return OPUS_BUFFER_TOO_SMALL; + } *ptr++ = (rp->toc&0xFC) | 0x3; *ptr++ = count; } pad_amount = pad ? (maxlen-tot_size) : 0; + if (ext_count>0) + { + /* figure out how much space we need for the extensions */ + ext_len = opus_packet_extensions_generate(NULL, maxlen-tot_size, all_extensions, ext_count, 0); + if (ext_len < 0) return ext_len; + if (!pad) + pad_amount = ext_len + ext_len/254 + 1; + } if (pad_amount != 0) { int nb_255s; data[1] |= 0x40; nb_255s = (pad_amount-1)/255; + if (tot_size + ext_len + nb_255s + 1 > maxlen) + { + RESTORE_STACK; + return OPUS_BUFFER_TOO_SMALL; + } + ext_begin = tot_size+pad_amount-ext_len; + /* Prepend 0x01 padding */ + ones_begin = tot_size+nb_255s+1; + ones_end = tot_size+pad_amount-ext_len; for (i=0;i 0) { + int ret = opus_packet_extensions_generate(&data[ext_begin], ext_len, all_extensions, ext_count, 0); + celt_assert(ret == ext_len); + } + for (i=ones_begin;inb_frames, data, maxlen, 0, 0); + return opus_repacketizer_out_range_impl(rp, 0, rp->nb_frames, data, maxlen, 0, 0, NULL, 0); } -int opus_packet_pad(unsigned char *data, opus_int32 len, opus_int32 new_len) +opus_int32 opus_packet_pad_impl(unsigned char *data, opus_int32 len, opus_int32 new_len, int pad, const opus_extension_data *extensions, int nb_extensions) { OpusRepacketizer rp; opus_int32 ret; + VARDECL(unsigned char, copy); + SAVE_STACK; if (len < 1) return OPUS_BAD_ARG; if (len==new_len) return OPUS_OK; else if (len > new_len) return OPUS_BAD_ARG; + ALLOC(copy, len, unsigned char); opus_repacketizer_init(&rp); /* Moving payload to the end of the packet so we can do in-place padding */ - OPUS_MOVE(data+new_len-len, data, len); - ret = opus_repacketizer_cat(&rp, data+new_len-len, len); + OPUS_COPY(copy, data, len); + ret = opus_repacketizer_cat(&rp, copy, len); if (ret != OPUS_OK) return ret; - ret = opus_repacketizer_out_range_impl(&rp, 0, rp.nb_frames, data, new_len, 0, 1); + ret = opus_repacketizer_out_range_impl(&rp, 0, rp.nb_frames, data, new_len, 0, pad, extensions, nb_extensions); + RESTORE_STACK; + return ret; +} + +int opus_packet_pad(unsigned char *data, opus_int32 len, opus_int32 new_len) +{ + opus_int32 ret; + ALLOC_STACK; + ret = opus_packet_pad_impl(data, len, new_len, 1, NULL, 0); + RESTORE_STACK; if (ret > 0) return OPUS_OK; else @@ -264,13 +367,19 @@ opus_int32 opus_packet_unpad(unsigned char *data, opus_int32 len) { OpusRepacketizer rp; opus_int32 ret; + int i; if (len < 1) return OPUS_BAD_ARG; opus_repacketizer_init(&rp); ret = opus_repacketizer_cat(&rp, data, len); if (ret < 0) return ret; - ret = opus_repacketizer_out_range_impl(&rp, 0, rp.nb_frames, data, len, 0, 0); + /* Discard all padding and extensions. */ + for (i=0;i 0 && ret <= len); return ret; } @@ -297,7 +406,7 @@ int opus_multistream_packet_pad(unsigned char *data, opus_int32 len, opus_int32 if (len<=0) return OPUS_INVALID_PACKET; count = opus_packet_parse_impl(data, len, 1, &toc, NULL, - size, NULL, &packet_offset); + size, NULL, &packet_offset, NULL, NULL); if (count<0) return count; data += packet_offset; @@ -324,18 +433,24 @@ opus_int32 opus_multistream_packet_unpad(unsigned char *data, opus_int32 len, in for (s=0;s$log_file 2>&1 +# Test script is run here. We create the file first, then append to it, +# to ameliorate tests themselves also writing to the log file. Our tests +# don't, but others can (automake bug#35762). +: >"$log_file" +"$@" >>"$log_file" 2>&1 estatus=$? if test $enable_hard_errors = no && test $estatus -eq 99; then @@ -126,7 +131,7 @@ esac # know whether the test passed or failed simply by looking at the '.log' # file, without the need of also peaking into the corresponding '.trs' # file (automake bug#11814). -echo "$res $test_name (exit status: $estatus)" >>$log_file +echo "$res $test_name (exit status: $estatus)" >>"$log_file" # Report outcome to console. echo "${col}${res}${std}: $test_name" diff --git a/src/libs/opus/tests/meson.build b/src/libs/opus/tests/meson.build index 5f3ac9df..1a4040b5 100644 --- a/src/libs/opus/tests/meson.build +++ b/src/libs/opus/tests/meson.build @@ -1,12 +1,17 @@ # Tests that link to libopus opus_tests = [ ['test_opus_api'], - ['test_opus_decode', [], 60], - ['test_opus_encode', 'opus_encode_regressions.c', 120], + ['test_opus_decode', [], 120], + ['test_opus_encode', 'opus_encode_regressions.c', 240], + ['test_opus_extensions', [], 120], ['test_opus_padding'], ['test_opus_projection'], ] +if opt_dred.enabled() + opus_tests += [['test_opus_dred', [], 60 * 20]] +endif + foreach t : opus_tests test_name = t.get(0) extra_srcs = t.get(1, []) @@ -18,9 +23,9 @@ foreach t : opus_tests exe_kwargs = {} # This test uses private symbols - if test_name == 'test_opus_projection' + if test_name == 'test_opus_projection' or test_name == 'test_opus_extensions' exe_kwargs = { - 'link_with': [celt_lib, silk_lib], + 'link_with': [celt_lib, silk_lib, dnn_lib], 'objects': opus_lib.extract_all_objects(), } endif diff --git a/src/libs/opus/tests/test_opus_api.c b/src/libs/opus/tests/test_opus_api.c index 0e7ed2cc..9500d407 100644 --- a/src/libs/opus/tests/test_opus_api.c +++ b/src/libs/opus/tests/test_opus_api.c @@ -103,7 +103,7 @@ opus_int32 test_dec_api(void) for(c=0;c<4;c++) { i=opus_decoder_get_size(c); - if(((c==1||c==2)&&(i<=2048||i>1<<16))||((c!=1&&c!=2)&&i!=0))test_failed(); + if(((c==1||c==2)&&(i<=2048||i>1<<18))||((c!=1&&c!=2)&&i!=0))test_failed(); fprintf(stdout," opus_decoder_get_size(%d)=%d ...............%s OK.\n",c,i,i>0?"":"...."); cfgs++; } @@ -367,7 +367,7 @@ opus_int32 test_msdec_api(void) for(b=-1;b<4;b++) { i=opus_multistream_decoder_get_size(a,b); - if(((a>0&&b<=a&&b>=0)&&(i<=2048||i>((1<<16)*a)))||((a<1||b>a||b<0)&&i!=0))test_failed(); + if(((a>0&&b<=a&&b>=0)&&(i<=2048||i>((1<<18)*a)))||((a<1||b>a||b<0)&&i!=0))test_failed(); fprintf(stdout," opus_multistream_decoder_get_size(%2d,%2d)=%d %sOK.\n",a,b,i,i>0?"":"... "); cfgs++; } @@ -1081,7 +1081,7 @@ opus_int32 test_enc_api(void) for(c=0;c<4;c++) { i=opus_encoder_get_size(c); - if(((c==1||c==2)&&(i<=2048||i>1<<17))||((c!=1&&c!=2)&&i!=0))test_failed(); + if(((c==1||c==2)&&(i<=2048||i>1<<18))||((c!=1&&c!=2)&&i!=0))test_failed(); fprintf(stdout," opus_encoder_get_size(%d)=%d ...............%s OK.\n",c,i,i>0?"":"...."); cfgs++; } diff --git a/src/libs/opus/tests/test_opus_common.h b/src/libs/opus/tests/test_opus_common.h index 5fb924f4..a03733a9 100644 --- a/src/libs/opus/tests/test_opus_common.h +++ b/src/libs/opus/tests/test_opus_common.h @@ -82,4 +82,5 @@ static OPUS_INLINE void _test_failed(const char *file, int line) } #define test_failed() _test_failed(__FILE__, __LINE__); #define opus_test_assert(cond) {if (!(cond)) {test_failed();}} +#define expect_true(cond, msg) {if (!(cond)) {fprintf(stderr, "FAIL - %s\n", msg); test_failed();}} void regression_test(void); diff --git a/src/libs/opus/tests/test_opus_decode.c b/src/libs/opus/tests/test_opus_decode.c index 2d1e2d41..8725fa49 100644 --- a/src/libs/opus/tests/test_opus_decode.c +++ b/src/libs/opus/tests/test_opus_decode.c @@ -105,6 +105,9 @@ int test_decoder_code0(int no_fuzz) for(fec=0;fec<2;fec++) { opus_int32 dur; +#if defined(ENABLE_OSCE) || defined(ENABLE_DEEP_PLC) + opus_decoder_ctl(dec[t], OPUS_SET_COMPLEXITY(fast_rand()%11)); +#endif /*Test PLC on a fresh decoder*/ out_samples = opus_decode(dec[t], 0, 0, outbuf, 120/factor, fec); if(out_samples!=120/factor)test_failed(); @@ -185,6 +188,9 @@ int test_decoder_code0(int no_fuzz) packet[1]=j; for(t=0;t<5*2;t++) { +#if defined(ENABLE_OSCE) || defined(ENABLE_DEEP_PLC) + opus_decoder_ctl(dec[t], OPUS_SET_COMPLEXITY(fast_rand()%11)); +#endif out_samples = opus_decode(dec[t], packet, 3, outbuf, MAX_FRAME_SAMP, 0); if(out_samples!=expected[t])test_failed(); if(opus_decoder_ctl(dec[t], OPUS_GET_LAST_PACKET_DURATION(&dur))!=OPUS_OK)test_failed(); @@ -200,6 +206,9 @@ int test_decoder_code0(int no_fuzz) /* The PLC is run for 6 frames in order to get better PLC coverage. */ for(j=0;j<6;j++) { +#if defined(ENABLE_OSCE) || defined(ENABLE_DEEP_PLC) + opus_decoder_ctl(dec[t], OPUS_SET_COMPLEXITY(fast_rand()%11)); +#endif out_samples = opus_decode(dec[t], 0, 0, outbuf, expected[t], 0); if(out_samples!=expected[t])test_failed(); if(opus_decoder_ctl(dec[t], OPUS_GET_LAST_PACKET_DURATION(&dur))!=OPUS_OK)test_failed(); @@ -295,6 +304,9 @@ int test_decoder_code0(int no_fuzz) for(jj=0;jj= frame_size && (fast_rand()&1)) { + dred_ret = opus_decoder_dred_decode(dec, dred, frame_size, outbuf, frame_size); + if(dred_ret<0) { + fprintf(stderr,"opus_decoder_dred_decode() returned %d\n",dred_ret); + ret = -1; + break; + } + } +#endif out_samples = opus_decode(dec, packet, len, outbuf, MAX_FRAME_SAMP, 0); if(out_samples!=frame_size) { fprintf(stderr,"opus_decode() returned %d\n",out_samples); @@ -175,7 +198,10 @@ int test_encode(OpusEncoder *enc, int channels, int frame_size, OpusDecoder *dec samp_count += frame_size; } while (samp_count < ((SSAMPLES/2)-MAX_FRAME_SAMP)); - +#ifdef ENABLE_DRED + opus_dred_decoder_destroy(dred_dec); + opus_dred_free(dred); +#endif /* Clean up */ free(inbuf); free(outbuf); @@ -250,7 +276,9 @@ void fuzz_encoder_settings(const int num_encoders, const int num_setting_changes if(opus_encoder_ctl(enc, OPUS_SET_PREDICTION_DISABLED(pred_disabled)) != OPUS_OK) test_failed(); if(opus_encoder_ctl(enc, OPUS_SET_DTX(dtx)) != OPUS_OK) test_failed(); if(opus_encoder_ctl(enc, OPUS_SET_EXPERT_FRAME_DURATION(frame_size_enum)) != OPUS_OK) test_failed(); - +#ifdef ENABLE_DRED + if(opus_encoder_ctl(enc, OPUS_SET_DRED_DURATION(fast_rand()%101)) != OPUS_OK) test_failed(); +#endif if(test_encode(enc, num_channels, frame_size, dec)) { fprintf(stderr, "fuzz_encoder_settings: %d kHz, %d ch, application: %d, " @@ -395,6 +423,9 @@ int run_test1(int no_fuzz) if(opus_encoder_ctl(enc, OPUS_SET_VBR_CONSTRAINT(rc==1))!=OPUS_OK)test_failed(); if(opus_encoder_ctl(enc, OPUS_SET_VBR_CONSTRAINT(rc==1))!=OPUS_OK)test_failed(); if(opus_encoder_ctl(enc, OPUS_SET_INBAND_FEC(rc==0))!=OPUS_OK)test_failed(); +#ifdef ENABLE_DRED + if(opus_encoder_ctl(enc, OPUS_SET_DRED_DURATION(fast_rand()%101)) != OPUS_OK) test_failed(); +#endif for(j=0;j<13;j++) { int rate; diff --git a/src/libs/opus/tests/test_opus_padding.c b/src/libs/opus/tests/test_opus_padding.c index c9ef7375..1851b02b 100644 --- a/src/libs/opus/tests/test_opus_padding.c +++ b/src/libs/opus/tests/test_opus_padding.c @@ -29,6 +29,10 @@ * http://lists.xiph.org/pipermail/opus/2012-November/001834.html */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/src/libs/opus/tests/test_opus_projection.c b/src/libs/opus/tests/test_opus_projection.c index 4e06613e..9bdf86bb 100644 --- a/src/libs/opus/tests/test_opus_projection.c +++ b/src/libs/opus/tests/test_opus_projection.c @@ -231,7 +231,7 @@ void test_creation_arguments(const int channels, const int mapping_family) opus_free(matrix); } - is_channels_valid = (order_plus_one >= 2 && order_plus_one <= 4) && + is_channels_valid = (order_plus_one >= 2 && order_plus_one <= 6) && (nondiegetic_channels == 0 || nondiegetic_channels == 2); is_projection_valid = (enc_error == OPUS_OK && dec_error == OPUS_OK); if (is_channels_valid ^ is_projection_valid)