From 39c238b629ca3fe444a8913e9d45770758a80860 Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Mon, 14 Aug 2023 08:57:17 +0200 Subject: [PATCH 01/26] Disable SPLIT_REND_WITH_HEAD_ROT and enable in related test jobs --- .gitlab-ci.yml | 8 ++++++++ lib_com/options.h | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2e1289ed36..b09af34d3a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -121,6 +121,11 @@ stages: - git pull - cd - +.enable-split-rendering: &enable-split-rendering +# automatically enable #define SPLIT_REND_WITH_HEAD_ROT in options.h, handling both /**/-comment and //-comment + - sed -i.bak -e "s/\/\*[[:space:]]*\(#define[[:space:]]*SPLIT_REND_WITH_HEAD_ROT\)[[:space:]]*\*\//\1/g" ./lib_com/options.h + - sed -i.bak -e "s/\/\/[[:space:]]*\(#define[[:space:]]*SPLIT_REND_WITH_HEAD_ROT\)/\1/g" ./lib_com/options.h + # --------------------------------------------------------------- # Job templates # --------------------------------------------------------------- @@ -569,6 +574,7 @@ split-rendering-smoke-test: needs: ["build-codec-linux-make"] stage: test script: + - .enable-split-rendering - make -j - python3 -m pytest -q -n auto -rA --junit-xml=report-junit.xml tests/split_rendering/test_split_rendering.py artifacts: @@ -609,6 +615,7 @@ split-rendering-pytest-on-merge-request: - git checkout $target_commit # build reference binaries + - .enable-split-rendering - make -j - mv IVAS_cod IVAS_cod_ref - mv IVAS_dec IVAS_dec_ref @@ -617,6 +624,7 @@ split-rendering-pytest-on-merge-request: # back to source branch - git checkout $source_branch_commit_sha - make clean + - .enable-split-rendering - make -j # run test diff --git a/lib_com/options.h b/lib_com/options.h index a7c73cd817..97385b8db3 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -50,7 +50,7 @@ #ifndef RELEASE #define DEBUGGING /* Activate debugging part of the code */ #endif -/*#define WMOPS*/ /* Activate complexity and memory counters */ +#define WMOPS /* Activate complexity and memory counters */ /*#define WMOPS_PER_FRAME*/ /* Output per-frame complexity (writes one float value per frame to the file "wmops_analysis") */ /*#define WMOPS_DETAIL*/ /* Output detailed complexity printout for every function. Increases runtime overhead */ /*#define WMOPS_WC_FRAME_ANALYSIS*/ /* Output detailed complexity analysis for the worst-case frame */ @@ -151,7 +151,7 @@ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ -#define SPLIT_REND_WITH_HEAD_ROT /* Dlb,FhG: Split Rendering contributions 21 and 35 */ +/*#define SPLIT_REND_WITH_HEAD_ROT*/ /* Dlb,FhG: Split Rendering contributions 21 and 35 */ #ifdef SPLIT_REND_WITH_HEAD_ROT #define SPLIT_REND_PRED_QUANT_63_PNTS #define SPLIT_REND_WITH_HEAD_ROT_PARAMBIN /* Nokia: Issue 623: Split rendering support for parambin renderer */ -- GitLab From a4a250ef371a9271d0d5e7a8454e2890c8975ce3 Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Mon, 14 Aug 2023 09:21:04 +0200 Subject: [PATCH 02/26] Fix typos in .enable-split-rendering call, disable WMOPS switch which was unintentionally enabled --- .gitlab-ci.yml | 6 +++--- lib_com/options.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b09af34d3a..9ff3613fdf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -574,7 +574,7 @@ split-rendering-smoke-test: needs: ["build-codec-linux-make"] stage: test script: - - .enable-split-rendering + - *enable-split-rendering - make -j - python3 -m pytest -q -n auto -rA --junit-xml=report-junit.xml tests/split_rendering/test_split_rendering.py artifacts: @@ -615,7 +615,7 @@ split-rendering-pytest-on-merge-request: - git checkout $target_commit # build reference binaries - - .enable-split-rendering + - *enable-split-rendering - make -j - mv IVAS_cod IVAS_cod_ref - mv IVAS_dec IVAS_dec_ref @@ -624,7 +624,7 @@ split-rendering-pytest-on-merge-request: # back to source branch - git checkout $source_branch_commit_sha - make clean - - .enable-split-rendering + - *enable-split-rendering - make -j # run test diff --git a/lib_com/options.h b/lib_com/options.h index fd2104b93c..3960a03939 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -50,7 +50,7 @@ #ifndef RELEASE #define DEBUGGING /* Activate debugging part of the code */ #endif -#define WMOPS /* Activate complexity and memory counters */ +/*#define WMOPS*/ /* Activate complexity and memory counters */ /*#define WMOPS_PER_FRAME*/ /* Output per-frame complexity (writes one float value per frame to the file "wmops_analysis") */ /*#define WMOPS_DETAIL*/ /* Output detailed complexity printout for every function. Increases runtime overhead */ /*#define WMOPS_WC_FRAME_ANALYSIS*/ /* Output detailed complexity analysis for the worst-case frame */ -- GitLab From e4e97ac02b5bb04e6d105583d090f03a4011bb86 Mon Sep 17 00:00:00 2001 From: Tapani Pihlajakuja Date: Mon, 14 Aug 2023 12:35:45 +0300 Subject: [PATCH 03/26] Fix CMake build with split rendering disabled by adding a configuration variable for including code required by split rendering. --- CMakeLists.txt | 72 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 51 insertions(+), 21 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d08135676c..75836227a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,7 +27,8 @@ # # or build on command line, e.g.: # cmake --build . --config Debug # cmake --build . --config Release - +# +# INCLUDE_SPLIT is not set by default. If split rendering is used, then add -D INCLUDE_SPLIT=1 to the build command cmake_minimum_required(VERSION 3.1) @@ -130,7 +131,10 @@ add_library(lib_com ${libComSrcs} ${libComHeaders}) if(UNIX) target_link_libraries(lib_com PRIVATE m) endif() -target_include_directories(lib_com PUBLIC lib_com PRIVATE lib_enc lib_dec lib_rend lib_debug lc3plus) +target_include_directories(lib_com PUBLIC lib_com PRIVATE lib_enc lib_dec lib_rend lib_debug) +if(INCLUDE_SPLIT) + target_include_directories(lib_com PRIVATE lc3plus) +endif() file(GLOB libDebugSrcs "lib_debug/*.c") file(GLOB libDebugHeaders "lib_debug/*.h") @@ -142,23 +146,42 @@ file(GLOB libEncSrcs "lib_enc/*.c") file(GLOB libEncHeaders "lib_enc/*.h") add_library(lib_enc ${libEncSrcs} ${libEncHeaders}) target_link_libraries(lib_enc lib_com lib_debug) -target_include_directories(lib_enc PUBLIC lib_enc PRIVATE lib_dec lib_rend lc3plus) +target_include_directories(lib_enc PUBLIC lib_enc PRIVATE lib_dec lib_rend) +if(INCLUDE_SPLIT) + target_include_directories(lib_enc PRIVATE lc3plus) +endif() -file(GLOB libLC3plusSrcs "lc3plus/*.c") -file(GLOB libLC3plusHeaders "lc3plus/*.h") -add_library(lc3plus ${libLC3plusSrcs} ${libLC3plusHeaders}) -target_include_directories(lc3plus PUBLIC lc3plus) -target_link_libraries(lc3plus lib_com) # For including options.h, which is needed for instrumentation to work correctly -if(WMOPS) - target_link_libraries(lc3plus lib_debug) +if(INCLUDE_SPLIT) + file(GLOB libLC3plusSrcs "lc3plus/*.c") + file(GLOB libLC3plusHeaders "lc3plus/*.h") + add_library(lc3plus ${libLC3plusSrcs} ${libLC3plusHeaders}) + target_include_directories(lc3plus PUBLIC lc3plus) + target_link_libraries(lc3plus lib_com) # For including options.h, which is needed for instrumentation to work correctly + if(WMOPS) + target_link_libraries(lc3plus lib_debug) + endif() endif() -file(GLOB libCldfbTransCodecSrcs "lib_rend/ivas_cldfb_trans_codec/*.c") -file(GLOB libCldfbTransCodecHeaders "lib_rend/ivas_cldfb_trans_codec/*.h") +if(INCLUDE_SPLIT) + file(GLOB libCldfbTransCodecSrcs "lib_rend/ivas_cldfb_trans_codec/*.c") + file(GLOB libCldfbTransCodecHeaders "lib_rend/ivas_cldfb_trans_codec/*.h") +endif() file(GLOB libRendSrcs "lib_rend/*.c") file(GLOB libRendHeaders "lib_rend/*.h") -add_library(lib_rend ${libRendSrcs} ${libCldfbTransCodecSrcs} ${libRendHeaders} ${libCldfbTransCodecHeaders}) -target_link_libraries(lib_rend lib_dec lib_com lib_debug lc3plus) # Todo refactor: This dependency on lib_dec should be removed. +if(NOT INCLUDE_SPLIT) + list(FILTER libRendSrcs EXCLUDE REGEX ".*lib_rend\/.*lc3plus.*\.c$") + list(FILTER libRendHeaders EXCLUDE REGEX ".*lib_rend\/.*lc3plus.*\.h$") +endif() + +if(INCLUDE_SPLIT) + add_library(lib_rend ${libRendSrcs} ${libCldfbTransCodecSrcs} ${libRendHeaders} ${libCldfbTransCodecHeaders}) +else() + add_library(lib_rend ${libRendSrcs} ${libRendHeaders}) +endif() +target_link_libraries(lib_rend lib_dec lib_com lib_debug) # Todo refactor: This dependency on lib_dec should be removed. +if(INCLUDE_SPLIT) + target_link_libraries(lib_rend lc3plus) +endif() target_include_directories(lib_rend PUBLIC lib_rend PRIVATE lib_enc) @@ -171,12 +194,17 @@ target_include_directories(lib_dec PUBLIC lib_dec lib_rend PRIVATE lib_enc) file(GLOB libUtilSrcs "lib_util/*.c") file(GLOB libUtilHeaders "lib_util/*.h") add_library(lib_util ${libUtilSrcs} ${libUtilHeaders}) -target_include_directories(lib_util PUBLIC lib_util PRIVATE lib_com lib_enc lib_dec lib_rend lib_debug lc3plus) +target_include_directories(lib_util PUBLIC lib_util PRIVATE lib_com lib_enc lib_dec lib_rend lib_debug) +if(INCLUDE_SPLIT) + target_include_directories(lib_util PRIVATE lc3plus) +endif() -if(NOT WMOPS) - file(GLOB unitTestIvasLc3plusSrcs "scripts/split_rendering/lc3plus/*.c") - add_executable(ivas_lc3plus_unit_test ${unitTestIvasLc3plusSrcs}) - target_link_libraries(ivas_lc3plus_unit_test lib_rend lib_dec lib_util lib_com lib_debug) +if(INCLUDE_SPLIT) + if(NOT WMOPS) + file(GLOB unitTestIvasLc3plusSrcs "scripts/split_rendering/lc3plus/*.c") + add_executable(ivas_lc3plus_unit_test ${unitTestIvasLc3plusSrcs}) + target_link_libraries(ivas_lc3plus_unit_test lib_rend lib_dec lib_util lib_com lib_debug) + endif() endif() add_executable(IVAS_cod apps/encoder.c) @@ -200,8 +228,10 @@ if(COPY_EXECUTABLES_FROM_BUILD_DIR) add_custom_command(TARGET IVAS_cod POST_BUILD VERBATIM COMMAND "${CMAKE_COMMAND}" -E copy "$" "${CMAKE_CURRENT_SOURCE_DIR}/") add_custom_command(TARGET IVAS_dec POST_BUILD VERBATIM COMMAND "${CMAKE_COMMAND}" -E copy "$" "${CMAKE_CURRENT_SOURCE_DIR}/") add_custom_command(TARGET IVAS_rend POST_BUILD VERBATIM COMMAND "${CMAKE_COMMAND}" -E copy "$" "${CMAKE_CURRENT_SOURCE_DIR}/") - if (NOT WMOPS) - add_custom_command(TARGET ivas_lc3plus_unit_test POST_BUILD VERBATIM COMMAND "${CMAKE_COMMAND}" -E copy "$" "${CMAKE_CURRENT_SOURCE_DIR}/scripts/split_rendering/lc3plus") + if(INCLUDE_SPLIT) + if (NOT WMOPS) + add_custom_command(TARGET ivas_lc3plus_unit_test POST_BUILD VERBATIM COMMAND "${CMAKE_COMMAND}" -E copy "$" "${CMAKE_CURRENT_SOURCE_DIR}/scripts/split_rendering/lc3plus") + endif() endif() endif() -- GitLab From 01911473e26b411b9ab39c82a00e7b2c326b2ad9 Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Mon, 14 Aug 2023 12:08:36 +0200 Subject: [PATCH 04/26] Exclude split rendering files when INCLUDE_SPLIT is not set for cmake --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 75836227a2..83ded42323 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -170,7 +170,13 @@ file(GLOB libRendSrcs "lib_rend/*.c") file(GLOB libRendHeaders "lib_rend/*.h") if(NOT INCLUDE_SPLIT) list(FILTER libRendSrcs EXCLUDE REGEX ".*lib_rend\/.*lc3plus.*\.c$") + list(FILTER libRendSrcs EXCLUDE REGEX ".*lib_rend\/.*splitRend.*\.c$") + list(FILTER libRendSrcs EXCLUDE REGEX ".*lib_rend\/.*ivas_CQMF.*\.c$") + list(FILTER libRendSrcs EXCLUDE REGEX ".*lib_rend\/.*ivas_Pred.*\.c$") + list(FILTER libRendSrcs EXCLUDE REGEX ".*lib_rend\/.*ivas_RMSEnv.*\.c$") + list(FILTER libRendSrcs EXCLUDE REGEX ".*lib_rend\/.*ivas_PerceptualModel.*\.c$") list(FILTER libRendHeaders EXCLUDE REGEX ".*lib_rend\/.*lc3plus.*\.h$") + list(FILTER libRendHeaders EXCLUDE REGEX ".*lib_rend\/.*splitRend.*\.h$") endif() if(INCLUDE_SPLIT) @@ -193,6 +199,9 @@ target_include_directories(lib_dec PUBLIC lib_dec lib_rend PRIVATE lib_enc) file(GLOB libUtilSrcs "lib_util/*.c") file(GLOB libUtilHeaders "lib_util/*.h") +if(NOT INCLUDE_SPLIT) + list(FILTER libUtilSrcs EXCLUDE REGEX ".*lib_util\/.*split_rend.*\.c$") +endif() add_library(lib_util ${libUtilSrcs} ${libUtilHeaders}) target_include_directories(lib_util PUBLIC lib_util PRIVATE lib_com lib_enc lib_dec lib_rend lib_debug) if(INCLUDE_SPLIT) -- GitLab From adf6c839acdb652d06056293eadda4ec56e4e22f Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Mon, 14 Aug 2023 12:26:55 +0200 Subject: [PATCH 05/26] Fix for CMakeLists.txt, excluding clfdb_codec_ files --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 83ded42323..33e523a86b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -170,6 +170,7 @@ file(GLOB libRendSrcs "lib_rend/*.c") file(GLOB libRendHeaders "lib_rend/*.h") if(NOT INCLUDE_SPLIT) list(FILTER libRendSrcs EXCLUDE REGEX ".*lib_rend\/.*lc3plus.*\.c$") + list(FILTER libRendSrcs EXCLUDE REGEX ".*lib_rend\/.*ivas_cldfb_codec.*\.c$") list(FILTER libRendSrcs EXCLUDE REGEX ".*lib_rend\/.*splitRend.*\.c$") list(FILTER libRendSrcs EXCLUDE REGEX ".*lib_rend\/.*ivas_CQMF.*\.c$") list(FILTER libRendSrcs EXCLUDE REGEX ".*lib_rend\/.*ivas_Pred.*\.c$") @@ -177,6 +178,7 @@ if(NOT INCLUDE_SPLIT) list(FILTER libRendSrcs EXCLUDE REGEX ".*lib_rend\/.*ivas_PerceptualModel.*\.c$") list(FILTER libRendHeaders EXCLUDE REGEX ".*lib_rend\/.*lc3plus.*\.h$") list(FILTER libRendHeaders EXCLUDE REGEX ".*lib_rend\/.*splitRend.*\.h$") + list(FILTER libRendHeaders EXCLUDE REGEX ".*lib_rend\/.*ivas_cldfb_codec.*\.h$") endif() if(INCLUDE_SPLIT) -- GitLab From 6e82869d8190dc32f2f36fb0b4043f91d4876883 Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Mon, 14 Aug 2023 14:17:02 +0200 Subject: [PATCH 06/26] Fix in Makefile for compiling without split rendering --- Makefile | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 138a4cdaed..cf9f902136 100644 --- a/Makefile +++ b/Makefile @@ -117,6 +117,14 @@ CFLAGS += $(foreach DIR,$(SRC_DIRS),-I$(DIR)) # Source file search paths VPATH = $(SRC_DIRS) +# Split rendering files +SRCS_SPLIT_REND = ivas_CQMFDecoder.c ivas_CQMFEncoder.c ivas_PerceptualModel.c ivas_PredDecoder.c \ + ivas_PredEncoder.c ivas_RMSEnvGrouping.c ivas_MSPred.c ivas_NoiseGen.c \ + ivas_cldfb_codec_bitstream.c ivas_splitRend_lcld_dec.c ivas_splitRend_lcld_enc.c \ + ivas_splitRendererPLC.c ivas_splitRendererPost.c ivas_splitRendererPre.c \ + ivas_splitRenderer_utils.c split_rend_bfi_file_reader.c split_render_file_read_write.c + + ############################################################################### SRCS_LIBCOM = $(foreach DIR,$(SRC_LIBCOM),$(patsubst $(DIR)/%,%,$(wildcard $(DIR)/*.c))) @@ -124,8 +132,13 @@ SRCS_LIBDEBUG = $(foreach DIR,$(SRC_LIBDEBUG),$(patsubst $(DIR)/%,%,$(wildcard $ SRCS_LIBDEC = $(foreach DIR,$(SRC_LIBDEC),$(patsubst $(DIR)/%,%,$(wildcard $(DIR)/*.c))) SRCS_LIBENC = $(foreach DIR,$(SRC_LIBENC),$(patsubst $(DIR)/%,%,$(wildcard $(DIR)/*.c))) SRCS_LIBREND = $(foreach DIR,$(SRC_LIBREND),$(patsubst $(DIR)/%,%,$(wildcard $(DIR)/*.c))) -SRCS_LC3PLUS = $(foreach DIR,$(SRC_LC3PLUS),$(patsubst $(DIR)/%,%,$(wildcard $(DIR)/*.c))) SRCS_LIBUTIL = $(foreach DIR,$(SRC_LIBUTIL),$(patsubst $(DIR)/%,%,$(wildcard $(DIR)/*.c))) +ifeq "$(INCLUDE_SPLIT)" "1" +SRCS_LC3PLUS = $(foreach DIR,$(SRC_LC3PLUS),$(patsubst $(DIR)/%,%,$(wildcard $(DIR)/*.c))) +else +SRCS_LIBREND := $(filter-out $(SRCS_SPLIT_REND),$(SRCS_LIBREND)) +SRCS_LIBUTIL := $(filter-out $(SRCS_SPLIT_REND),$(SRCS_LIBUTIL)) +endif OBJS_LIBCOM = $(addprefix $(OBJDIR)/,$(SRCS_LIBCOM:.c=.o)) OBJS_LIBDEBUG = $(addprefix $(OBJDIR)/,$(SRCS_LIBDEBUG:.c=.o)) -- GitLab From 0f57609c1cc791cc90f51807076ec7f860fea65f Mon Sep 17 00:00:00 2001 From: Jouni Paulus Date: Mon, 14 Aug 2023 14:43:47 +0200 Subject: [PATCH 07/26] fixes to SR off-path: missing call to ivas_dirac_dec_binaural_process_output, OSBA functionality --- lib_rend/ivas_dirac_dec_binaural_functions.c | 35 +++++++++++--------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/lib_rend/ivas_dirac_dec_binaural_functions.c b/lib_rend/ivas_dirac_dec_binaural_functions.c index 847eba6e1c..cc5803a110 100644 --- a/lib_rend/ivas_dirac_dec_binaural_functions.c +++ b/lib_rend/ivas_dirac_dec_binaural_functions.c @@ -102,11 +102,7 @@ typedef struct parambin_rend_config_data * Local function prototypes *------------------------------------------------------------------------*/ -#ifdef SPLIT_REND_WITH_HEAD_ROT_PARAMBIN static void ivas_dirac_dec_binaural_internal( Decoder_Struct *st_ivas, COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, float *output_f[], const int16_t nchan_transport, const int16_t subframe ); -#else -static void ivas_dirac_dec_binaural_internal( Decoder_Struct *st_ivas, COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, const int16_t nchan_transport, const int16_t subframe ); -#endif static void ivas_dirac_dec_decorrelate_slot( DIRAC_DEC_BIN_HANDLE hDiracDecBin, const int16_t num_freq_bands, const int16_t slot, float inRe[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], float inIm[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], float decRe[][CLDFB_NO_CHANNELS_MAX], float decIm[][CLDFB_NO_CHANNELS_MAX] ); @@ -529,11 +525,7 @@ void ivas_dirac_dec_binaural_render( for ( subframe_idx = first_sf; subframe_idx < last_sf; subframe_idx++ ) { int16_t n_samples_sf = slot_size * hSpatParamRendCom->subframe_nbslots[subframe_idx]; -#ifdef SPLIT_REND_WITH_HEAD_ROT_PARAMBIN ivas_dirac_dec_binaural_internal( st_ivas, st_ivas->hCombinedOrientationData, output_f_local, nchan_transport, subframe_idx ); -#else - ivas_dirac_dec_binaural_internal( st_ivas, st_ivas->hCombinedOrientationData, nchan_transport, subframe_idx ); -#endif for ( ch = 0; ch < nchan_out; ch++ ) { @@ -703,11 +695,7 @@ void ivas_dirac_dec_binaural( { int16_t n_samples_sf = slot_size * hSpatParamRendCom->subframe_nbslots[subframe]; -#ifdef SPLIT_REND_WITH_HEAD_ROT_PARAMBIN ivas_dirac_dec_binaural_internal( st_ivas, hCombinedOrientationData, p_output, nchan_transport, subframe ); -#else - ivas_dirac_dec_binaural_internal( st_ivas, hCombinedOrientationData, nchan_transport, subframe ); -#endif for ( ch = 0; ch < 2 * BINAURAL_CHANNELS; ch++ ) { @@ -732,9 +720,7 @@ void ivas_dirac_dec_binaural( static void ivas_dirac_dec_binaural_internal( Decoder_Struct *st_ivas, COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, -#ifdef SPLIT_REND_WITH_HEAD_ROT_PARAMBIN float *output_f[], -#endif const int16_t nchan_transport, const int16_t subframe ) { @@ -1054,6 +1040,8 @@ static void ivas_dirac_dec_binaural_internal( max_band_decorr, numInChannels, config_data.processReverb, subframe, NULL, NULL, reverbRe, reverbIm, decorrRe, decorrIm, 1 ); } +#else + ivas_dirac_dec_binaural_process_output( hDiracDecBin, hSpatParamRendCom, st_ivas->cldfbSynDec, output_f, Cldfb_RealBuffer_in, Cldfb_ImagBuffer_in, max_band_decorr, numInChannels, config_data.processReverb, subframe ); #endif hDiracDecBin->hDiffuseDist = NULL; @@ -1895,21 +1883,32 @@ static void ivas_dirac_dec_binaural_formulate_input_and_target_covariance_matric } } +#ifdef SBA_AND_OBJECTS + if ( ( ivas_format == SBA_FORMAT || ivas_format == SBA_ISM_FORMAT ) && nchan_transport == 2 ) +#else if ( ivas_format == SBA_FORMAT && nchan_transport == 2 ) +#endif { float tempRe, tempIm; + float subFrameSumEne[CLDFB_NO_CHANNELS_MAX]; - set_zero( subFrameTotalEne, CLDFB_NO_CHANNELS_MAX ); + v_multc( subFrameTotalEne, SBA_CARDI_TARGET_ENERGY_GAIN, subFrameTotalEne, nBins ); + set_zero( subFrameSumEne, CLDFB_NO_CHANNELS_MAX ); for ( slot = 0; slot < hSpatParamRendCom->subframe_nbslots[subframe]; slot++ ) { for ( bin = 0; bin < nBins; bin++ ) { tempRe = inRe[0][slot][bin] + inRe[1][slot][bin]; tempIm = inIm[0][slot][bin] + inIm[1][slot][bin]; - subFrameTotalEne[bin] += tempRe * tempRe + tempIm * tempIm; + subFrameSumEne[bin] += tempRe * tempRe + tempIm * tempIm; } } + for ( bin = 0; bin < nBins; bin++ ) + { + subFrameTotalEne[bin] = max( subFrameTotalEne[bin], subFrameSumEne[bin] ); + } + } /* Determine target covariance matrix containing target binaural properties */ @@ -2199,7 +2198,11 @@ static void ivas_dirac_dec_binaural_formulate_input_and_target_covariance_matric } else /* When rendering binaural, ambience has frequency dependent ICC. */ { +#ifdef SBA_AND_OBJECTS + if ( ( ivas_format == SBA_FORMAT || ivas_format == SBA_ISM_FORMAT ) && bin < BINAURAL_COHERENCE_DIFFERENCE_BINS ) +#else if ( ivas_format == SBA_FORMAT && bin < BINAURAL_COHERENCE_DIFFERENCE_BINS ) +#endif { float diffuseFieldCoherence; diffuseFieldCoherence = hDiracDecBin->hDiffuseDist->diffuseRatioX[bin] * hDiracDecBin->diffuseFieldCoherenceX[bin] + hDiracDecBin->hDiffuseDist->diffuseRatioY[bin] * hDiracDecBin->diffuseFieldCoherenceY[bin] + hDiracDecBin->hDiffuseDist->diffuseRatioZ[bin] * hDiracDecBin->diffuseFieldCoherenceZ[bin]; -- GitLab From d142d9bcf97ab3e873aa556f6a8bb3f8b248fddf Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Mon, 14 Aug 2023 14:47:50 +0200 Subject: [PATCH 08/26] Update build for split rendering to use -INCLUDE_SPLIT=1 --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9ff3613fdf..6806a64b73 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -575,7 +575,7 @@ split-rendering-smoke-test: stage: test script: - *enable-split-rendering - - make -j + - make -j -INCLUDE_SPLIT=1 - python3 -m pytest -q -n auto -rA --junit-xml=report-junit.xml tests/split_rendering/test_split_rendering.py artifacts: name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results" @@ -616,7 +616,7 @@ split-rendering-pytest-on-merge-request: # build reference binaries - *enable-split-rendering - - make -j + - make -j -INCLUDE_SPLIT=1 - mv IVAS_cod IVAS_cod_ref - mv IVAS_dec IVAS_dec_ref - mv IVAS_rend IVAS_rend_ref @@ -625,7 +625,7 @@ split-rendering-pytest-on-merge-request: - git checkout $source_branch_commit_sha - make clean - *enable-split-rendering - - make -j + - make -j -INCLUDE_SPLIT=1 # run test - exit_code=0 -- GitLab From 1370056cfbafb8615a707ee75ed77844b2184b76 Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Mon, 14 Aug 2023 15:41:50 +0200 Subject: [PATCH 09/26] Correct make call in split renderer tests --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6806a64b73..a21de1e35d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -575,7 +575,7 @@ split-rendering-smoke-test: stage: test script: - *enable-split-rendering - - make -j -INCLUDE_SPLIT=1 + - make -j INCLUDE_SPLIT=1 - python3 -m pytest -q -n auto -rA --junit-xml=report-junit.xml tests/split_rendering/test_split_rendering.py artifacts: name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results" @@ -616,7 +616,7 @@ split-rendering-pytest-on-merge-request: # build reference binaries - *enable-split-rendering - - make -j -INCLUDE_SPLIT=1 + - make -j INCLUDE_SPLIT=1 - mv IVAS_cod IVAS_cod_ref - mv IVAS_dec IVAS_dec_ref - mv IVAS_rend IVAS_rend_ref @@ -625,7 +625,7 @@ split-rendering-pytest-on-merge-request: - git checkout $source_branch_commit_sha - make clean - *enable-split-rendering - - make -j -INCLUDE_SPLIT=1 + - make -j INCLUDE_SPLIT=1 # run test - exit_code=0 -- GitLab From df43f557f700007ecf7845ce25c849235915377f Mon Sep 17 00:00:00 2001 From: Jouni Paulus Date: Mon, 14 Aug 2023 16:24:18 +0200 Subject: [PATCH 10/26] clang format --- lib_rend/ivas_dirac_dec_binaural_functions.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib_rend/ivas_dirac_dec_binaural_functions.c b/lib_rend/ivas_dirac_dec_binaural_functions.c index cc5803a110..5b2001e64b 100644 --- a/lib_rend/ivas_dirac_dec_binaural_functions.c +++ b/lib_rend/ivas_dirac_dec_binaural_functions.c @@ -1908,7 +1908,6 @@ static void ivas_dirac_dec_binaural_formulate_input_and_target_covariance_matric { subFrameTotalEne[bin] = max( subFrameTotalEne[bin], subFrameSumEne[bin] ); } - } /* Determine target covariance matrix containing target binaural properties */ -- GitLab From 67b8e7561cec114919a660d62066d31c5e1756af Mon Sep 17 00:00:00 2001 From: vaclav Date: Mon, 14 Aug 2023 20:18:02 +0200 Subject: [PATCH 11/26] move "#define SBA_AND_OBJECTS" up, otherwise OSBA_SPLIT_RENDERINGis never activated --- lib_com/options.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index e278fb1aa0..fa70769baf 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -150,6 +150,12 @@ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ +#define MASA_AND_OBJECTS /* Nokia: Combination of MASA and objects */ + +#define SBA_AND_OBJECTS +#ifdef SBA_AND_OBJECTS +#define OSBA_BR_SWITCHING +#endif /*#define SPLIT_REND_WITH_HEAD_ROT*/ /* Dlb,FhG: Split Rendering contributions 21 and 35 */ #ifdef SPLIT_REND_WITH_HEAD_ROT @@ -161,13 +167,6 @@ #endif #endif -#define MASA_AND_OBJECTS /* Nokia: Combination of MASA and objects */ - -#define SBA_AND_OBJECTS -#ifdef SBA_AND_OBJECTS -#define OSBA_BR_SWITCHING -#endif - #define FIX_264_AUDIO_CHANNELS_TO_HEAP /* VA: issue 243: Move audio channels memory from stack to heap */ #define FIX_691_OSBA_CRASH /* FhG: Fix for issue 691: Crash for OSBA Stereo out */ #define FIX_694_OMASA_EXTREME /* Nokia: fix for crash in OMASA on extreme sample */ -- GitLab From 123e452f74cf41c15add117d1f10333e2dd2e0df Mon Sep 17 00:00:00 2001 From: Michael Schug Date: Mon, 14 Aug 2023 21:02:22 +0200 Subject: [PATCH 12/26] disabling highpass filtering for paramupmix to binaural rendering also without SPLIT_REND_WITH_HEAD_ROT --- lib_dec/ivas_dec.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib_dec/ivas_dec.c b/lib_dec/ivas_dec.c index bd9c41cee2..4eefcc8835 100644 --- a/lib_dec/ivas_dec.c +++ b/lib_dec/ivas_dec.c @@ -1001,9 +1001,7 @@ ivas_error ivas_dec( ivas_mc_paramupmix_dec( st_ivas, output ); /* HP filtering */ -#ifdef SPLIT_REND_WITH_HEAD_ROT if ( st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV && st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV_ROOM ) -#endif { for ( n = 0; n < st_ivas->nchan_transport; n++ ) { -- GitLab From 70a020f8c18422cbb00566eb3068741bf553d622 Mon Sep 17 00:00:00 2001 From: vaclav Date: Mon, 14 Aug 2023 21:33:48 +0200 Subject: [PATCH 13/26] fix compilation warning --- lib_rend/lib_rend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 7949e0faa9..a08f3f2b76 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -8045,7 +8045,7 @@ static void renderMasaToBinaural( static void renderMasaToMasa( input_masa *masaInput, - const IVAS_REND_AudioBuffer outAudio ) + IVAS_REND_AudioBuffer outAudio ) { int16_t sf, band, dir, numDirs; float ratioSum; @@ -8672,7 +8672,7 @@ ivas_error IVAS_REND_GetSamples( &bits, Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, - ( const int16_t )( ( BINAURAL_MAXBANDS * hIvasRend->sampleRateOut ) / 48000 ), + (const int16_t) ( ( BINAURAL_MAXBANDS * hIvasRend->sampleRateOut ) / 48000 ), tmpBinaural, 1, td_input, -- GitLab From 2779699075e60ccbc59445f17c28bbe91fd7a287 Mon Sep 17 00:00:00 2001 From: vaclav Date: Mon, 14 Aug 2023 21:36:43 +0200 Subject: [PATCH 14/26] remove instrumentation of 'lc3plus' directory --- scripts/prepare_instrumentation.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/prepare_instrumentation.sh b/scripts/prepare_instrumentation.sh index 4052b8a10e..15adb004d8 100755 --- a/scripts/prepare_instrumentation.sh +++ b/scripts/prepare_instrumentation.sh @@ -63,7 +63,7 @@ mkdir $targetdir # copy files from source-dir cp -R ../lib_* $targetdir -cp -R ../lc3plus $targetdir +# cp -R ../lc3plus $targetdir cp -R ../apps $targetdir cp -R ../Makefile $targetdir cp -R ../CMakeLists.txt $targetdir @@ -106,7 +106,8 @@ find $targetdir -name "*.[ch]" -exec sed -i.bak -e "s/\(0x[0-9a-fA-F]*\)UL/\(\(u # run wmc_tool "tools/$system/wmc_tool" -m "$targetdir/apps/encoder.c" "$targetdir/lib_enc/*.c" "$targetdir/lib_com/*.c" >> /dev/null "tools/$system/wmc_tool" -m "$targetdir/apps/decoder.c" "$targetdir/lib_dec/*.c" "$targetdir/lib_rend/*.c" >> /dev/null -"tools/$system/wmc_tool" -m "$targetdir/apps/renderer.c" "$targetdir/lib_rend/*.c" "$targetdir/lc3plus/*.c" "$targetdir/lc3plus/fft/*.c" >> /dev/null +#"tools/$system/wmc_tool" -m "$targetdir/apps/renderer.c" "$targetdir/lib_rend/*.c" "$targetdir/lc3plus/*.c" "$targetdir/lc3plus/fft/*.c" >> /dev/null +"tools/$system/wmc_tool" -m "$targetdir/apps/renderer.c" "$targetdir/lib_rend/*.c" >> /dev/null # automatically enable #define WMOPS in options.h sed -i.bak -e "s/\/\*[[:space:]]*\(#define[[:space:]]*WMOPS\)[[:space:]]*\*\//\1/g" $targetdir/lib_com/options.h -- GitLab From 6fc877358b76a0e81bb248abc06f49432c16e361 Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Mon, 14 Aug 2023 21:37:09 +0200 Subject: [PATCH 15/26] Fix for complexity job --- scripts/prepare_instrumentation.sh | 25 +++++++- scripts/strip_split_rendering.sh | 93 ++++++++++++++++++++++++++++++ 2 files changed, 117 insertions(+), 1 deletion(-) create mode 100644 scripts/strip_split_rendering.sh diff --git a/scripts/prepare_instrumentation.sh b/scripts/prepare_instrumentation.sh index 4052b8a10e..1636d7802a 100755 --- a/scripts/prepare_instrumentation.sh +++ b/scripts/prepare_instrumentation.sh @@ -30,6 +30,24 @@ # the United Nations Convention on Contracts on the International Sales of Goods. # +function usage { + echo + echo "Usage:" + echo " prepare_instrumentation.sh [MODE]" + echo + echo " MODE - sr_off (default) or sr_on" + exit +} + +if [ -z "$1" ] || [ "$1" == "sr_off" ]; then + INCLUDE_SPLIT=0 +elif [ "$1" == "sr_on" ]; then + INCLUDE_SPLIT=1 +else + usage +fi + + system=`uname -s` if [[ ($system == "Linux") && (`uname -a` =~ (microsoft|Microsoft|wsl|WSL) ) ]]; then system="Linux" @@ -68,6 +86,9 @@ cp -R ../apps $targetdir cp -R ../Makefile $targetdir cp -R ../CMakeLists.txt $targetdir cp -R ../Workspace_msvc $targetdir +if [ $INCLUDE_SPLIT -eq 0 ]; then + strip_split_rendering.sh $targetdir +fi # back up #ifdef-list rm -f $ifdef_list @@ -106,7 +127,9 @@ find $targetdir -name "*.[ch]" -exec sed -i.bak -e "s/\(0x[0-9a-fA-F]*\)UL/\(\(u # run wmc_tool "tools/$system/wmc_tool" -m "$targetdir/apps/encoder.c" "$targetdir/lib_enc/*.c" "$targetdir/lib_com/*.c" >> /dev/null "tools/$system/wmc_tool" -m "$targetdir/apps/decoder.c" "$targetdir/lib_dec/*.c" "$targetdir/lib_rend/*.c" >> /dev/null -"tools/$system/wmc_tool" -m "$targetdir/apps/renderer.c" "$targetdir/lib_rend/*.c" "$targetdir/lc3plus/*.c" "$targetdir/lc3plus/fft/*.c" >> /dev/null +if [ $INCLUDE_SPLIT -eq 1 ]; then + "tools/$system/wmc_tool" -m "$targetdir/apps/renderer.c" "$targetdir/lib_rend/*.c" "$targetdir/lc3plus/*.c" "$targetdir/lc3plus/fft/*.c" >> /dev/null +fi # automatically enable #define WMOPS in options.h sed -i.bak -e "s/\/\*[[:space:]]*\(#define[[:space:]]*WMOPS\)[[:space:]]*\*\//\1/g" $targetdir/lib_com/options.h diff --git a/scripts/strip_split_rendering.sh b/scripts/strip_split_rendering.sh new file mode 100644 index 0000000000..f202d837e3 --- /dev/null +++ b/scripts/strip_split_rendering.sh @@ -0,0 +1,93 @@ +#!/bin/bash + +# +# (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, +# Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., +# Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, +# Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other +# contributors to this repository. All Rights Reserved. +# +# This software is protected by copyright law and by international treaties. +# The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB, +# Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., +# Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, +# Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other +# contributors to this repository retain full ownership rights in their respective contributions in +# the software. This notice grants no license of any kind, including but not limited to patent +# license, nor is any license granted by implication, estoppel or otherwise. +# +# Contributors are required to enter into the IVAS codec Public Collaboration agreement before making +# contributions. +# +# This software is provided "AS IS", without any express or implied warranties. The software is in the +# development stage. It is intended exclusively for experts who have experience with such software and +# solely for the purpose of inspection. All implied warranties of non-infringement, merchantability +# and fitness for a particular purpose are hereby disclaimed and excluded. +# +# Any dispute, controversy or claim arising under or in relation to providing this software shall be +# submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in +# accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and +# the United Nations Convention on Contracts on the International Sales of Goods. +# + +OUTDIR=$1 + + +# remove complete lc3plus folder +rm -R $OUTDIR/lc3plus + +# remove other split rendering files +declare -a sr_files_rend=( + "lib_rend/ivas_CQMFDecoder.c" + "lib_rend/ivas_CQMFDecoder.h" + "lib_rend/ivas_CQMFEncoder.c" + "lib_rend/ivas_CQMFEncoder.h" + "lib_rend/ivas_MSPred.c" + "lib_rend/ivas_MSPred.h" + "lib_rend/ivas_NoiseGen.c" + "lib_rend/ivas_NoiseGen.h" + "lib_rend/ivas_PerceptualModel.c" + "lib_rend/ivas_PerceptualModel.h" + "lib_rend/ivas_PredDecoder.c" + "lib_rend/ivas_PredDecoder.h" + "lib_rend/ivas_PredEncoder.c" + "lib_rend/ivas_PredEncoder.h" + "lib_rend/ivas_PredTables.h" + "lib_rend/ivas_RMSEnvGrouping.c" + "lib_rend/ivas_RMSEnvGrouping.h" + "lib_rend/ivas_cldfb_codec_bitstream.c" + "lib_rend/ivas_cldfb_codec_bitstream.h" + "lib_rend/ivas_lc3plus_common.c" + "lib_rend/ivas_lc3plus_common.h" + "lib_rend/ivas_lc3plus_dec.c" + "lib_rend/ivas_lc3plus_dec.h" + "lib_rend/ivas_lc3plus_enc.c" + "lib_rend/ivas_lc3plus_enc.h" + "lib_rend/ivas_lcld_tables.c" + "lib_rend/ivas_lcld_tables.h" + "lib_rend/ivas_splitRend_lcld_dec.c" + "lib_rend/ivas_splitRend_lcld_enc.c" + "lib_rend/ivas_splitRendererPLC.c" + "lib_rend/ivas_splitRendererPost.c" + "lib_rend/ivas_splitRendererPre.c" + "lib_rend/ivas_splitRenderer_utils.c" +) + +for file in ${sr_files_rend[@]}; do + rm $OUTDIR/$file + file_windows=${file//\//'\\'} + sed -i.bak -e "/${file_windows}/d" ${OUTDIR}/Workspace_msvc/lib_rend.vcxproj +done + +declare -a sr_files_util=( + "lib_util/split_rend_bfi_file_reader.c" + "lib_util/split_rend_bfi_file_reader.h" + "lib_util/split_render_file_read_write.c" + "lib_util/split_render_file_read_write.h" +) + +for file in ${sr_files_util[@]}; do + rm $OUTDIR/$file + file_windows=${file//\//'\\'} + sed -i.bak -e "/${file_windows}/d" ${OUTDIR}/Workspace_msvc/lib_util.vcxproj +done \ No newline at end of file -- GitLab From f789a9b5adf1e3104f8d6efceb87e1e80fd1bdc0 Mon Sep 17 00:00:00 2001 From: vaclav Date: Mon, 14 Aug 2023 21:49:27 +0200 Subject: [PATCH 16/26] Add '#pragma warning( disable : 4206 )' to suppress build warnings 'translation unit is empty' --- lib_rend/ivas_CQMFDecoder.c | 5 +- lib_rend/ivas_CQMFDecoder.h | 23 +- lib_rend/ivas_CQMFEncoder.c | 4 +- lib_rend/ivas_CQMFEncoder.h | 35 +-- lib_rend/ivas_PerceptualModel.c | 5 +- lib_rend/ivas_PredDecoder.c | 5 +- lib_rend/ivas_PredEncoder.c | 5 +- lib_rend/ivas_RMSEnvGrouping.c | 5 +- lib_rend/ivas_lcld_tables.c | 7 +- lib_rend/ivas_lcld_tables.h | 325 ++++++++++++------------ lib_rend/ivas_splitRend_lcld_dec.c | 5 +- lib_rend/ivas_splitRend_lcld_enc.c | 5 +- lib_rend/ivas_splitRendererPLC.c | 5 +- lib_rend/ivas_splitRendererPost.c | 5 +- lib_rend/ivas_splitRendererPre.c | 5 +- lib_rend/ivas_splitRenderer_utils.c | 4 +- lib_util/split_rend_bfi_file_reader.c | 3 +- lib_util/split_render_file_read_write.c | 5 +- 18 files changed, 244 insertions(+), 212 deletions(-) diff --git a/lib_rend/ivas_CQMFDecoder.c b/lib_rend/ivas_CQMFDecoder.c index cea424d3d7..9854630111 100644 --- a/lib_rend/ivas_CQMFDecoder.c +++ b/lib_rend/ivas_CQMFDecoder.c @@ -37,8 +37,9 @@ Nations Convention on Contracts on the International Sales of Goods. #include "ivas_CQMFDecoder.h" #include "options.h" -#ifdef SPLIT_REND_WITH_HEAD_ROT - +#ifndef SPLIT_REND_WITH_HEAD_ROT +#pragma warning( disable : 4206 ) +#else #include "ivas_NoiseGen.h" #include "ivas_PerceptualModel.h" #include "ivas_lcld_tables.h" diff --git a/lib_rend/ivas_CQMFDecoder.h b/lib_rend/ivas_CQMFDecoder.h index f331ed20d3..557f0e4161 100644 --- a/lib_rend/ivas_CQMFDecoder.h +++ b/lib_rend/ivas_CQMFDecoder.h @@ -39,27 +39,28 @@ extern "C" #endif #include "options.h" -#ifdef SPLIT_REND_WITH_HEAD_ROT - +#ifndef SPLIT_REND_WITH_HEAD_ROT +#pragma warning( disable : 4206 ) +#else #include "lib_rend.h" #define DECODER_ERROR_NONE ( 0 ) #define DECODER_ERROR_FS_NOT_SUPPORTED ( -1 ) #define DECODER_ERROR_CHAN_NOT_SUPPORTED ( -2 ) #define DECODER_ERROR_UNKNOWN ( -100 ) - typedef struct CQMF_DECODER CQMFDecoder; +typedef struct CQMF_DECODER CQMFDecoder; - CQMFDecoder *CreateCQMFDecoder( const int32_t iSampleRate, - const int32_t iChannels ); +CQMFDecoder *CreateCQMFDecoder( const int32_t iSampleRate, + const int32_t iChannels ); - void DeleteCQMFDecoder( CQMFDecoder *psCQMFDecoder ); +void DeleteCQMFDecoder( CQMFDecoder *psCQMFDecoder ); - int32_t CQMFDecoderGetError( CQMFDecoder *psCQMFDecoder ); +int32_t CQMFDecoderGetError( CQMFDecoder *psCQMFDecoder ); - int32_t DecodeFrame( CQMFDecoder *psCQMFDecoder, - ivas_split_rend_bits_t *pBits, - float ***pppfCQMFReal, - float ***pppfCQMFImag ); +int32_t DecodeFrame( CQMFDecoder *psCQMFDecoder, + ivas_split_rend_bits_t *pBits, + float ***pppfCQMFReal, + float ***pppfCQMFImag ); #endif #ifdef __cplusplus } diff --git a/lib_rend/ivas_CQMFEncoder.c b/lib_rend/ivas_CQMFEncoder.c index 0a7205e473..8eca5a147e 100644 --- a/lib_rend/ivas_CQMFEncoder.c +++ b/lib_rend/ivas_CQMFEncoder.c @@ -32,7 +32,9 @@ #include "ivas_CQMFEncoder.h" #include "options.h" -#ifdef SPLIT_REND_WITH_HEAD_ROT +#ifndef SPLIT_REND_WITH_HEAD_ROT +#pragma warning( disable : 4206 ) +#else #include #include #include diff --git a/lib_rend/ivas_CQMFEncoder.h b/lib_rend/ivas_CQMFEncoder.h index e78aa4614d..20871f63a4 100644 --- a/lib_rend/ivas_CQMFEncoder.h +++ b/lib_rend/ivas_CQMFEncoder.h @@ -37,32 +37,35 @@ extern "C" { #endif + #include "options.h" -#ifdef SPLIT_REND_WITH_HEAD_ROT +#ifndef SPLIT_REND_WITH_HEAD_ROT +#pragma warning( disable : 4206 ) +#else #include "lib_rend.h" #define ENCODER_ERROR_NONE ( 0 ) #define ENCODER_ERROR_FS_NOT_SUPPORTED ( -1 ) #define ENCODER_ERROR_CHAN_NOT_SUPPORTED ( -2 ) #define ENCODER_ERROR_UNKNOWN ( -100 ) - typedef struct CQMF_ENCODER CQMFEncoder; +typedef struct CQMF_ENCODER CQMFEncoder; - CQMFEncoder *CreateCQMFEncoder( const int32_t iSampleRate, - const int32_t iChannels, - const int32_t iTargetBitRate, - const int32_t iAllowSidePred ); +CQMFEncoder *CreateCQMFEncoder( const int32_t iSampleRate, + const int32_t iChannels, + const int32_t iTargetBitRate, + const int32_t iAllowSidePred ); - void DeleteCQMFEncoder( CQMFEncoder *psCQMFEncoder ); +void DeleteCQMFEncoder( CQMFEncoder *psCQMFEncoder ); - int32_t CQMFEncoderGetError( CQMFEncoder *psCQMFEncoder ); - int32_t EncodeFrame( - CQMFEncoder *psCQMFEncoder, - float ***pppfCQMFReal, - float ***pppfCQMFImag, - int32_t *piNumiBites, - const int32_t available_bits, - ivas_split_rend_bits_t *pBits ); - int32_t GetNumGroups( CQMFEncoder *psCQMFEncoder ); +int32_t CQMFEncoderGetError( CQMFEncoder *psCQMFEncoder ); +int32_t EncodeFrame( + CQMFEncoder *psCQMFEncoder, + float ***pppfCQMFReal, + float ***pppfCQMFImag, + int32_t *piNumiBites, + const int32_t available_bits, + ivas_split_rend_bits_t *pBits ); +int32_t GetNumGroups( CQMFEncoder *psCQMFEncoder ); #endif #ifdef __cplusplus } diff --git a/lib_rend/ivas_PerceptualModel.c b/lib_rend/ivas_PerceptualModel.c index 131ca8af0d..fd4139e3cd 100644 --- a/lib_rend/ivas_PerceptualModel.c +++ b/lib_rend/ivas_PerceptualModel.c @@ -29,8 +29,11 @@ the United Nations Convention on Contracts on the International Sales of Goods. *******************************************************************************************************/ + #include "options.h" -#ifdef SPLIT_REND_WITH_HEAD_ROT +#ifndef SPLIT_REND_WITH_HEAD_ROT +#pragma warning( disable : 4206 ) +#else #include "ivas_PerceptualModel.h" #include "prot.h" #include "ivas_prot_rend.h" diff --git a/lib_rend/ivas_PredDecoder.c b/lib_rend/ivas_PredDecoder.c index 067232318c..da83060ab6 100644 --- a/lib_rend/ivas_PredDecoder.c +++ b/lib_rend/ivas_PredDecoder.c @@ -31,8 +31,9 @@ *******************************************************************************************************/ #include "options.h" - -#ifdef SPLIT_REND_WITH_HEAD_ROT +#ifndef SPLIT_REND_WITH_HEAD_ROT +#pragma warning( disable : 4206 ) +#else #include "ivas_PredDecoder.h" #include #include diff --git a/lib_rend/ivas_PredEncoder.c b/lib_rend/ivas_PredEncoder.c index 6381588dda..a8351c891a 100644 --- a/lib_rend/ivas_PredEncoder.c +++ b/lib_rend/ivas_PredEncoder.c @@ -31,8 +31,9 @@ *******************************************************************************************************/ #include "options.h" - -#ifdef SPLIT_REND_WITH_HEAD_ROT +#ifndef SPLIT_REND_WITH_HEAD_ROT +#pragma warning( disable : 4206 ) +#else #include "ivas_PredEncoder.h" #include #include diff --git a/lib_rend/ivas_RMSEnvGrouping.c b/lib_rend/ivas_RMSEnvGrouping.c index d82fdb8943..f69167c7dd 100644 --- a/lib_rend/ivas_RMSEnvGrouping.c +++ b/lib_rend/ivas_RMSEnvGrouping.c @@ -31,8 +31,9 @@ *******************************************************************************************************/ #include "options.h" - -#ifdef SPLIT_REND_WITH_HEAD_ROT +#ifndef SPLIT_REND_WITH_HEAD_ROT +#pragma warning( disable : 4206 ) +#else #include "ivas_RMSEnvGrouping.h" /* Double check cost function calculation */ diff --git a/lib_rend/ivas_lcld_tables.c b/lib_rend/ivas_lcld_tables.c index 834e0536af..1a350e1f46 100644 --- a/lib_rend/ivas_lcld_tables.c +++ b/lib_rend/ivas_lcld_tables.c @@ -30,9 +30,12 @@ *******************************************************************************************************/ -#include "ivas_lcld_tables.h" + #include "options.h" -#ifdef SPLIT_REND_WITH_HEAD_ROT +#ifndef SPLIT_REND_WITH_HEAD_ROT +#pragma warning( disable : 4206 ) +#else +#include "ivas_lcld_tables.h" #include "ivas_prot_rend.h" #include "wmc_auto.h" #include diff --git a/lib_rend/ivas_lcld_tables.h b/lib_rend/ivas_lcld_tables.h index b50edae637..bdbd75ba1e 100644 --- a/lib_rend/ivas_lcld_tables.h +++ b/lib_rend/ivas_lcld_tables.h @@ -36,9 +36,14 @@ extern "C" { #endif + +#include "options.h" +#ifndef SPLIT_REND_WITH_HEAD_ROT +#pragma warning( disable : 4206 ) +#else #include #include // For NULL -#include "options.h" + #ifndef M_PI @@ -53,7 +58,7 @@ extern "C" #define MAX_BANDS ( 23 ) #define MAX_BANDS_48 ( 23 ) - extern const int32_t c_aiBandwidths48[MAX_BANDS_48]; // move this +extern const int32_t c_aiBandwidths48[MAX_BANDS_48]; // move this #define ENV_MIN ( -64 ) @@ -107,7 +112,7 @@ extern "C" #define MAX_BANDS_48 ( 23 ) - //#define USE_DEMOD_TABLES +//#define USE_DEMOD_TABLES #ifndef HUFF_READ_SIZE #define HUFF_READ_SIZE ( 4 ) @@ -117,340 +122,340 @@ extern "C" #define HUFF_DEC_TABLE_SIZE ( 16 ) #endif - extern const float c_afRotRealImag[PRED_MAX_VAL - PRED_MIN_VAL + 1][2]; - extern const float c_afRotRealImagSimple[SIMPLE_PHASE_MAX_VAL + 1][2]; - extern const int32_t c_aiDefaultTheta48[MAX_BANDS_48]; +extern const float c_afRotRealImag[PRED_MAX_VAL - PRED_MIN_VAL + 1][2]; +extern const float c_afRotRealImagSimple[SIMPLE_PHASE_MAX_VAL + 1][2]; +extern const int32_t c_aiDefaultTheta48[MAX_BANDS_48]; - extern const float c_afScaleFactor[ALLOC_TABLE_SIZE]; +extern const float c_afScaleFactor[ALLOC_TABLE_SIZE]; - extern const float c_afInvScaleFactor[ALLOC_TABLE_SIZE]; +extern const float c_afInvScaleFactor[ALLOC_TABLE_SIZE]; - extern const float c_afRMSEnvReconstructTable[ENV_RECONSTRUCT_TABLE_SIZE]; +extern const float c_afRMSEnvReconstructTable[ENV_RECONSTRUCT_TABLE_SIZE]; - extern const int32_t c_aiQuantMaxValues[ALLOC_TABLE_SIZE]; +extern const int32_t c_aiQuantMaxValues[ALLOC_TABLE_SIZE]; - extern const int32_t c_aiHuffmanDim[ALLOC_TABLE_SIZE]; +extern const int32_t c_aiHuffmanDim[ALLOC_TABLE_SIZE]; - extern const int32_t c_aiHuffmanMod[ALLOC_TABLE_SIZE]; +extern const int32_t c_aiHuffmanMod[ALLOC_TABLE_SIZE]; - extern const int32_t c_aiHuffmanSize[ALLOC_TABLE_SIZE]; +extern const int32_t c_aiHuffmanSize[ALLOC_TABLE_SIZE]; #ifndef ROM_TO_RAM - extern const uint32_t c_aauiCQMFHuffEnc1[16][2]; +extern const uint32_t c_aauiCQMFHuffEnc1[16][2]; - extern const uint32_t c_aauiCQMFHuffDec1[3][16]; +extern const uint32_t c_aauiCQMFHuffDec1[3][16]; - extern const uint32_t c_aauiCQMFHuffEnc2[16][2]; +extern const uint32_t c_aauiCQMFHuffEnc2[16][2]; - extern const uint32_t c_aauiCQMFHuffDec2[3][16]; +extern const uint32_t c_aauiCQMFHuffDec2[3][16]; - extern const uint32_t c_aauiCQMFHuffEnc3[25][2]; +extern const uint32_t c_aauiCQMFHuffEnc3[25][2]; - extern const uint32_t c_aauiCQMFHuffDec3[10][16]; +extern const uint32_t c_aauiCQMFHuffDec3[10][16]; - extern const uint32_t c_aauiCQMFHuffEnc4[36][2]; +extern const uint32_t c_aauiCQMFHuffEnc4[36][2]; - extern const uint32_t c_aauiCQMFHuffDec4[5][16]; +extern const uint32_t c_aauiCQMFHuffDec4[5][16]; - extern const uint32_t c_aauiCQMFHuffEnc5[36][2]; +extern const uint32_t c_aauiCQMFHuffEnc5[36][2]; - extern const uint32_t c_aauiCQMFHuffDec5[10][16]; +extern const uint32_t c_aauiCQMFHuffDec5[10][16]; - extern const uint32_t c_aauiCQMFHuffEnc6[49][2]; +extern const uint32_t c_aauiCQMFHuffEnc6[49][2]; - extern const uint32_t c_aauiCQMFHuffDec6[7][16]; +extern const uint32_t c_aauiCQMFHuffDec6[7][16]; - extern const uint32_t c_aauiCQMFHuffEnc7[64][2]; +extern const uint32_t c_aauiCQMFHuffEnc7[64][2]; - extern const uint32_t c_aauiCQMFHuffDec7[25][16]; +extern const uint32_t c_aauiCQMFHuffDec7[25][16]; - extern const uint32_t c_aauiCQMFHuffEnc8[81][2]; +extern const uint32_t c_aauiCQMFHuffEnc8[81][2]; - extern const uint32_t c_aauiCQMFHuffDec8[16][16]; +extern const uint32_t c_aauiCQMFHuffDec8[16][16]; - extern const uint32_t c_aauiCQMFHuffEnc9[100][2]; +extern const uint32_t c_aauiCQMFHuffEnc9[100][2]; - extern const uint32_t c_aauiCQMFHuffDec9[22][16]; +extern const uint32_t c_aauiCQMFHuffDec9[22][16]; - extern const uint32_t c_aauiCQMFHuffEnc10[169][2]; +extern const uint32_t c_aauiCQMFHuffEnc10[169][2]; - extern const uint32_t c_aauiCQMFHuffDec10[45][16]; +extern const uint32_t c_aauiCQMFHuffDec10[45][16]; - extern const uint32_t c_aauiCQMFHuffEnc11[196][2]; +extern const uint32_t c_aauiCQMFHuffEnc11[196][2]; - extern const uint32_t c_aauiCQMFHuffDec11[50][16]; +extern const uint32_t c_aauiCQMFHuffDec11[50][16]; - extern const uint32_t c_aauiCQMFHuffEnc12[289][2]; +extern const uint32_t c_aauiCQMFHuffEnc12[289][2]; - extern const uint32_t c_aauiCQMFHuffDec12[76][16]; +extern const uint32_t c_aauiCQMFHuffDec12[76][16]; - extern const uint32_t c_aauiCQMFHuffEnc13[324][2]; +extern const uint32_t c_aauiCQMFHuffEnc13[324][2]; - extern const uint32_t c_aauiCQMFHuffDec13[89][16]; +extern const uint32_t c_aauiCQMFHuffDec13[89][16]; - extern const uint32_t c_aauiCQMFHuffEnc14[400][2]; +extern const uint32_t c_aauiCQMFHuffEnc14[400][2]; - extern const uint32_t c_aauiCQMFHuffDec14[53][16]; +extern const uint32_t c_aauiCQMFHuffDec14[53][16]; - extern const uint32_t c_aauiCQMFHuffEnc15[576][2]; +extern const uint32_t c_aauiCQMFHuffEnc15[576][2]; - extern const uint32_t c_aauiCQMFHuffDec15[73][16]; +extern const uint32_t c_aauiCQMFHuffDec15[73][16]; - extern const uint32_t c_aauiCQMFHuffEnc16[729][2]; +extern const uint32_t c_aauiCQMFHuffEnc16[729][2]; - extern const uint32_t c_aauiCQMFHuffDec16[85][16]; +extern const uint32_t c_aauiCQMFHuffDec16[85][16]; - extern const uint32_t c_aauiCQMFHuffEnc17[729][2]; +extern const uint32_t c_aauiCQMFHuffEnc17[729][2]; - extern const uint32_t c_aauiCQMFHuffDec17[93][16]; +extern const uint32_t c_aauiCQMFHuffDec17[93][16]; - extern const uint32_t c_aauiCQMFHuffEnc18[28][2]; +extern const uint32_t c_aauiCQMFHuffEnc18[28][2]; - extern const uint32_t c_aauiCQMFHuffDec18[6][16]; +extern const uint32_t c_aauiCQMFHuffDec18[6][16]; - extern const uint32_t c_aauiCQMFHuffEnc19[29][2]; +extern const uint32_t c_aauiCQMFHuffEnc19[29][2]; - extern const uint32_t c_aauiCQMFHuffDec19[6][16]; +extern const uint32_t c_aauiCQMFHuffDec19[6][16]; - extern const uint32_t c_aauiCQMFHuffEnc20[32][2]; +extern const uint32_t c_aauiCQMFHuffEnc20[32][2]; - extern const uint32_t c_aauiCQMFHuffDec20[6][16]; +extern const uint32_t c_aauiCQMFHuffDec20[6][16]; - extern const uint32_t c_aauiCQMFHuffEnc21[37][2]; +extern const uint32_t c_aauiCQMFHuffEnc21[37][2]; - extern const uint32_t c_aauiCQMFHuffDec21[7][16]; +extern const uint32_t c_aauiCQMFHuffDec21[7][16]; - extern const uint32_t c_aauiCQMFHuffEnc22[39][2]; +extern const uint32_t c_aauiCQMFHuffEnc22[39][2]; - extern const uint32_t c_aauiCQMFHuffDec22[9][16]; +extern const uint32_t c_aauiCQMFHuffDec22[9][16]; - extern const uint32_t c_aauiCQMFHuffEnc23[46][2]; +extern const uint32_t c_aauiCQMFHuffEnc23[46][2]; - extern const uint32_t c_aauiCQMFHuffDec23[12][16]; +extern const uint32_t c_aauiCQMFHuffDec23[12][16]; - extern const uint32_t c_aauiCQMFHuffEnc24[55][2]; +extern const uint32_t c_aauiCQMFHuffEnc24[55][2]; - extern const uint32_t c_aauiCQMFHuffDec24[17][16]; +extern const uint32_t c_aauiCQMFHuffDec24[17][16]; - extern const uint32_t c_aauiCQMFHuffEnc25[65][2]; +extern const uint32_t c_aauiCQMFHuffEnc25[65][2]; - extern const uint32_t c_aauiCQMFHuffDec25[19][16]; +extern const uint32_t c_aauiCQMFHuffDec25[19][16]; - extern const uint32_t c_aauiCQMFHuffEnc26[77][2]; +extern const uint32_t c_aauiCQMFHuffEnc26[77][2]; - extern const uint32_t c_aauiCQMFHuffDec26[26][16]; +extern const uint32_t c_aauiCQMFHuffDec26[26][16]; - extern const uint32_t c_aauiCQMFHuffEnc27[91][2]; +extern const uint32_t c_aauiCQMFHuffEnc27[91][2]; - extern const uint32_t c_aauiCQMFHuffDec27[28][16]; +extern const uint32_t c_aauiCQMFHuffDec27[28][16]; - extern const uint32_t c_aauiCQMFHuffEnc28[109][2]; +extern const uint32_t c_aauiCQMFHuffEnc28[109][2]; - extern const uint32_t c_aauiCQMFHuffDec28[30][16]; +extern const uint32_t c_aauiCQMFHuffDec28[30][16]; - extern const uint32_t c_aauiCQMFHuffEnc29[129][2]; +extern const uint32_t c_aauiCQMFHuffEnc29[129][2]; - extern const uint32_t c_aauiCQMFHuffDec29[34][16]; +extern const uint32_t c_aauiCQMFHuffDec29[34][16]; - extern const uint32_t c_aauiCQMFHuffEnc30[153][2]; +extern const uint32_t c_aauiCQMFHuffEnc30[153][2]; - extern const uint32_t c_aauiCQMFHuffDec30[39][16]; +extern const uint32_t c_aauiCQMFHuffDec30[39][16]; - extern const uint32_t c_aauiCQMFHuffEnc31[181][2]; +extern const uint32_t c_aauiCQMFHuffEnc31[181][2]; - extern const uint32_t c_aauiCQMFHuffDec31[43][16]; +extern const uint32_t c_aauiCQMFHuffDec31[43][16]; - extern const uint32_t c_aauiCQMFHuffEnc33[16][2]; +extern const uint32_t c_aauiCQMFHuffEnc33[16][2]; - extern const uint32_t c_aauiCQMFHuffDec33[2][16]; +extern const uint32_t c_aauiCQMFHuffDec33[2][16]; - extern const uint32_t c_aauiCQMFHuffEnc34[16][2]; +extern const uint32_t c_aauiCQMFHuffEnc34[16][2]; - extern const uint32_t c_aauiCQMFHuffDec34[2][16]; +extern const uint32_t c_aauiCQMFHuffDec34[2][16]; - extern const uint32_t c_aauiCQMFHuffEnc35[25][2]; +extern const uint32_t c_aauiCQMFHuffEnc35[25][2]; - extern const uint32_t c_aauiCQMFHuffDec35[9][16]; +extern const uint32_t c_aauiCQMFHuffDec35[9][16]; - extern const uint32_t c_aauiCQMFHuffEnc36[36][2]; +extern const uint32_t c_aauiCQMFHuffEnc36[36][2]; - extern const uint32_t c_aauiCQMFHuffDec36[7][16]; +extern const uint32_t c_aauiCQMFHuffDec36[7][16]; - extern const uint32_t c_aauiCQMFHuffEnc37[36][2]; +extern const uint32_t c_aauiCQMFHuffEnc37[36][2]; - extern const uint32_t c_aauiCQMFHuffDec37[4][16]; +extern const uint32_t c_aauiCQMFHuffDec37[4][16]; - extern const uint32_t c_aauiCQMFHuffEnc38[49][2]; +extern const uint32_t c_aauiCQMFHuffEnc38[49][2]; - extern const uint32_t c_aauiCQMFHuffDec38[22][16]; +extern const uint32_t c_aauiCQMFHuffDec38[22][16]; - extern const uint32_t c_aauiCQMFHuffEnc39[64][2]; +extern const uint32_t c_aauiCQMFHuffEnc39[64][2]; - extern const uint32_t c_aauiCQMFHuffDec39[12][16]; +extern const uint32_t c_aauiCQMFHuffDec39[12][16]; - extern const uint32_t c_aauiCQMFHuffEnc40[81][2]; +extern const uint32_t c_aauiCQMFHuffEnc40[81][2]; - extern const uint32_t c_aauiCQMFHuffDec40[36][16]; +extern const uint32_t c_aauiCQMFHuffDec40[36][16]; - extern const uint32_t c_aauiCQMFHuffEnc41[100][2]; +extern const uint32_t c_aauiCQMFHuffEnc41[100][2]; - extern const uint32_t c_aauiCQMFHuffDec41[16][16]; +extern const uint32_t c_aauiCQMFHuffDec41[16][16]; - extern const uint32_t c_aauiCQMFHuffEnc42[169][2]; +extern const uint32_t c_aauiCQMFHuffEnc42[169][2]; - extern const uint32_t c_aauiCQMFHuffDec42[28][16]; +extern const uint32_t c_aauiCQMFHuffDec42[28][16]; - extern const uint32_t c_aauiCQMFHuffEnc43[196][2]; +extern const uint32_t c_aauiCQMFHuffEnc43[196][2]; - extern const uint32_t c_aauiCQMFHuffDec43[32][16]; +extern const uint32_t c_aauiCQMFHuffDec43[32][16]; - extern const uint32_t c_aauiCQMFHuffEnc44[289][2]; +extern const uint32_t c_aauiCQMFHuffEnc44[289][2]; - extern const uint32_t c_aauiCQMFHuffDec44[27][16]; +extern const uint32_t c_aauiCQMFHuffDec44[27][16]; - extern const uint32_t c_aauiCQMFHuffEnc45[324][2]; +extern const uint32_t c_aauiCQMFHuffEnc45[324][2]; - extern const uint32_t c_aauiCQMFHuffDec45[50][16]; +extern const uint32_t c_aauiCQMFHuffDec45[50][16]; - extern const uint32_t c_aauiCQMFHuffEnc46[400][2]; +extern const uint32_t c_aauiCQMFHuffEnc46[400][2]; - extern const uint32_t c_aauiCQMFHuffDec46[61][16]; +extern const uint32_t c_aauiCQMFHuffDec46[61][16]; - extern const uint32_t c_aauiCQMFHuffEnc47[576][2]; +extern const uint32_t c_aauiCQMFHuffEnc47[576][2]; - extern const uint32_t c_aauiCQMFHuffDec47[87][16]; +extern const uint32_t c_aauiCQMFHuffDec47[87][16]; - extern const uint32_t c_aauiCQMFHuffEnc48[729][2]; +extern const uint32_t c_aauiCQMFHuffEnc48[729][2]; - extern const uint32_t c_aauiCQMFHuffDec48[110][16]; +extern const uint32_t c_aauiCQMFHuffDec48[110][16]; - extern const uint32_t c_aauiCQMFHuffEnc49[729][2]; +extern const uint32_t c_aauiCQMFHuffEnc49[729][2]; - extern const uint32_t c_aauiCQMFHuffDec49[113][16]; +extern const uint32_t c_aauiCQMFHuffDec49[113][16]; - extern const uint32_t c_aauiCQMFHuffEnc50[28][2]; +extern const uint32_t c_aauiCQMFHuffEnc50[28][2]; - extern const uint32_t c_aauiCQMFHuffDec50[6][16]; +extern const uint32_t c_aauiCQMFHuffDec50[6][16]; - extern const uint32_t c_aauiCQMFHuffEnc51[29][2]; +extern const uint32_t c_aauiCQMFHuffEnc51[29][2]; - extern const uint32_t c_aauiCQMFHuffDec51[6][16]; +extern const uint32_t c_aauiCQMFHuffDec51[6][16]; - extern const uint32_t c_aauiCQMFHuffEnc52[32][2]; +extern const uint32_t c_aauiCQMFHuffEnc52[32][2]; - extern const uint32_t c_aauiCQMFHuffDec52[7][16]; +extern const uint32_t c_aauiCQMFHuffDec52[7][16]; - extern const uint32_t c_aauiCQMFHuffEnc53[37][2]; +extern const uint32_t c_aauiCQMFHuffEnc53[37][2]; - extern const uint32_t c_aauiCQMFHuffDec53[9][16]; +extern const uint32_t c_aauiCQMFHuffDec53[9][16]; - extern const uint32_t c_aauiCQMFHuffEnc54[39][2]; +extern const uint32_t c_aauiCQMFHuffEnc54[39][2]; - extern const uint32_t c_aauiCQMFHuffDec54[9][16]; +extern const uint32_t c_aauiCQMFHuffDec54[9][16]; - extern const uint32_t c_aauiCQMFHuffEnc55[46][2]; +extern const uint32_t c_aauiCQMFHuffEnc55[46][2]; - extern const uint32_t c_aauiCQMFHuffDec55[10][16]; +extern const uint32_t c_aauiCQMFHuffDec55[10][16]; - extern const uint32_t c_aauiCQMFHuffEnc56[55][2]; +extern const uint32_t c_aauiCQMFHuffEnc56[55][2]; - extern const uint32_t c_aauiCQMFHuffDec56[12][16]; +extern const uint32_t c_aauiCQMFHuffDec56[12][16]; - extern const uint32_t c_aauiCQMFHuffEnc57[65][2]; +extern const uint32_t c_aauiCQMFHuffEnc57[65][2]; - extern const uint32_t c_aauiCQMFHuffDec57[14][16]; +extern const uint32_t c_aauiCQMFHuffDec57[14][16]; - extern const uint32_t c_aauiCQMFHuffEnc58[77][2]; +extern const uint32_t c_aauiCQMFHuffEnc58[77][2]; - extern const uint32_t c_aauiCQMFHuffDec58[17][16]; +extern const uint32_t c_aauiCQMFHuffDec58[17][16]; - extern const uint32_t c_aauiCQMFHuffEnc59[91][2]; +extern const uint32_t c_aauiCQMFHuffEnc59[91][2]; - extern const uint32_t c_aauiCQMFHuffDec59[20][16]; +extern const uint32_t c_aauiCQMFHuffDec59[20][16]; - extern const uint32_t c_aauiCQMFHuffEnc60[109][2]; +extern const uint32_t c_aauiCQMFHuffEnc60[109][2]; - extern const uint32_t c_aauiCQMFHuffDec60[24][16]; +extern const uint32_t c_aauiCQMFHuffDec60[24][16]; - extern const uint32_t c_aauiCQMFHuffEnc61[129][2]; +extern const uint32_t c_aauiCQMFHuffEnc61[129][2]; - extern const uint32_t c_aauiCQMFHuffDec61[33][16]; +extern const uint32_t c_aauiCQMFHuffDec61[33][16]; - extern const uint32_t c_aauiCQMFHuffEnc62[153][2]; +extern const uint32_t c_aauiCQMFHuffEnc62[153][2]; - extern const uint32_t c_aauiCQMFHuffDec62[41][16]; +extern const uint32_t c_aauiCQMFHuffDec62[41][16]; - extern const uint32_t c_aauiCQMFHuffEnc63[181][2]; +extern const uint32_t c_aauiCQMFHuffEnc63[181][2]; - extern const uint32_t c_aauiCQMFHuffDec63[39][16]; +extern const uint32_t c_aauiCQMFHuffDec63[39][16]; - extern const uint32_t ( *c_apauiHuffEncTabels[2 * ALLOC_TABLE_SIZE] )[2]; +extern const uint32_t ( *c_apauiHuffEncTabels[2 * ALLOC_TABLE_SIZE] )[2]; - extern const uint32_t ( *c_apauiHuffDecTables[2 * ALLOC_TABLE_SIZE] )[HUFF_DEC_TABLE_SIZE]; +extern const uint32_t ( *c_apauiHuffDecTables[2 * ALLOC_TABLE_SIZE] )[HUFF_DEC_TABLE_SIZE]; #else extern const uint16_t c_aauiCQMFHuffEnc1[16][2]; extern const uint16_t c_aauiCQMFHuffEnc2[16][2]; @@ -519,49 +524,51 @@ extern const uint32_t num_row_aauiCQMFHuff[2 * ALLOC_TABLE_SIZE]; #endif #ifdef USE_DEMOD_TABLES - extern const int32_t c_aaiHuffDemod1[16][2]; +extern const int32_t c_aaiHuffDemod1[16][2]; - extern const int32_t c_aaiHuffDemod2[16][2]; +extern const int32_t c_aaiHuffDemod2[16][2]; - extern const int32_t c_aaiHuffDemod3[25][2]; +extern const int32_t c_aaiHuffDemod3[25][2]; - extern const int32_t c_aaiHuffDemod4[36][2]; +extern const int32_t c_aaiHuffDemod4[36][2]; - extern const int32_t c_aaiHuffDemod5[36][2]; +extern const int32_t c_aaiHuffDemod5[36][2]; - extern const int32_t c_aaiHuffDemod6[49][2]; +extern const int32_t c_aaiHuffDemod6[49][2]; - extern const int32_t c_aaiHuffDemod7[64][2]; +extern const int32_t c_aaiHuffDemod7[64][2]; - extern const int32_t c_aaiHuffDemod8[81][2]; +extern const int32_t c_aaiHuffDemod8[81][2]; - extern const int32_t c_aaiHuffDemod9[100][2]; +extern const int32_t c_aaiHuffDemod9[100][2]; - extern const int32_t c_aaiHuffDemod10[169][2]; +extern const int32_t c_aaiHuffDemod10[169][2]; - extern const int32_t c_aaiHuffDemod11[196][2]; +extern const int32_t c_aaiHuffDemod11[196][2]; - extern const int32_t c_aaiHuffDemod12[289][2]; +extern const int32_t c_aaiHuffDemod12[289][2]; - extern const int32_t c_aaiHuffDemod13[324][2]; +extern const int32_t c_aaiHuffDemod13[324][2]; - extern const int32_t c_aaiHuffDemod14[400][2]; +extern const int32_t c_aaiHuffDemod14[400][2]; - extern const int32_t c_aaiHuffDemod15[576][2]; +extern const int32_t c_aaiHuffDemod15[576][2]; - extern const int32_t c_aaiHuffDemod16[729][2]; +extern const int32_t c_aaiHuffDemod16[729][2]; - extern const int32_t c_aaiHuffDemod17[729][2]; +extern const int32_t c_aaiHuffDemod17[729][2]; - extern const int32_t ( *c_apaiDemodTables[ALLOC_TABLE_SIZE] )[2]; +extern const int32_t ( *c_apaiDemodTables[ALLOC_TABLE_SIZE] )[2]; #endif - extern const uint32_t c_aaiRMSEnvHuffEnc[64][2]; +extern const uint32_t c_aaiRMSEnvHuffEnc[64][2]; - extern const uint32_t c_aaiRMSEnvHuffDec[13][HUFF_DEC_TABLE_SIZE]; +extern const uint32_t c_aaiRMSEnvHuffDec[13][HUFF_DEC_TABLE_SIZE]; #ifdef __cplusplus } #endif +#endif + #endif /* _TABLES_H_ */ diff --git a/lib_rend/ivas_splitRend_lcld_dec.c b/lib_rend/ivas_splitRend_lcld_dec.c index 49987f18f2..936f5d2feb 100644 --- a/lib_rend/ivas_splitRend_lcld_dec.c +++ b/lib_rend/ivas_splitRend_lcld_dec.c @@ -36,8 +36,9 @@ Nations Convention on Contracts on the International Sales of Goods. *******************************************************************************************************/ #include "options.h" - -#ifdef SPLIT_REND_WITH_HEAD_ROT +#ifndef SPLIT_REND_WITH_HEAD_ROT +#pragma warning( disable : 4206 ) +#else #include "cnst.h" #include "ivas_cnst.h" #include "ivas_prot_rend.h" diff --git a/lib_rend/ivas_splitRend_lcld_enc.c b/lib_rend/ivas_splitRend_lcld_enc.c index bb96064529..2e6ba40e15 100644 --- a/lib_rend/ivas_splitRend_lcld_enc.c +++ b/lib_rend/ivas_splitRend_lcld_enc.c @@ -36,8 +36,9 @@ Nations Convention on Contracts on the International Sales of Goods. *******************************************************************************************************/ #include "options.h" - -#ifdef SPLIT_REND_WITH_HEAD_ROT +#ifndef SPLIT_REND_WITH_HEAD_ROT +#pragma warning( disable : 4206 ) +#else #include "cnst.h" #include "ivas_cnst.h" #include "ivas_prot_rend.h" diff --git a/lib_rend/ivas_splitRendererPLC.c b/lib_rend/ivas_splitRendererPLC.c index dfa5e71a23..1edd5588fe 100644 --- a/lib_rend/ivas_splitRendererPLC.c +++ b/lib_rend/ivas_splitRendererPLC.c @@ -31,8 +31,9 @@ *******************************************************************************************************/ #include "options.h" - -#ifdef SPLIT_REND_WITH_HEAD_ROT +#ifndef SPLIT_REND_WITH_HEAD_ROT +#pragma warning( disable : 4206 ) +#else #include #include #include diff --git a/lib_rend/ivas_splitRendererPost.c b/lib_rend/ivas_splitRendererPost.c index 1adf977496..b9ca1f66b5 100644 --- a/lib_rend/ivas_splitRendererPost.c +++ b/lib_rend/ivas_splitRendererPost.c @@ -31,8 +31,9 @@ *******************************************************************************************************/ #include "options.h" - -#ifdef SPLIT_REND_WITH_HEAD_ROT +#ifndef SPLIT_REND_WITH_HEAD_ROT +#pragma warning( disable : 4206 ) +#else #include #include #ifdef SPLIT_REND_WITH_HEAD_ROT_DEBUG diff --git a/lib_rend/ivas_splitRendererPre.c b/lib_rend/ivas_splitRendererPre.c index a087efee6f..dc586b91d1 100644 --- a/lib_rend/ivas_splitRendererPre.c +++ b/lib_rend/ivas_splitRendererPre.c @@ -31,8 +31,9 @@ *******************************************************************************************************/ #include "options.h" - -#ifdef SPLIT_REND_WITH_HEAD_ROT +#ifndef SPLIT_REND_WITH_HEAD_ROT +#pragma warning( disable : 4206 ) +#else #include #include #ifdef SPLIT_REND_WITH_HEAD_ROT_DEBUG diff --git a/lib_rend/ivas_splitRenderer_utils.c b/lib_rend/ivas_splitRenderer_utils.c index f5a9791b14..691e623d81 100644 --- a/lib_rend/ivas_splitRenderer_utils.c +++ b/lib_rend/ivas_splitRenderer_utils.c @@ -31,8 +31,10 @@ *******************************************************************************************************/ #include "options.h" +#ifndef SPLIT_REND_WITH_HEAD_ROT +#pragma warning( disable : 4206 ) +#else -#ifdef SPLIT_REND_WITH_HEAD_ROT #include #include #include "ivas_prot.h" diff --git a/lib_util/split_rend_bfi_file_reader.c b/lib_util/split_rend_bfi_file_reader.c index 40767f6828..159b3c3c84 100644 --- a/lib_util/split_rend_bfi_file_reader.c +++ b/lib_util/split_rend_bfi_file_reader.c @@ -30,8 +30,9 @@ *******************************************************************************************************/ -#include "options.h" +#pragma warning( disable : 4206 ) +#include "options.h" #ifdef SPLIT_REND_WITH_HEAD_ROT #include "split_rend_bfi_file_reader.h" #include diff --git a/lib_util/split_render_file_read_write.c b/lib_util/split_render_file_read_write.c index 5a7929e28c..79039026c8 100644 --- a/lib_util/split_render_file_read_write.c +++ b/lib_util/split_render_file_read_write.c @@ -31,8 +31,9 @@ *******************************************************************************************************/ #include "options.h" - -#ifdef SPLIT_REND_WITH_HEAD_ROT +#ifndef SPLIT_REND_WITH_HEAD_ROT +#pragma warning( disable : 4206 ) +#else #include "split_render_file_read_write.h" #include #include -- GitLab From 69ae666d3dda8eef6140275844a931832af9b3dc Mon Sep 17 00:00:00 2001 From: vaclav Date: Mon, 14 Aug 2023 21:55:59 +0200 Subject: [PATCH 17/26] fix compilation warnings --- lib_dec/ivas_mc_paramupmix_dec.c | 7 ++++++- lib_rend/ivas_lcld_tables.h | 9 --------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/lib_dec/ivas_mc_paramupmix_dec.c b/lib_dec/ivas_mc_paramupmix_dec.c index 35d48f2c63..06751a67c5 100644 --- a/lib_dec/ivas_mc_paramupmix_dec.c +++ b/lib_dec/ivas_mc_paramupmix_dec.c @@ -531,7 +531,9 @@ void ivas_mc_paramupmix_dec_render( int16_t slots_to_render, first_sf, last_sf, subframe_idx; uint16_t slot_size, ch; float *output_f_local[MAX_OUTPUT_CHANNELS]; +#ifdef SPLIT_REND_WITH_HEAD_ROT int16_t slot_index_start; +#endif MC_PARAMUPMIX_DEC_HANDLE hMCParamUpmix; hMCParamUpmix = st_ivas->hMCParamUpmix; @@ -573,17 +575,20 @@ void ivas_mc_paramupmix_dec_render( mvr2r( hMCParamUpmix->beta_prev[ch], hMCParamUpmix->beta_sf[ch], IVAS_MAX_NUM_BANDS ); } +#ifdef SPLIT_REND_WITH_HEAD_ROT slot_index_start = 0; +#endif for ( subframe_idx = first_sf; subframe_idx < last_sf; subframe_idx++ ) { int16_t n_samples_sf = slot_size * st_ivas->hTcBuffer->subframe_nbslots[subframe_idx]; #ifdef SPLIT_REND_WITH_HEAD_ROT ivas_mc_paramupmix_dec_sf( st_ivas, output_f_local, slot_index_start ); + + slot_index_start += st_ivas->hTcBuffer->subframe_nbslots[subframe_idx]; #else ivas_mc_paramupmix_dec_sf( st_ivas, output_f_local ); #endif - slot_index_start += st_ivas->hTcBuffer->subframe_nbslots[subframe_idx]; for ( ch = 0; ch < MAX_OUTPUT_CHANNELS; ch++ ) { output_f_local[ch] += n_samples_sf; diff --git a/lib_rend/ivas_lcld_tables.h b/lib_rend/ivas_lcld_tables.h index bdbd75ba1e..49c5f75cb7 100644 --- a/lib_rend/ivas_lcld_tables.h +++ b/lib_rend/ivas_lcld_tables.h @@ -32,11 +32,6 @@ #ifndef _IVAS_TABLES_H_ #define _IVAS_TABLES_H_ -#ifdef __cplusplus -extern "C" -{ -#endif - #include "options.h" #ifndef SPLIT_REND_WITH_HEAD_ROT #pragma warning( disable : 4206 ) @@ -565,10 +560,6 @@ extern const uint32_t c_aaiRMSEnvHuffEnc[64][2]; extern const uint32_t c_aaiRMSEnvHuffDec[13][HUFF_DEC_TABLE_SIZE]; -#ifdef __cplusplus -} -#endif - #endif #endif /* _TABLES_H_ */ -- GitLab From 5f23e6f943fbdac8eea9a2151d3116b6fcd9b7fe Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Mon, 14 Aug 2023 22:02:33 +0200 Subject: [PATCH 18/26] Add lib_rend/ivas_lcld_tables.c to removal list for build jobs --- CMakeLists.txt | 2 ++ Makefile | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 33e523a86b..5035bd7088 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -176,9 +176,11 @@ if(NOT INCLUDE_SPLIT) list(FILTER libRendSrcs EXCLUDE REGEX ".*lib_rend\/.*ivas_Pred.*\.c$") list(FILTER libRendSrcs EXCLUDE REGEX ".*lib_rend\/.*ivas_RMSEnv.*\.c$") list(FILTER libRendSrcs EXCLUDE REGEX ".*lib_rend\/.*ivas_PerceptualModel.*\.c$") + list(FILTER libRendSrcs EXCLUDE REGEX ".*lib_rend\/.*ivas_lcld_tables.*\.c$") list(FILTER libRendHeaders EXCLUDE REGEX ".*lib_rend\/.*lc3plus.*\.h$") list(FILTER libRendHeaders EXCLUDE REGEX ".*lib_rend\/.*splitRend.*\.h$") list(FILTER libRendHeaders EXCLUDE REGEX ".*lib_rend\/.*ivas_cldfb_codec.*\.h$") + list(FILTER libRendHeaders EXCLUDE REGEX ".*lib_rend\/.*ivas_lcld_tables.*\.h$") endif() if(INCLUDE_SPLIT) diff --git a/Makefile b/Makefile index cf9f902136..36a32342fc 100644 --- a/Makefile +++ b/Makefile @@ -122,7 +122,8 @@ SRCS_SPLIT_REND = ivas_CQMFDecoder.c ivas_CQMFEncoder.c ivas_PerceptualModel.c i ivas_PredEncoder.c ivas_RMSEnvGrouping.c ivas_MSPred.c ivas_NoiseGen.c \ ivas_cldfb_codec_bitstream.c ivas_splitRend_lcld_dec.c ivas_splitRend_lcld_enc.c \ ivas_splitRendererPLC.c ivas_splitRendererPost.c ivas_splitRendererPre.c \ - ivas_splitRenderer_utils.c split_rend_bfi_file_reader.c split_render_file_read_write.c + ivas_splitRenderer_utils.c split_rend_bfi_file_reader.c split_render_file_read_write.c \ + ivas_lcld_tables.c ############################################################################### -- GitLab From 5f93484bacab7c4d8a1e79d4772f217c49d98968 Mon Sep 17 00:00:00 2001 From: vaclav Date: Mon, 14 Aug 2023 22:03:01 +0200 Subject: [PATCH 19/26] one more attempt to silent the compilation of empty files in Linux --- lib_rend/ivas_lcld_tables.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib_rend/ivas_lcld_tables.c b/lib_rend/ivas_lcld_tables.c index 1a350e1f46..357c5c70e2 100644 --- a/lib_rend/ivas_lcld_tables.c +++ b/lib_rend/ivas_lcld_tables.c @@ -34,6 +34,7 @@ #include "options.h" #ifndef SPLIT_REND_WITH_HEAD_ROT #pragma warning( disable : 4206 ) +typedef float dummy_type; #else #include "ivas_lcld_tables.h" #include "ivas_prot_rend.h" -- GitLab From 43d5eed97ab7a155c99818a94be548ec1129d166 Mon Sep 17 00:00:00 2001 From: vaclav Date: Mon, 14 Aug 2023 22:05:50 +0200 Subject: [PATCH 20/26] one more attempt to silent the compilation of empty files in Linux --- lib_rend/ivas_lcld_tables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_rend/ivas_lcld_tables.c b/lib_rend/ivas_lcld_tables.c index 357c5c70e2..a78341a9f1 100644 --- a/lib_rend/ivas_lcld_tables.c +++ b/lib_rend/ivas_lcld_tables.c @@ -33,7 +33,7 @@ #include "options.h" #ifndef SPLIT_REND_WITH_HEAD_ROT -#pragma warning( disable : 4206 ) +//#pragma warning( disable : 4206 ) typedef float dummy_type; #else #include "ivas_lcld_tables.h" -- GitLab From b5949ad3f4a326f8b7b406c25c58f9664f7ef7b8 Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Mon, 14 Aug 2023 22:30:47 +0200 Subject: [PATCH 21/26] Clang format --- lib_rend/lib_rend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index a08f3f2b76..abe380e8c3 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -8672,7 +8672,7 @@ ivas_error IVAS_REND_GetSamples( &bits, Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, - (const int16_t) ( ( BINAURAL_MAXBANDS * hIvasRend->sampleRateOut ) / 48000 ), + ( const int16_t )( ( BINAURAL_MAXBANDS * hIvasRend->sampleRateOut ) / 48000 ), tmpBinaural, 1, td_input, -- GitLab From f23070268c70cf4f6c10f6050e42df2ccdfe5d8c Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Tue, 15 Aug 2023 07:44:21 +0200 Subject: [PATCH 22/26] Fix build-codec-windows-msbuild without pragma --- .gitlab-ci.yml | 1 + lib_rend/ivas_CQMFDecoder.c | 4 +- lib_rend/ivas_CQMFDecoder.h | 4 +- lib_rend/ivas_CQMFEncoder.c | 4 +- lib_rend/ivas_CQMFEncoder.h | 4 +- lib_rend/ivas_PerceptualModel.c | 3 - lib_rend/ivas_PredDecoder.c | 4 +- lib_rend/ivas_PredEncoder.c | 4 +- lib_rend/ivas_RMSEnvGrouping.c | 4 +- lib_rend/ivas_lcld_tables.c | 5 +- lib_rend/ivas_lcld_tables.h | 4 +- lib_rend/ivas_splitRend_lcld_dec.c | 4 +- lib_rend/ivas_splitRend_lcld_enc.c | 4 +- lib_rend/ivas_splitRendererPLC.c | 4 +- lib_rend/ivas_splitRendererPost.c | 4 +- lib_rend/ivas_splitRendererPre.c | 4 +- lib_rend/ivas_splitRenderer_utils.c | 5 +- lib_util/split_rend_bfi_file_reader.c | 2 - lib_util/split_render_file_read_write.c | 4 +- scripts/strip_split_rendering.py | 96 +++++++++++++++++++++++++ 20 files changed, 113 insertions(+), 55 deletions(-) create mode 100644 scripts/strip_split_rendering.py diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a21de1e35d..fce3bd3d67 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -314,6 +314,7 @@ build-codec-windows-msbuild: script: - *print-common-info-windows - $winoutdata = $null + - .\scripts\strip_split_rendering.py - MSBuild.exe .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug | tee -variable winoutdata - $winoutdata | Out-File $BUILD_OUTPUT -Encoding Utf8 - ("& python ci/check_for_warnings.py '$BUILD_OUTPUT'") | Invoke-Expression diff --git a/lib_rend/ivas_CQMFDecoder.c b/lib_rend/ivas_CQMFDecoder.c index 9854630111..bf6c7fa518 100644 --- a/lib_rend/ivas_CQMFDecoder.c +++ b/lib_rend/ivas_CQMFDecoder.c @@ -37,9 +37,7 @@ Nations Convention on Contracts on the International Sales of Goods. #include "ivas_CQMFDecoder.h" #include "options.h" -#ifndef SPLIT_REND_WITH_HEAD_ROT -#pragma warning( disable : 4206 ) -#else +#ifdef SPLIT_REND_WITH_HEAD_ROT #include "ivas_NoiseGen.h" #include "ivas_PerceptualModel.h" #include "ivas_lcld_tables.h" diff --git a/lib_rend/ivas_CQMFDecoder.h b/lib_rend/ivas_CQMFDecoder.h index 557f0e4161..b6c59a1db4 100644 --- a/lib_rend/ivas_CQMFDecoder.h +++ b/lib_rend/ivas_CQMFDecoder.h @@ -39,9 +39,7 @@ extern "C" #endif #include "options.h" -#ifndef SPLIT_REND_WITH_HEAD_ROT -#pragma warning( disable : 4206 ) -#else +#ifdef SPLIT_REND_WITH_HEAD_ROT #include "lib_rend.h" #define DECODER_ERROR_NONE ( 0 ) #define DECODER_ERROR_FS_NOT_SUPPORTED ( -1 ) diff --git a/lib_rend/ivas_CQMFEncoder.c b/lib_rend/ivas_CQMFEncoder.c index 8eca5a147e..0a7205e473 100644 --- a/lib_rend/ivas_CQMFEncoder.c +++ b/lib_rend/ivas_CQMFEncoder.c @@ -32,9 +32,7 @@ #include "ivas_CQMFEncoder.h" #include "options.h" -#ifndef SPLIT_REND_WITH_HEAD_ROT -#pragma warning( disable : 4206 ) -#else +#ifdef SPLIT_REND_WITH_HEAD_ROT #include #include #include diff --git a/lib_rend/ivas_CQMFEncoder.h b/lib_rend/ivas_CQMFEncoder.h index 20871f63a4..ad04909ddd 100644 --- a/lib_rend/ivas_CQMFEncoder.h +++ b/lib_rend/ivas_CQMFEncoder.h @@ -39,9 +39,7 @@ extern "C" #endif #include "options.h" -#ifndef SPLIT_REND_WITH_HEAD_ROT -#pragma warning( disable : 4206 ) -#else +#ifdef SPLIT_REND_WITH_HEAD_ROT #include "lib_rend.h" #define ENCODER_ERROR_NONE ( 0 ) #define ENCODER_ERROR_FS_NOT_SUPPORTED ( -1 ) diff --git a/lib_rend/ivas_PerceptualModel.c b/lib_rend/ivas_PerceptualModel.c index fd4139e3cd..6e102cdd12 100644 --- a/lib_rend/ivas_PerceptualModel.c +++ b/lib_rend/ivas_PerceptualModel.c @@ -31,9 +31,6 @@ *******************************************************************************************************/ #include "options.h" -#ifndef SPLIT_REND_WITH_HEAD_ROT -#pragma warning( disable : 4206 ) -#else #include "ivas_PerceptualModel.h" #include "prot.h" #include "ivas_prot_rend.h" diff --git a/lib_rend/ivas_PredDecoder.c b/lib_rend/ivas_PredDecoder.c index da83060ab6..1e8adf2aed 100644 --- a/lib_rend/ivas_PredDecoder.c +++ b/lib_rend/ivas_PredDecoder.c @@ -31,9 +31,7 @@ *******************************************************************************************************/ #include "options.h" -#ifndef SPLIT_REND_WITH_HEAD_ROT -#pragma warning( disable : 4206 ) -#else +#ifdef SPLIT_REND_WITH_HEAD_ROT #include "ivas_PredDecoder.h" #include #include diff --git a/lib_rend/ivas_PredEncoder.c b/lib_rend/ivas_PredEncoder.c index a8351c891a..f8b26426fe 100644 --- a/lib_rend/ivas_PredEncoder.c +++ b/lib_rend/ivas_PredEncoder.c @@ -31,9 +31,7 @@ *******************************************************************************************************/ #include "options.h" -#ifndef SPLIT_REND_WITH_HEAD_ROT -#pragma warning( disable : 4206 ) -#else +#ifdef SPLIT_REND_WITH_HEAD_ROT #include "ivas_PredEncoder.h" #include #include diff --git a/lib_rend/ivas_RMSEnvGrouping.c b/lib_rend/ivas_RMSEnvGrouping.c index f69167c7dd..11b4a71acc 100644 --- a/lib_rend/ivas_RMSEnvGrouping.c +++ b/lib_rend/ivas_RMSEnvGrouping.c @@ -31,9 +31,7 @@ *******************************************************************************************************/ #include "options.h" -#ifndef SPLIT_REND_WITH_HEAD_ROT -#pragma warning( disable : 4206 ) -#else +#ifdef SPLIT_REND_WITH_HEAD_ROT #include "ivas_RMSEnvGrouping.h" /* Double check cost function calculation */ diff --git a/lib_rend/ivas_lcld_tables.c b/lib_rend/ivas_lcld_tables.c index a78341a9f1..ae882a5e1b 100644 --- a/lib_rend/ivas_lcld_tables.c +++ b/lib_rend/ivas_lcld_tables.c @@ -32,10 +32,7 @@ #include "options.h" -#ifndef SPLIT_REND_WITH_HEAD_ROT -//#pragma warning( disable : 4206 ) -typedef float dummy_type; -#else +#ifdef SPLIT_REND_WITH_HEAD_ROT #include "ivas_lcld_tables.h" #include "ivas_prot_rend.h" #include "wmc_auto.h" diff --git a/lib_rend/ivas_lcld_tables.h b/lib_rend/ivas_lcld_tables.h index 49c5f75cb7..4fec652e02 100644 --- a/lib_rend/ivas_lcld_tables.h +++ b/lib_rend/ivas_lcld_tables.h @@ -33,9 +33,7 @@ #define _IVAS_TABLES_H_ #include "options.h" -#ifndef SPLIT_REND_WITH_HEAD_ROT -#pragma warning( disable : 4206 ) -#else +#ifdef SPLIT_REND_WITH_HEAD_ROT #include #include // For NULL diff --git a/lib_rend/ivas_splitRend_lcld_dec.c b/lib_rend/ivas_splitRend_lcld_dec.c index 936f5d2feb..93489d19b8 100644 --- a/lib_rend/ivas_splitRend_lcld_dec.c +++ b/lib_rend/ivas_splitRend_lcld_dec.c @@ -36,9 +36,7 @@ Nations Convention on Contracts on the International Sales of Goods. *******************************************************************************************************/ #include "options.h" -#ifndef SPLIT_REND_WITH_HEAD_ROT -#pragma warning( disable : 4206 ) -#else +#ifdef SPLIT_REND_WITH_HEAD_ROT #include "cnst.h" #include "ivas_cnst.h" #include "ivas_prot_rend.h" diff --git a/lib_rend/ivas_splitRend_lcld_enc.c b/lib_rend/ivas_splitRend_lcld_enc.c index 2e6ba40e15..a0b3e86d98 100644 --- a/lib_rend/ivas_splitRend_lcld_enc.c +++ b/lib_rend/ivas_splitRend_lcld_enc.c @@ -36,9 +36,7 @@ Nations Convention on Contracts on the International Sales of Goods. *******************************************************************************************************/ #include "options.h" -#ifndef SPLIT_REND_WITH_HEAD_ROT -#pragma warning( disable : 4206 ) -#else +#ifdef SPLIT_REND_WITH_HEAD_ROT #include "cnst.h" #include "ivas_cnst.h" #include "ivas_prot_rend.h" diff --git a/lib_rend/ivas_splitRendererPLC.c b/lib_rend/ivas_splitRendererPLC.c index 1edd5588fe..3d5ad64824 100644 --- a/lib_rend/ivas_splitRendererPLC.c +++ b/lib_rend/ivas_splitRendererPLC.c @@ -31,9 +31,7 @@ *******************************************************************************************************/ #include "options.h" -#ifndef SPLIT_REND_WITH_HEAD_ROT -#pragma warning( disable : 4206 ) -#else +#ifdef SPLIT_REND_WITH_HEAD_ROT #include #include #include diff --git a/lib_rend/ivas_splitRendererPost.c b/lib_rend/ivas_splitRendererPost.c index b9ca1f66b5..48d957993f 100644 --- a/lib_rend/ivas_splitRendererPost.c +++ b/lib_rend/ivas_splitRendererPost.c @@ -31,9 +31,7 @@ *******************************************************************************************************/ #include "options.h" -#ifndef SPLIT_REND_WITH_HEAD_ROT -#pragma warning( disable : 4206 ) -#else +#ifdef SPLIT_REND_WITH_HEAD_ROT #include #include #ifdef SPLIT_REND_WITH_HEAD_ROT_DEBUG diff --git a/lib_rend/ivas_splitRendererPre.c b/lib_rend/ivas_splitRendererPre.c index dc586b91d1..ef5b29f0b9 100644 --- a/lib_rend/ivas_splitRendererPre.c +++ b/lib_rend/ivas_splitRendererPre.c @@ -31,9 +31,7 @@ *******************************************************************************************************/ #include "options.h" -#ifndef SPLIT_REND_WITH_HEAD_ROT -#pragma warning( disable : 4206 ) -#else +#ifdef SPLIT_REND_WITH_HEAD_ROT #include #include #ifdef SPLIT_REND_WITH_HEAD_ROT_DEBUG diff --git a/lib_rend/ivas_splitRenderer_utils.c b/lib_rend/ivas_splitRenderer_utils.c index 691e623d81..a6e5720e30 100644 --- a/lib_rend/ivas_splitRenderer_utils.c +++ b/lib_rend/ivas_splitRenderer_utils.c @@ -31,10 +31,7 @@ *******************************************************************************************************/ #include "options.h" -#ifndef SPLIT_REND_WITH_HEAD_ROT -#pragma warning( disable : 4206 ) -#else - +#ifdef SPLIT_REND_WITH_HEAD_ROT #include #include #include "ivas_prot.h" diff --git a/lib_util/split_rend_bfi_file_reader.c b/lib_util/split_rend_bfi_file_reader.c index 159b3c3c84..1eab665267 100644 --- a/lib_util/split_rend_bfi_file_reader.c +++ b/lib_util/split_rend_bfi_file_reader.c @@ -30,8 +30,6 @@ *******************************************************************************************************/ -#pragma warning( disable : 4206 ) - #include "options.h" #ifdef SPLIT_REND_WITH_HEAD_ROT #include "split_rend_bfi_file_reader.h" diff --git a/lib_util/split_render_file_read_write.c b/lib_util/split_render_file_read_write.c index 79039026c8..36902b91ec 100644 --- a/lib_util/split_render_file_read_write.c +++ b/lib_util/split_render_file_read_write.c @@ -31,9 +31,7 @@ *******************************************************************************************************/ #include "options.h" -#ifndef SPLIT_REND_WITH_HEAD_ROT -#pragma warning( disable : 4206 ) -#else +#ifdef SPLIT_REND_WITH_HEAD_ROT #include "split_render_file_read_write.h" #include #include diff --git a/scripts/strip_split_rendering.py b/scripts/strip_split_rendering.py new file mode 100644 index 0000000000..f5a3e27cb1 --- /dev/null +++ b/scripts/strip_split_rendering.py @@ -0,0 +1,96 @@ +#!/usr/bin/env python3 + +# +# (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, +# Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., +# Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, +# Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other +# contributors to this repository. All Rights Reserved. +# +# This software is protected by copyright law and by international treaties. +# The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB, +# Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., +# Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, +# Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other +# contributors to this repository retain full ownership rights in their respective contributions in +# the software. This notice grants no license of any kind, including but not limited to patent +# license, nor is any license granted by implication, estoppel or otherwise. +# +# Contributors are required to enter into the IVAS codec Public Collaboration agreement before making +# contributions. +# +# This software is provided "AS IS", without any express or implied warranties. The software is in the +# development stage. It is intended exclusively for experts who have experience with such software and +# solely for the purpose of inspection. All implied warranties of non-infringement, merchantability +# and fitness for a particular purpose are hereby disclaimed and excluded. +# +# Any dispute, controversy or claim arising under or in relation to providing this software shall be +# submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in +# accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and +# the United Nations Convention on Contracts on the International Sales of Goods. +# + +# remove other split rendering files +sr_files_rend=[ + "lib_rend\\ivas_CQMFDecoder.c" + "lib_rend\\ivas_CQMFDecoder.h", + "lib_rend\\ivas_CQMFDecoder.h", + "lib_rend\\ivas_CQMFEncoder.c", + "lib_rend\\ivas_CQMFEncoder.h", + "lib_rend\\ivas_MSPred.c", + "lib_rend\\ivas_MSPred.h", + "lib_rend\\ivas_NoiseGen.c", + "lib_rend\\ivas_NoiseGen.h", + "lib_rend\\ivas_PerceptualModel.c", + "lib_rend\\ivas_PerceptualModel.h", + "lib_rend\\ivas_PredDecoder.c", + "lib_rend\\ivas_PredDecoder.h", + "lib_rend\\ivas_PredEncoder.c", + "lib_rend\\ivas_PredEncoder.h", + "lib_rend\\ivas_PredTables.h", + "lib_rend\\ivas_RMSEnvGrouping.c", + "lib_rend\\ivas_RMSEnvGrouping.h", + "lib_rend\\ivas_cldfb_codec_bitstream.c", + "lib_rend\\ivas_cldfb_codec_bitstream.h", + "lib_rend\\ivas_lc3plus_common.c", + "lib_rend\\ivas_lc3plus_common.h", + "lib_rend\\ivas_lc3plus_dec.c", + "lib_rend\\ivas_lc3plus_dec.h", + "lib_rend\\ivas_lc3plus_enc.c", + "lib_rend\\ivas_lc3plus_enc.h", + "lib_rend\\ivas_lcld_tables.c", + "lib_rend\\ivas_lcld_tables.h", + "lib_rend\\ivas_splitRend_lcld_dec.c", + "lib_rend\\ivas_splitRend_lcld_enc.c", + "lib_rend\\ivas_splitRendererPLC.c", + "lib_rend\\ivas_splitRendererPost.c", + "lib_rend\\ivas_splitRendererPre.c", + "lib_rend\\ivas_splitRenderer_utils.c" +] + +sr_files_util=[ + "lib_util\\split_rend_bfi_file_reader.c", + "lib_util\\split_rend_bfi_file_reader.h", + "lib_util\\split_render_file_read_write.c", + "lib_util\\split_render_file_read_write.h" +] + +if __name__ == "__main__": + + rendproj = '.\Workspace_msvc\lib_rend.vcxproj' + utilproj = '.\Workspace_msvc\lib_util.vcxproj' + + with open(rendproj,'r') as f: + lines = f.readlines() + with open(rendproj,'w') as f: + for line in lines: + if not any([x in line for x in sr_files_rend]): + f.write(line) + + with open(utilproj,'r') as f: + lines = f.readlines() + with open(utilproj,'w') as f: + for line in lines: + if not any([x in line for x in sr_files_util]): + f.write(line) + \ No newline at end of file -- GitLab From a43db4799663321996eaaabcbbcda878a7aad0bc Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Tue, 15 Aug 2023 07:50:29 +0200 Subject: [PATCH 23/26] Fix in strip_split_rendering.py --- scripts/strip_split_rendering.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/strip_split_rendering.py b/scripts/strip_split_rendering.py index f5a3e27cb1..fd286ced90 100644 --- a/scripts/strip_split_rendering.py +++ b/scripts/strip_split_rendering.py @@ -34,6 +34,7 @@ sr_files_rend=[ "lib_rend\\ivas_CQMFDecoder.c" "lib_rend\\ivas_CQMFDecoder.h", + "lib_rend\\ivas_CQMFDecoder.c", "lib_rend\\ivas_CQMFDecoder.h", "lib_rend\\ivas_CQMFEncoder.c", "lib_rend\\ivas_CQMFEncoder.h", -- GitLab From ad3b6c36c3c5f50e3ea33f3be78fa2aca1592505 Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Tue, 15 Aug 2023 08:01:42 +0200 Subject: [PATCH 24/26] Fix define in lib_rend/ivas_PerceptualModel.c --- lib_rend/ivas_PerceptualModel.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib_rend/ivas_PerceptualModel.c b/lib_rend/ivas_PerceptualModel.c index 6e102cdd12..8a86a0098d 100644 --- a/lib_rend/ivas_PerceptualModel.c +++ b/lib_rend/ivas_PerceptualModel.c @@ -31,6 +31,7 @@ *******************************************************************************************************/ #include "options.h" +#ifdef SPLIT_REND_WITH_HEAD_ROT #include "ivas_PerceptualModel.h" #include "prot.h" #include "ivas_prot_rend.h" -- GitLab From fb8cdd62ce002defff66486fa98c6571daafffc0 Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Tue, 15 Aug 2023 08:08:20 +0200 Subject: [PATCH 25/26] Small fix for calling strip_split_rendering.py in Windows build job --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fce3bd3d67..35216a43d1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -314,7 +314,7 @@ build-codec-windows-msbuild: script: - *print-common-info-windows - $winoutdata = $null - - .\scripts\strip_split_rendering.py + - py .\scripts\strip_split_rendering.py - MSBuild.exe .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug | tee -variable winoutdata - $winoutdata | Out-File $BUILD_OUTPUT -Encoding Utf8 - ("& python ci/check_for_warnings.py '$BUILD_OUTPUT'") | Invoke-Expression -- GitLab From 91d70997456037dbd3910f76ea294267772accfe Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Tue, 15 Aug 2023 08:49:09 +0200 Subject: [PATCH 26/26] Clang format --- lib_rend/ivas_CQMFDecoder.h | 18 +++++++++--------- lib_rend/ivas_CQMFEncoder.h | 30 +++++++++++++++--------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/lib_rend/ivas_CQMFDecoder.h b/lib_rend/ivas_CQMFDecoder.h index b6c59a1db4..753bc579da 100644 --- a/lib_rend/ivas_CQMFDecoder.h +++ b/lib_rend/ivas_CQMFDecoder.h @@ -46,19 +46,19 @@ extern "C" #define DECODER_ERROR_CHAN_NOT_SUPPORTED ( -2 ) #define DECODER_ERROR_UNKNOWN ( -100 ) -typedef struct CQMF_DECODER CQMFDecoder; + typedef struct CQMF_DECODER CQMFDecoder; -CQMFDecoder *CreateCQMFDecoder( const int32_t iSampleRate, - const int32_t iChannels ); + CQMFDecoder *CreateCQMFDecoder( const int32_t iSampleRate, + const int32_t iChannels ); -void DeleteCQMFDecoder( CQMFDecoder *psCQMFDecoder ); + void DeleteCQMFDecoder( CQMFDecoder *psCQMFDecoder ); -int32_t CQMFDecoderGetError( CQMFDecoder *psCQMFDecoder ); + int32_t CQMFDecoderGetError( CQMFDecoder *psCQMFDecoder ); -int32_t DecodeFrame( CQMFDecoder *psCQMFDecoder, - ivas_split_rend_bits_t *pBits, - float ***pppfCQMFReal, - float ***pppfCQMFImag ); + int32_t DecodeFrame( CQMFDecoder *psCQMFDecoder, + ivas_split_rend_bits_t *pBits, + float ***pppfCQMFReal, + float ***pppfCQMFImag ); #endif #ifdef __cplusplus } diff --git a/lib_rend/ivas_CQMFEncoder.h b/lib_rend/ivas_CQMFEncoder.h index ad04909ddd..c4ac51ed8e 100644 --- a/lib_rend/ivas_CQMFEncoder.h +++ b/lib_rend/ivas_CQMFEncoder.h @@ -46,24 +46,24 @@ extern "C" #define ENCODER_ERROR_CHAN_NOT_SUPPORTED ( -2 ) #define ENCODER_ERROR_UNKNOWN ( -100 ) -typedef struct CQMF_ENCODER CQMFEncoder; + typedef struct CQMF_ENCODER CQMFEncoder; -CQMFEncoder *CreateCQMFEncoder( const int32_t iSampleRate, - const int32_t iChannels, - const int32_t iTargetBitRate, - const int32_t iAllowSidePred ); + CQMFEncoder *CreateCQMFEncoder( const int32_t iSampleRate, + const int32_t iChannels, + const int32_t iTargetBitRate, + const int32_t iAllowSidePred ); -void DeleteCQMFEncoder( CQMFEncoder *psCQMFEncoder ); + void DeleteCQMFEncoder( CQMFEncoder *psCQMFEncoder ); -int32_t CQMFEncoderGetError( CQMFEncoder *psCQMFEncoder ); -int32_t EncodeFrame( - CQMFEncoder *psCQMFEncoder, - float ***pppfCQMFReal, - float ***pppfCQMFImag, - int32_t *piNumiBites, - const int32_t available_bits, - ivas_split_rend_bits_t *pBits ); -int32_t GetNumGroups( CQMFEncoder *psCQMFEncoder ); + int32_t CQMFEncoderGetError( CQMFEncoder *psCQMFEncoder ); + int32_t EncodeFrame( + CQMFEncoder *psCQMFEncoder, + float ***pppfCQMFReal, + float ***pppfCQMFImag, + int32_t *piNumiBites, + const int32_t available_bits, + ivas_split_rend_bits_t *pBits ); + int32_t GetNumGroups( CQMFEncoder *psCQMFEncoder ); #endif #ifdef __cplusplus } -- GitLab