From 91089394a7175ac89e70784b57ab4e69f980a7fa Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Thu, 9 Nov 2023 08:48:49 +0100 Subject: [PATCH 1/7] [cleanup] accept FIX_865_MOVE_TD_DECORR --- lib_com/ivas_prot.h | 38 -------------------------------------- lib_com/ivas_stat_com.h | 30 ------------------------------ lib_com/options.h | 1 - lib_rend/ivas_prot_rend.h | 2 -- lib_rend/ivas_stat_rend.h | 2 -- lib_rend/ivas_td_decorr.c | 2 -- 6 files changed, 75 deletions(-) diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 1331712453..bfeab94da8 100755 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -3725,17 +3725,6 @@ void ivas_dirac_dec_render_sf( float *pppQMfFrame_ts_im[IVAS_MAX_FB_MIXER_IN_CH][CLDFB_NO_COL_MAX] ); -#ifndef FIX_865_MOVE_TD_DECORR -ivas_error ivas_td_decorr_reconfig_dec( - const IVAS_FORMAT ivas_format, /* i : IVAS format */ - const int32_t ivas_total_brate, /* i : total IVAS bitrate */ - const int16_t nchan_transport, /* i : number of transport channels */ - const int32_t output_Fs, /* i : output sampling rate */ - ivas_td_decorr_state_t **hTdDecorr, /* i/o: TD decorrelator handle */ - uint16_t *useTdDecorr /* i/o: TD decorrelator flag */ -); - -#endif void computeDiffuseness_mdft( float **buffer_intensity[DIRAC_NUM_DIMS], const float *buffer_energy, @@ -4668,33 +4657,6 @@ void ivas_td_decorr_get_ducking_gains( const int16_t tdet_flag ); -#ifndef FIX_865_MOVE_TD_DECORR -ivas_error ivas_td_decorr_dec_open( - ivas_td_decorr_state_t **hTdDecorr, /* i/o: TD decorrelator handle */ - const int32_t output_Fs, /* i : output sampling rate */ - const int16_t nchan_internal, /* i : number of internal channels */ - const int16_t ducking_flag /* i : ducking flag */ -); - -void ivas_td_decorr_dec_close( - ivas_td_decorr_state_t **hTdDecorr /* i/o: TD decorrelator handle */ -); - -void ivas_td_decorr_process( - ivas_td_decorr_state_t *hTdDecorr, /* i/o: SPAR Covar. decoder handle */ - float *pcm_in[], /* i : input audio channels */ - float **ppOut_pcm, /* o : output audio channels */ - const int16_t output_frame /* i : output frame length */ -); - -void ivas_td_decorr_APD_iir_filter( - ivas_td_decorr_APD_filt_state_t *filter_state, - float *pIn_out, - const int16_t num_APD_sections, - const int16_t length -); - -#endif #define IVAS_CMULT_FLOAT( in1_re, in1_im, in2_re, in2_im, out1_re, out1_im ) \ out1_re = ( in1_re * in2_re ) - ( in1_im * in2_im ); MAC(1); MULT(1); \ out1_im = ( in1_re * in2_im ) + ( in2_re * in1_im ); MAC(1); MULT(1); diff --git a/lib_com/ivas_stat_com.h b/lib_com/ivas_stat_com.h index 1b598d0996..c148b1bb98 100644 --- a/lib_com/ivas_stat_com.h +++ b/lib_com/ivas_stat_com.h @@ -672,36 +672,6 @@ typedef struct ivas_trans_det_state_t } ivas_trans_det_state_t; -#ifndef FIX_865_MOVE_TD_DECORR - -/*----------------------------------------------------------------------------------* - * Time domain decorrelator - *----------------------------------------------------------------------------------*/ - -typedef struct ivas_td_decorr_APD_filt_state_t -{ - int16_t order[IVAS_MAX_DECORR_APD_SECTIONS]; - int16_t idx[IVAS_MAX_DECORR_APD_SECTIONS]; - float coeffs[IVAS_MAX_DECORR_APD_SECTIONS]; - float *state[IVAS_MAX_DECORR_APD_SECTIONS]; - -} ivas_td_decorr_APD_filt_state_t; - -typedef struct ivas_td_decorr_state_t -{ - ivas_trans_det_state_t *pTrans_det; - float *look_ahead_buf; - ivas_td_decorr_APD_filt_state_t APD_filt_state[IVAS_MAX_DECORR_CHS]; - - int16_t num_apd_outputs; - int16_t num_apd_sections; - int16_t ducking_flag; - - int16_t offset; - -} ivas_td_decorr_state_t; - -#endif /*----------------------------------------------------------------------------------* * Filter Bank (FB) structures diff --git a/lib_com/options.h b/lib_com/options.h index 71bdcdb793..f25ea582d2 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -150,7 +150,6 @@ /*#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 FIX_865_MOVE_TD_DECORR /* VA: issue 865: Move ivas_td_decorr.c from lib_com to lib_rend */ #define FIX_888_INTERFACE_UNIFICATION /* Nokia: issue #888: fix mismatch in 2D array size */ #define FIX_889_MASA_FILE_WRITER_OPEN /* Nokia: issue #889: mismatch in function definition and use */ #define FIX_890_ARRAY_SIZE /* Nokia: issue #890: mismatch in 2D array size declaration and use */ diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index 0a63d12e4c..4a2947431d 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -109,7 +109,6 @@ void limiter_process( int16_t *strong_saturation_cnt /* i/o: counter of strong saturations (can be NULL) */ ); -#ifdef FIX_865_MOVE_TD_DECORR /*----------------------------------------------------------------------------------* * TD decorr. function prototypes *----------------------------------------------------------------------------------*/ @@ -148,7 +147,6 @@ void ivas_td_decorr_APD_iir_filter( const int16_t output_frame /* i : output frame length */ ); -#endif /*----------------------------------------------------------------------------------* * Amplitude Panning EFAP prototypes diff --git a/lib_rend/ivas_stat_rend.h b/lib_rend/ivas_stat_rend.h index ee9ee3f906..3405b85279 100644 --- a/lib_rend/ivas_stat_rend.h +++ b/lib_rend/ivas_stat_rend.h @@ -73,7 +73,6 @@ typedef struct ivas_output_setup_structure } IVAS_OUTPUT_SETUP, *IVAS_OUTPUT_SETUP_HANDLE; -#ifdef FIX_865_MOVE_TD_DECORR /*----------------------------------------------------------------------------------* * Time domain decorrelator structures *----------------------------------------------------------------------------------*/ @@ -100,7 +99,6 @@ typedef struct ivas_td_decorr_state_t int16_t offset; } ivas_td_decorr_state_t; -#endif /*----------------------------------------------------------------------------------* diff --git a/lib_rend/ivas_td_decorr.c b/lib_rend/ivas_td_decorr.c index 680eedb7a4..beff2ae367 100644 --- a/lib_rend/ivas_td_decorr.c +++ b/lib_rend/ivas_td_decorr.c @@ -34,9 +34,7 @@ #include "options.h" #include "prot.h" #include "ivas_prot.h" -#ifdef FIX_865_MOVE_TD_DECORR #include "ivas_prot_rend.h" -#endif #ifdef DEBUGGING #include "debug.h" #endif -- GitLab From 874f9560999fe97111f66dc8fd16f621ea3c5a88 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Thu, 9 Nov 2023 08:49:32 +0100 Subject: [PATCH 2/7] [cleanup] accept FIX_888_INTERFACE_UNIFICATION --- lib_com/ivas_prot.h | 5 ----- lib_com/options.h | 1 - lib_enc/ivas_dirac_enc.c | 5 ----- lib_enc/ivas_mcmasa_enc.c | 9 --------- 4 files changed, 20 deletions(-) diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index bfeab94da8..c7fb3371a4 100755 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -5494,13 +5494,8 @@ void lls_interp_n( void computeReferencePower_enc( const int16_t *band_grouping, /* i : Band grouping for estimation */ -#ifdef FIX_888_INTERFACE_UNIFICATION float Cldfb_RealBuffer[][DIRAC_NO_FB_BANDS_MAX], /* i : Real part of input signal */ float Cldfb_ImagBuffer[][DIRAC_NO_FB_BANDS_MAX], /* i : Imag part of input signal */ -#else - float Cldfb_RealBuffer[DIRAC_MAX_ANA_CHANS][DIRAC_NO_FB_BANDS_MAX], /* i : Real part of input signal */ - float Cldfb_ImagBuffer[DIRAC_MAX_ANA_CHANS][DIRAC_NO_FB_BANDS_MAX], /* i : Imag part of input signal */ -#endif float *reference_power, /* o : Estimated power */ const int16_t enc_param_start_band, /* i : first band to process */ const int16_t num_freq_bands, /* i : Number of frequency bands */ diff --git a/lib_com/options.h b/lib_com/options.h index f25ea582d2..9845f82547 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -150,7 +150,6 @@ /*#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 FIX_888_INTERFACE_UNIFICATION /* Nokia: issue #888: fix mismatch in 2D array size */ #define FIX_889_MASA_FILE_WRITER_OPEN /* Nokia: issue #889: mismatch in function definition and use */ #define FIX_890_ARRAY_SIZE /* Nokia: issue #890: mismatch in 2D array size declaration and use */ #define BE_FIX_887_GCC_WARNING_ARRAY_SIZE /* VoiceAge: Issue 887: change array size definition to avoid warning with gcc 11.4.0 */ diff --git a/lib_enc/ivas_dirac_enc.c b/lib_enc/ivas_dirac_enc.c index 0d05fc7fe6..31d96e7def 100644 --- a/lib_enc/ivas_dirac_enc.c +++ b/lib_enc/ivas_dirac_enc.c @@ -531,13 +531,8 @@ static int16_t ivas_dirac_get_mono_flag( void computeReferencePower_enc( const int16_t *band_grouping, /* i : Band grouping for estimation */ -#ifdef FIX_888_INTERFACE_UNIFICATION float Cldfb_RealBuffer[][DIRAC_NO_FB_BANDS_MAX], /* i : Real part of input signal */ float Cldfb_ImagBuffer[][DIRAC_NO_FB_BANDS_MAX], /* i : Imag part of input signal */ -#else - float Cldfb_RealBuffer[DIRAC_MAX_ANA_CHANS][DIRAC_NO_FB_BANDS_MAX], /* i : Real part of input signal */ - float Cldfb_ImagBuffer[DIRAC_MAX_ANA_CHANS][DIRAC_NO_FB_BANDS_MAX], /* i : Imag part of input signal */ -#endif float *reference_power, /* o : Estimated power */ const int16_t enc_param_start_band, /* i : first band to process */ const int16_t num_freq_bands, /* i : Number of frequency bands */ diff --git a/lib_enc/ivas_mcmasa_enc.c b/lib_enc/ivas_mcmasa_enc.c index 0f9317a3e2..32833d37b7 100644 --- a/lib_enc/ivas_mcmasa_enc.c +++ b/lib_enc/ivas_mcmasa_enc.c @@ -69,11 +69,7 @@ static void ivas_mcmasa_dmx( MCMASA_ENC_HANDLE hMcMasa, float *data_f[], const i static void compute_cov_mtx( float sr[MCMASA_MAX_ANA_CHANS][DIRAC_NO_FB_BANDS_MAX], float si[MCMASA_MAX_ANA_CHANS][DIRAC_NO_FB_BANDS_MAX], const int16_t freq, const int16_t N, CovarianceMatrix *COVls ); -#ifdef FIX_888_INTERFACE_UNIFICATION static void computeIntensityVector_enc( const int16_t *band_grouping, float Cldfb_RealBuffer[FOA_CHANNELS][DIRAC_NO_FB_BANDS_MAX], float Cldfb_ImagBuffer[FOA_CHANNELS][DIRAC_NO_FB_BANDS_MAX], const int16_t enc_param_start_band, const int16_t num_frequency_bands, float intensity_real[DIRAC_NUM_DIMS][MASA_FREQUENCY_BANDS] ); -#else -static void computeIntensityVector_enc( const int16_t *band_grouping, float Cldfb_RealBuffer[DIRAC_MAX_ANA_CHANS][DIRAC_NO_FB_BANDS_MAX], float Cldfb_ImagBuffer[DIRAC_MAX_ANA_CHANS][DIRAC_NO_FB_BANDS_MAX], const int16_t enc_param_start_band, const int16_t num_frequency_bands, float intensity_real[DIRAC_NUM_DIMS][MASA_FREQUENCY_BANDS] ); -#endif static void computeVerticalDiffuseness( float **buffer_intensity, const float *buffer_energy, const int16_t averaging_length, const int16_t num_freq_bands, float *diffuseness ); @@ -1463,13 +1459,8 @@ static void compute_cov_mtx( static void computeIntensityVector_enc( const int16_t *band_grouping, -#ifdef FIX_888_INTERFACE_UNIFICATION float Cldfb_RealBuffer[FOA_CHANNELS][DIRAC_NO_FB_BANDS_MAX], float Cldfb_ImagBuffer[FOA_CHANNELS][DIRAC_NO_FB_BANDS_MAX], -#else - float Cldfb_RealBuffer[DIRAC_MAX_ANA_CHANS][DIRAC_NO_FB_BANDS_MAX], - float Cldfb_ImagBuffer[DIRAC_MAX_ANA_CHANS][DIRAC_NO_FB_BANDS_MAX], -#endif const int16_t enc_param_start_band, /* i : first band to process */ const int16_t num_frequency_bands, float intensity_real[DIRAC_NUM_DIMS][MASA_FREQUENCY_BANDS] ) -- GitLab From c405146b8959482688cc12cc9887b6ca2b9e8651 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Thu, 9 Nov 2023 08:50:11 +0100 Subject: [PATCH 3/7] [cleanup] accept FIX_889_MASA_FILE_WRITER_OPEN --- lib_com/options.h | 1 - lib_util/masa_file_writer.c | 18 ------------------ 2 files changed, 19 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 9845f82547..66f942d205 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -150,7 +150,6 @@ /*#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 FIX_889_MASA_FILE_WRITER_OPEN /* Nokia: issue #889: mismatch in function definition and use */ #define FIX_890_ARRAY_SIZE /* Nokia: issue #890: mismatch in 2D array size declaration and use */ #define BE_FIX_887_GCC_WARNING_ARRAY_SIZE /* VoiceAge: Issue 887: change array size definition to avoid warning with gcc 11.4.0 */ #define FIX_247_EXTERNAL_RENDERER_COMMAND_LINE /* VA: issue 247: harmonize command-line options names of external renderer with the decoder */ diff --git a/lib_util/masa_file_writer.c b/lib_util/masa_file_writer.c index 0a598f4ea7..2a88414fbf 100644 --- a/lib_util/masa_file_writer.c +++ b/lib_util/masa_file_writer.c @@ -67,18 +67,13 @@ struct MasaFileWriter static void getExtMasaMetadataFileName( const char *outputWavFilename, /* i : name of the output audio file */ -#ifdef FIX_889_MASA_FILE_WRITER_OPEN char *metadata_filename, /* o : name of the output MASA metadata file */ int32_t max_name_len /* i : size of metadata_filename in chars */ -#else - char metadata_filename[IVAS_MAX_NUM_OBJECTS][FILENAME_MAX - 12] /* o : name of the output masa metadata file */ -#endif ) { char ext_meta[5]; /* sizeof( ext_meta ) accounts for terminating NULL, don't subtract extra 1 */ -#ifdef FIX_889_MASA_FILE_WRITER_OPEN const int32_t maxNameLenWithoutExt = max_name_len - (int32_t) sizeof( ext_meta ); strncpy( metadata_filename, outputWavFilename, maxNameLenWithoutExt ); snprintf( ext_meta, sizeof( ext_meta ), ".met" ); @@ -86,15 +81,6 @@ static void getExtMasaMetadataFileName( /* strlen( metadata_filename[0] ) doesn't account for terminating NULL, subtract extra 1 */ const int32_t maxNumCharactersToAppend = max_name_len - (int32_t) strlen( metadata_filename ) - 1; strncat( metadata_filename, ext_meta, maxNumCharactersToAppend ); -#else - const int32_t maxNameLenWithoutExt = sizeof( metadata_filename[0] ) - sizeof( ext_meta ); - strncpy( metadata_filename[0], outputWavFilename, maxNameLenWithoutExt ); - snprintf( ext_meta, sizeof( ext_meta ), ".met" ); - - /* strlen( metadata_filename[0] ) doesn't account for terminating NULL, subtract extra 1 */ - const int32_t maxNumCharactersToAppend = (int32_t) ( sizeof( metadata_filename[0] ) - strlen( metadata_filename[0] ) - 1 ); - strncat( metadata_filename[0], ext_meta, maxNumCharactersToAppend ); -#endif return; } @@ -179,11 +165,7 @@ ivas_error MasaFileWriter_open( return IVAS_ERR_FAILED_FILE_OPEN; } -#ifdef FIX_889_MASA_FILE_WRITER_OPEN getExtMasaMetadataFileName( outputWavFilename, filePath, FILENAME_MAX - 12 ); -#else - getExtMasaMetadataFileName( outputWavFilename, &filePath ); -#endif file = fopen( filePath, "wb" ); -- GitLab From 7abcc8a40f65486ac15c7018a26846b33ce1a1f7 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Thu, 9 Nov 2023 08:50:46 +0100 Subject: [PATCH 4/7] [cleanup] accept FIX_890_ARRAY_SIZE --- lib_com/options.h | 1 - lib_rend/lib_rend.c | 8 -------- 2 files changed, 9 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 66f942d205..00438fd62a 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -150,7 +150,6 @@ /*#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 FIX_890_ARRAY_SIZE /* Nokia: issue #890: mismatch in 2D array size declaration and use */ #define BE_FIX_887_GCC_WARNING_ARRAY_SIZE /* VoiceAge: Issue 887: change array size definition to avoid warning with gcc 11.4.0 */ #define FIX_247_EXTERNAL_RENDERER_COMMAND_LINE /* VA: issue 247: harmonize command-line options names of external renderer with the decoder */ #define FIX_643_PCA_OPTION /* VA: issue 643: rename PCA bypass command-line option */ diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index c7e0461ddd..fc6c8bcaae 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -456,11 +456,7 @@ static void accumulateCLDFBArrayToBuffer( static void copyBufferTo2dArray( const IVAS_REND_AudioBuffer buffer, -#ifdef FIX_890_ARRAY_SIZE float array[][L_FRAME48k] ) -#else - float array[MAX_OUTPUT_CHANNELS][L_FRAME48k] ) -#endif { uint32_t smplIdx; uint32_t chnlIdx; @@ -483,11 +479,7 @@ static void copyBufferTo2dArray( } static void accumulate2dArrayToBuffer( -#ifdef FIX_890_ARRAY_SIZE float array[][L_FRAME48k], -#else - float array[MAX_OUTPUT_CHANNELS][L_FRAME48k], -#endif #ifdef SPLIT_REND_WITH_HEAD_ROT const #endif -- GitLab From 34e5db3940c77461b1ea5fd948f601b6b8b74910 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Thu, 9 Nov 2023 08:51:21 +0100 Subject: [PATCH 5/7] [cleanup] accept BE_FIX_887_GCC_WARNING_ARRAY_SIZE --- lib_com/ivas_prot.h | 11 ----------- lib_com/options.h | 1 - lib_com/prot.h | 9 --------- lib_enc/ivas_core_pre_proc_front.c | 7 ------- lib_enc/ivas_ism_enc.c | 4 ---- lib_enc/long_enr.c | 9 --------- 6 files changed, 41 deletions(-) diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index c7fb3371a4..de6579f85c 100755 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -189,17 +189,10 @@ ivas_error pre_proc_front_ivas( const float tdm_lsp_new_PCh[M], /* i : unq. LSPs of primary channel */ const float currFlatness, /* i : flatness parameter */ const int16_t tdm_ratio_idx, /* i : Current Ratio_L index */ -#ifdef BE_FIX_887_GCC_WARNING_ARRAY_SIZE float fr_bands_LR[][2 * NB_BANDS], /* i : energy in frequency bands */ const float Etot_LR[], /* i : total energy Left & Right channel */ float lf_E_LR[][2 * VOIC_BINS], /* i : per bin spectrum energy in lf, LR channels */ const int16_t localVAD_HE_SAD_LR[], /* i : HE-SAD flag without hangover, LR channels */ -#else - float fr_bands_LR[CPE_CHANNELS][2 * NB_BANDS], /* i : energy in frequency bands */ - const float Etot_LR[CPE_CHANNELS], /* i : total energy Left & Right channel */ - float lf_E_LR[CPE_CHANNELS][2 * VOIC_BINS], /* i : per bin spectrum energy in lf, LR channels */ - const int16_t localVAD_HE_SAD_LR[CPE_CHANNELS], /* i : HE-SAD flag without hangover, LR channels */ -#endif float band_energies_LR[2 * NB_BANDS], /* o : energy in critical bands without minimum noise floor E_MIN */ const int16_t flag_16k_smc, /* i : flag to indicate if the OL SMC is run at 16 kHz */ const int16_t front_vad_flag, /* i : front-VAD flag to overwrite VAD decision */ @@ -997,11 +990,7 @@ ivas_error ivas_ism_metadata_dec_create( ivas_error ivas_ism_enc( Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ -#ifdef BE_FIX_887_GCC_WARNING_ARRAY_SIZE float *data[], /* i : input signal [channels][samples] */ -#else - float *data[MAX_NUM_OBJECTS], /* i : input signal */ -#endif const int16_t input_frame, /* i : input frame length per channel */ int16_t *nb_bits_metadata, /* i : number of metadata bits */ const int16_t flag_omasa_ener_brate /* i : less bitrate for objects in OMASA flag */ diff --git a/lib_com/options.h b/lib_com/options.h index 00438fd62a..62236bf835 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -150,7 +150,6 @@ /*#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 BE_FIX_887_GCC_WARNING_ARRAY_SIZE /* VoiceAge: Issue 887: change array size definition to avoid warning with gcc 11.4.0 */ #define FIX_247_EXTERNAL_RENDERER_COMMAND_LINE /* VA: issue 247: harmonize command-line options names of external renderer with the decoder */ #define FIX_643_PCA_OPTION /* VA: issue 643: rename PCA bypass command-line option */ diff --git a/lib_com/prot.h b/lib_com/prot.h index 8058f4834d..43cab0c979 100644 --- a/lib_com/prot.h +++ b/lib_com/prot.h @@ -3249,19 +3249,10 @@ void long_enr( const float Etot, /* i : total channel energy */ const int16_t localVAD_HE_SAD, /* i : HE-SAD flag without hangover */ const int16_t high_lpn_flag, /* i : sp/mus LPN flag */ -#ifdef BE_FIX_887_GCC_WARNING_ARRAY_SIZE FRONT_VAD_ENC_HANDLE hFrontVad[], /* i/o: front-VAD handles */ -#else - FRONT_VAD_ENC_HANDLE hFrontVad[CPE_CHANNELS], /* i/o: front-VAD handles */ -#endif const int16_t n_chan, /* i : number of channels */ -#ifdef BE_FIX_887_GCC_WARNING_ARRAY_SIZE const int16_t localVAD_HE_SAD_LR[], /* i : HE-SAD flag without hangover LR channels */ const float Etot_LR[] /* i : total channel energy LR channels */ -#else - const int16_t localVAD_HE_SAD_LR[CPE_CHANNELS], /* i : HE-SAD flag without hangover LR channels */ - const float Etot_LR[CPE_CHANNELS] /* i : total channel energy LR channels */ -#endif ); void noise_est_pre( diff --git a/lib_enc/ivas_core_pre_proc_front.c b/lib_enc/ivas_core_pre_proc_front.c index f49fec3cea..5f27428607 100644 --- a/lib_enc/ivas_core_pre_proc_front.c +++ b/lib_enc/ivas_core_pre_proc_front.c @@ -98,17 +98,10 @@ ivas_error pre_proc_front_ivas( const float tdm_lsp_new_PCh[M], /* i : unq. LSPs of primary channel */ const float currFlatness, /* i : flatness parameter */ const int16_t tdm_ratio_idx, /* i : Current Ratio_L index */ -#ifdef BE_FIX_887_GCC_WARNING_ARRAY_SIZE float fr_bands_LR[][2 * NB_BANDS], /* i : energy in frequency bands */ const float Etot_LR[], /* i : total energy Left & Right channel */ float lf_E_LR[][2 * VOIC_BINS], /* i : per bin spectrum energy in lf, LR channels */ const int16_t localVAD_HE_SAD_LR[], /* i : HE-SAD flag without hangover, LR channels */ -#else - float fr_bands_LR[CPE_CHANNELS][2 * NB_BANDS], /* i : energy in frequency bands */ - const float Etot_LR[CPE_CHANNELS], /* i : total energy Left & Right channel */ - float lf_E_LR[CPE_CHANNELS][2 * VOIC_BINS], /* i : per bin spectrum energy in lf, LR channels */ - const int16_t localVAD_HE_SAD_LR[CPE_CHANNELS], /* i : HE-SAD flag without hangover, LR channels */ -#endif float band_energies_LR[2 * NB_BANDS], /* o : energy in critical bands without minimum noise floor E_MIN */ const int16_t flag_16k_smc, /* i : flag to indicate if the OL SMC is run at 16 kHz */ const int16_t front_vad_flag, /* i : front-VAD flag to overwrite VAD decision */ diff --git a/lib_enc/ivas_ism_enc.c b/lib_enc/ivas_ism_enc.c index fef013604a..f96ac0cd6d 100644 --- a/lib_enc/ivas_ism_enc.c +++ b/lib_enc/ivas_ism_enc.c @@ -50,11 +50,7 @@ ivas_error ivas_ism_enc( Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ -#ifdef BE_FIX_887_GCC_WARNING_ARRAY_SIZE float *data[], /* i : input signal [channels][samples] */ -#else - float *data[MAX_NUM_OBJECTS], /* i : input signal */ -#endif const int16_t input_frame, /* i : input frame length per channel */ int16_t *nb_bits_metadata, /* i : number of metadata bits */ const int16_t flag_omasa_ener_brate /* i : less bitrate for objects in OMASA flag */ diff --git a/lib_enc/long_enr.c b/lib_enc/long_enr.c index a23427922c..4a817085f6 100644 --- a/lib_enc/long_enr.c +++ b/lib_enc/long_enr.c @@ -54,19 +54,10 @@ void long_enr( const float Etot, /* i : total channel energy */ const int16_t localVAD_HE_SAD, /* i : HE-SAD flag without hangover */ const int16_t high_lpn_flag, /* i : sp/mus LPN flag */ -#ifdef BE_FIX_887_GCC_WARNING_ARRAY_SIZE FRONT_VAD_ENC_HANDLE hFrontVad[], /* i/o: front-VAD handles */ -#else - FRONT_VAD_ENC_HANDLE hFrontVad[CPE_CHANNELS], /* i/o: front-VAD handles */ -#endif const int16_t n_chan, /* i : number of channels */ -#ifdef BE_FIX_887_GCC_WARNING_ARRAY_SIZE const int16_t localVAD_HE_SAD_LR[], /* i : HE-SAD flag without hangover LR channels */ const float Etot_LR[] /* i : total channel energy LR channels */ -#else - const int16_t localVAD_HE_SAD_LR[CPE_CHANNELS], /* i : HE-SAD flag without hangover LR channels */ - const float Etot_LR[CPE_CHANNELS] /* i : total channel energy LR channels */ -#endif ) { float tmp; -- GitLab From 86a8ccd6da082e122c6bc6c00f320e9a9bbe8334 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Thu, 9 Nov 2023 08:52:01 +0100 Subject: [PATCH 6/7] [cleanup] accept FIX_247_EXTERNAL_RENDERER_COMMAND_LINE --- apps/renderer.c | 20 -------------------- lib_com/options.h | 1 - 2 files changed, 21 deletions(-) diff --git a/apps/renderer.c b/apps/renderer.c index 1c6cd62dcc..c1ac858c6d 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -277,11 +277,7 @@ static const CmdLnParser_Option cliOptions[] = { { .id = CmdLnOptionId_trajFile, .match = "trajectory_file", -#ifdef FIX_247_EXTERNAL_RENDERER_COMMAND_LINE .matchShort = "T", -#else - .matchShort = "tf", -#endif .description = "Head rotation trajectory file for simulation of head tracking (only for binaural outputs)", }, #ifdef SPLIT_REND_WITH_HEAD_ROT @@ -312,25 +308,14 @@ static const CmdLnParser_Option cliOptions[] = { }, { .id = CmdLnOptionId_renderConfigFile, -#ifdef FIX_247_EXTERNAL_RENDERER_COMMAND_LINE .match = "render_config_parameters", .matchShort = "render_config", .description = "Binaural renderer configuration parameters in file (only for binaural outputs)", -#else - .match = "render_config", - .matchShort = "rc", - .description = "Binaural renderer configuration file (only for binaural outputs)", -#endif }, { .id = CmdLnOptionId_nonDiegeticPan, -#ifdef FIX_247_EXTERNAL_RENDERER_COMMAND_LINE .match = "non_diegetic_panning", .matchShort = "non_diegetic_pan", -#else - .match = "non_diegetic_pan", - .matchShort = "ndp", -#endif .description = "Panning mono non diegetic sound to stereo -90<= pan <= 90\nleft or l or 90->left, right or r or -90->right, center or c or 0 ->middle\n", }, { @@ -351,13 +336,8 @@ static const CmdLnParser_Option cliOptions[] = { .description = "LFE panning matrix. File (CSV table) containing a matrix of dimensions [ num_input_lfe x num_output_channels ] with elements specifying linear routing gain (like --gain, -g). \nIf specified, overrides the output LFE position option and the default behavior which attempts to map input to output LFE channel(s)" }, { .id = CmdLnOptionId_noDelayCmp, -#ifdef FIX_247_EXTERNAL_RENDERER_COMMAND_LINE .match = "no_delay_comparison", .matchShort = "no_delay_cmp", -#else - .match = "no_delay_cmp", - .matchShort = "ndc", -#endif .description = "[flag] Turn off delay compensation", }, { diff --git a/lib_com/options.h b/lib_com/options.h index 62236bf835..d738ad025f 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -150,7 +150,6 @@ /*#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 FIX_247_EXTERNAL_RENDERER_COMMAND_LINE /* VA: issue 247: harmonize command-line options names of external renderer with the decoder */ #define FIX_643_PCA_OPTION /* VA: issue 643: rename PCA bypass command-line option */ /* #################### End BE switches ################################## */ -- GitLab From 22efbf9309a41fa6a6df4617b91854376aaa5a39 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Thu, 9 Nov 2023 08:54:11 +0100 Subject: [PATCH 7/7] formatting --- lib_com/ivas_stat_com.h | 1 - lib_com/prot.h | 12 ++++++------ lib_enc/ivas_core_pre_proc_front.c | 22 +++++++++++----------- lib_enc/ivas_dirac_enc.c | 18 +++++++++--------- lib_enc/ivas_ism_enc.c | 4 ++-- lib_enc/long_enr.c | 12 ++++++------ lib_util/masa_file_writer.c | 4 ++-- 7 files changed, 36 insertions(+), 37 deletions(-) diff --git a/lib_com/ivas_stat_com.h b/lib_com/ivas_stat_com.h index c148b1bb98..566abcb443 100644 --- a/lib_com/ivas_stat_com.h +++ b/lib_com/ivas_stat_com.h @@ -672,7 +672,6 @@ typedef struct ivas_trans_det_state_t } ivas_trans_det_state_t; - /*----------------------------------------------------------------------------------* * Filter Bank (FB) structures *----------------------------------------------------------------------------------*/ diff --git a/lib_com/prot.h b/lib_com/prot.h index 43cab0c979..c795d97f2e 100644 --- a/lib_com/prot.h +++ b/lib_com/prot.h @@ -3245,12 +3245,12 @@ void speech_music_clas_init( ); void long_enr( - Encoder_State *st, /* i/o: encoder state structure */ - const float Etot, /* i : total channel energy */ - const int16_t localVAD_HE_SAD, /* i : HE-SAD flag without hangover */ - const int16_t high_lpn_flag, /* i : sp/mus LPN flag */ - FRONT_VAD_ENC_HANDLE hFrontVad[], /* i/o: front-VAD handles */ - const int16_t n_chan, /* i : number of channels */ + Encoder_State *st, /* i/o: encoder state structure */ + const float Etot, /* i : total channel energy */ + const int16_t localVAD_HE_SAD, /* i : HE-SAD flag without hangover */ + const int16_t high_lpn_flag, /* i : sp/mus LPN flag */ + FRONT_VAD_ENC_HANDLE hFrontVad[], /* i/o: front-VAD handles */ + const int16_t n_chan, /* i : number of channels */ const int16_t localVAD_HE_SAD_LR[], /* i : HE-SAD flag without hangover LR channels */ const float Etot_LR[] /* i : total channel energy LR channels */ ); diff --git a/lib_enc/ivas_core_pre_proc_front.c b/lib_enc/ivas_core_pre_proc_front.c index 5f27428607..f643a3a540 100644 --- a/lib_enc/ivas_core_pre_proc_front.c +++ b/lib_enc/ivas_core_pre_proc_front.c @@ -98,17 +98,17 @@ ivas_error pre_proc_front_ivas( const float tdm_lsp_new_PCh[M], /* i : unq. LSPs of primary channel */ const float currFlatness, /* i : flatness parameter */ const int16_t tdm_ratio_idx, /* i : Current Ratio_L index */ - float fr_bands_LR[][2 * NB_BANDS], /* i : energy in frequency bands */ - const float Etot_LR[], /* i : total energy Left & Right channel */ - float lf_E_LR[][2 * VOIC_BINS], /* i : per bin spectrum energy in lf, LR channels */ - const int16_t localVAD_HE_SAD_LR[], /* i : HE-SAD flag without hangover, LR channels */ - float band_energies_LR[2 * NB_BANDS], /* o : energy in critical bands without minimum noise floor E_MIN */ - const int16_t flag_16k_smc, /* i : flag to indicate if the OL SMC is run at 16 kHz */ - const int16_t front_vad_flag, /* i : front-VAD flag to overwrite VAD decision */ - const int16_t force_front_vad, /* i : flag to force VAD decision */ - const int16_t front_vad_dtx_flag, /* i : front-VAD DTX flag to overwrite VAD decision*/ - const IVAS_FORMAT ivas_format, /* i : IVAS format */ - const int32_t ivas_total_brate /* i : IVAS total bitrate - for setting the DTX */ + float fr_bands_LR[][2 * NB_BANDS], /* i : energy in frequency bands */ + const float Etot_LR[], /* i : total energy Left & Right channel */ + float lf_E_LR[][2 * VOIC_BINS], /* i : per bin spectrum energy in lf, LR channels */ + const int16_t localVAD_HE_SAD_LR[], /* i : HE-SAD flag without hangover, LR channels */ + float band_energies_LR[2 * NB_BANDS], /* o : energy in critical bands without minimum noise floor E_MIN */ + const int16_t flag_16k_smc, /* i : flag to indicate if the OL SMC is run at 16 kHz */ + const int16_t front_vad_flag, /* i : front-VAD flag to overwrite VAD decision */ + const int16_t force_front_vad, /* i : flag to force VAD decision */ + const int16_t front_vad_dtx_flag, /* i : front-VAD DTX flag to overwrite VAD decision*/ + const IVAS_FORMAT ivas_format, /* i : IVAS format */ + const int32_t ivas_total_brate /* i : IVAS total bitrate - for setting the DTX */ ) { float *inp_12k8, *new_inp_12k8; /* pointers to current frame and new data */ diff --git a/lib_enc/ivas_dirac_enc.c b/lib_enc/ivas_dirac_enc.c index 31d96e7def..5c2493ec19 100644 --- a/lib_enc/ivas_dirac_enc.c +++ b/lib_enc/ivas_dirac_enc.c @@ -530,17 +530,17 @@ static int16_t ivas_dirac_get_mono_flag( *-------------------------------------------------------------------------*/ void computeReferencePower_enc( - const int16_t *band_grouping, /* i : Band grouping for estimation */ + const int16_t *band_grouping, /* i : Band grouping for estimation */ float Cldfb_RealBuffer[][DIRAC_NO_FB_BANDS_MAX], /* i : Real part of input signal */ float Cldfb_ImagBuffer[][DIRAC_NO_FB_BANDS_MAX], /* i : Imag part of input signal */ - float *reference_power, /* o : Estimated power */ - const int16_t enc_param_start_band, /* i : first band to process */ - const int16_t num_freq_bands, /* i : Number of frequency bands */ - const IVAS_FORMAT ivas_format, /* i : ivas_format */ - int16_t ref_power_w, /* i : use 0 if hodirac is enabled */ - const int16_t nchan_ana, /* i : number of analysis channels */ - int16_t *mono_frame_count, /* i/o: Mono Frame Count */ - int16_t *dirac_mono_flag /* i/o: Mono Flag */ + float *reference_power, /* o : Estimated power */ + const int16_t enc_param_start_band, /* i : first band to process */ + const int16_t num_freq_bands, /* i : Number of frequency bands */ + const IVAS_FORMAT ivas_format, /* i : ivas_format */ + int16_t ref_power_w, /* i : use 0 if hodirac is enabled */ + const int16_t nchan_ana, /* i : number of analysis channels */ + int16_t *mono_frame_count, /* i/o: Mono Frame Count */ + int16_t *dirac_mono_flag /* i/o: Mono Flag */ ) { int16_t brange[2]; diff --git a/lib_enc/ivas_ism_enc.c b/lib_enc/ivas_ism_enc.c index f96ac0cd6d..a2289f3042 100644 --- a/lib_enc/ivas_ism_enc.c +++ b/lib_enc/ivas_ism_enc.c @@ -49,8 +49,8 @@ *-------------------------------------------------------------------*/ ivas_error ivas_ism_enc( - Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ - float *data[], /* i : input signal [channels][samples] */ + Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ + float *data[], /* i : input signal [channels][samples] */ const int16_t input_frame, /* i : input frame length per channel */ int16_t *nb_bits_metadata, /* i : number of metadata bits */ const int16_t flag_omasa_ener_brate /* i : less bitrate for objects in OMASA flag */ diff --git a/lib_enc/long_enr.c b/lib_enc/long_enr.c index 4a817085f6..488012b6bf 100644 --- a/lib_enc/long_enr.c +++ b/lib_enc/long_enr.c @@ -50,12 +50,12 @@ *-------------------------------------------------------------------*/ void long_enr( - Encoder_State *st, /* i/o: encoder state structure */ - const float Etot, /* i : total channel energy */ - const int16_t localVAD_HE_SAD, /* i : HE-SAD flag without hangover */ - const int16_t high_lpn_flag, /* i : sp/mus LPN flag */ - FRONT_VAD_ENC_HANDLE hFrontVad[], /* i/o: front-VAD handles */ - const int16_t n_chan, /* i : number of channels */ + Encoder_State *st, /* i/o: encoder state structure */ + const float Etot, /* i : total channel energy */ + const int16_t localVAD_HE_SAD, /* i : HE-SAD flag without hangover */ + const int16_t high_lpn_flag, /* i : sp/mus LPN flag */ + FRONT_VAD_ENC_HANDLE hFrontVad[], /* i/o: front-VAD handles */ + const int16_t n_chan, /* i : number of channels */ const int16_t localVAD_HE_SAD_LR[], /* i : HE-SAD flag without hangover LR channels */ const float Etot_LR[] /* i : total channel energy LR channels */ ) diff --git a/lib_util/masa_file_writer.c b/lib_util/masa_file_writer.c index 2a88414fbf..171eb4a2e6 100644 --- a/lib_util/masa_file_writer.c +++ b/lib_util/masa_file_writer.c @@ -67,8 +67,8 @@ struct MasaFileWriter static void getExtMasaMetadataFileName( const char *outputWavFilename, /* i : name of the output audio file */ - char *metadata_filename, /* o : name of the output MASA metadata file */ - int32_t max_name_len /* i : size of metadata_filename in chars */ + char *metadata_filename, /* o : name of the output MASA metadata file */ + int32_t max_name_len /* i : size of metadata_filename in chars */ ) { char ext_meta[5]; -- GitLab