From d8885494d65f7dd11be5626acedb5081862b830d Mon Sep 17 00:00:00 2001 From: malenov Date: Tue, 31 Oct 2023 12:55:18 +0100 Subject: [PATCH 1/6] change the array definition of fr_bands_LR[][] --- lib_com/ivas_prot.h | 4 ++++ lib_com/options.h | 2 +- lib_enc/ivas_core_pre_proc_front.c | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index a554ff3408..3f641d0197 100755 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -189,7 +189,11 @@ 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 */ +#else float fr_bands_LR[CPE_CHANNELS][2 * NB_BANDS], /* i : energy in frequency bands */ +#endif 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 */ diff --git a/lib_com/options.h b/lib_com/options.h index 54389fefef..8a6406059d 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -151,8 +151,8 @@ /*#define SPLIT_REND_WITH_HEAD_ROT */ /* Dlb,FhG: Split Rendering contributions 21 and 35 */ #define FIX_879_USAN_ERROR_IN_MASA_DECODING /* FhG: Issue 879 : avoid arithmetic with NULL pointer in the DirAC decoder to fix USAN error */ - #define FIX_740_MASA_PREREND_VALIDITY_CHECK /* Nokia: issue 740: fix incorrect validity check in lib_rend to allow use of MASA prerenderer */ +#define BE_FIX_887_GCC_WARNING_ARRAY_SIZE /* VoiceAge: Issue 887: change array size definition to avoid warning with gcc 11.4.0 */ /* #################### End BE switches ################################## */ diff --git a/lib_enc/ivas_core_pre_proc_front.c b/lib_enc/ivas_core_pre_proc_front.c index 92c66f0de3..bfd432a495 100644 --- a/lib_enc/ivas_core_pre_proc_front.c +++ b/lib_enc/ivas_core_pre_proc_front.c @@ -98,7 +98,11 @@ 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 */ +#else float fr_bands_LR[CPE_CHANNELS][2 * NB_BANDS], /* i : energy in frequency bands */ +#endif 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 */ -- GitLab From 1be79267d8688d0a38a93bf004ff791ce536f18c Mon Sep 17 00:00:00 2001 From: malenov Date: Tue, 31 Oct 2023 13:29:16 +0100 Subject: [PATCH 2/6] more modifications of array size declarations --- lib_com/ivas_prot.h | 5 ++++- lib_com/prot.h | 9 +++++++++ lib_enc/ivas_core_pre_proc_front.c | 5 ++++- lib_enc/long_enr.c | 9 +++++++++ 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 3f641d0197..3c2110f91d 100755 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -191,12 +191,15 @@ ivas_error pre_proc_front_ivas( 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 */ -#endif 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_com/prot.h b/lib_com/prot.h index d3884cbf4f..fdf92178da 100644 --- a/lib_com/prot.h +++ b/lib_com/prot.h @@ -3249,10 +3249,19 @@ 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 bfd432a495..cbcaf52932 100644 --- a/lib_enc/ivas_core_pre_proc_front.c +++ b/lib_enc/ivas_core_pre_proc_front.c @@ -100,12 +100,15 @@ ivas_error pre_proc_front_ivas( 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 */ -#endif 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/long_enr.c b/lib_enc/long_enr.c index c520c642c7..e88a71de79 100644 --- a/lib_enc/long_enr.c +++ b/lib_enc/long_enr.c @@ -54,10 +54,19 @@ 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 568f76e96d2b7629e1e516f9eb14c0326236d8fb Mon Sep 17 00:00:00 2001 From: vaclav Date: Tue, 31 Oct 2023 15:47:22 +0100 Subject: [PATCH 3/6] fix for "data_separated_object" buffer --- lib_enc/ivas_enc.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lib_enc/ivas_enc.c b/lib_enc/ivas_enc.c index 2cf50b2272..12f6447b27 100644 --- a/lib_enc/ivas_enc.c +++ b/lib_enc/ivas_enc.c @@ -274,7 +274,11 @@ ivas_error ivas_enc( } else if ( ivas_format == MASA_ISM_FORMAT ) { +#ifdef BE_FIX_887_GCC_WARNING_ARRAY_SIZE + float *data_separated_object[1]; +#else float *data_separated_object; +#endif int16_t idx_separated_object; int16_t flag_omasa_ener_brate; @@ -297,27 +301,43 @@ ivas_error ivas_enc( set_s( nb_bits_metadata, 0, MAX_SCE + 1 ); idx_separated_object = 0; +#ifdef BE_FIX_887_GCC_WARNING_ARRAY_SIZE + data_separated_object[0] = data_f[hEncoderConfig->nchan_ism + CPE_CHANNELS]; +#else data_separated_object = data_f[hEncoderConfig->nchan_ism + CPE_CHANNELS]; +#endif /* put audio object data in SCE's */ if ( st_ivas->ism_mode != ISM_MASA_MODE_DISC ) { /* Estimate MASA parameters for the objects */ +#ifdef BE_FIX_887_GCC_WARNING_ARRAY_SIZE + ivas_omasa_enc( st_ivas->hOMasa, st_ivas->hMasa, st_ivas->hIsmMetaData, data_f, input_frame, st_ivas->nchan_transport, hEncoderConfig->nchan_ism, st_ivas->ism_mode, data_separated_object[0], &idx_separated_object ); +#else ivas_omasa_enc( st_ivas->hOMasa, st_ivas->hMasa, st_ivas->hIsmMetaData, data_f, input_frame, st_ivas->nchan_transport, hEncoderConfig->nchan_ism, st_ivas->ism_mode, data_separated_object, &idx_separated_object ); +#endif } /* Encode ISMs transport channels */ n = 0; if ( st_ivas->ism_mode == ISM_MASA_MODE_PARAM_ONE_OBJ ) { +#ifdef BE_FIX_887_GCC_WARNING_ARRAY_SIZE + if ( ( error = ivas_sce_enc( st_ivas, 0, data_separated_object[0], input_frame, nb_bits_metadata[1] ) ) != IVAS_ERR_OK ) /* there are no metadata bits in SCE in this mode */ +#else if ( ( error = ivas_sce_enc( st_ivas, 0, data_separated_object, input_frame, nb_bits_metadata[1] ) ) != IVAS_ERR_OK ) /* there are no metadata bits in SCE in this mode */ +#endif { return error; } } else if ( st_ivas->ism_mode == ISM_MASA_MODE_MASA_ONE_OBJ ) { +#ifdef BE_FIX_887_GCC_WARNING_ARRAY_SIZE + if ( ( error = ivas_ism_enc( st_ivas, data_separated_object, input_frame, &nb_bits_metadata[1], 0 ) ) != IVAS_ERR_OK ) +#else if ( ( error = ivas_ism_enc( st_ivas, &data_separated_object, input_frame, &nb_bits_metadata[1], 0 ) ) != IVAS_ERR_OK ) +#endif { return error; } -- GitLab From 72512f2f12636f22ac54a4484fb26bccb1d0b576 Mon Sep 17 00:00:00 2001 From: vaclav Date: Tue, 31 Oct 2023 15:55:58 +0100 Subject: [PATCH 4/6] clang-format --- lib_com/prot.h | 16 ++++++++-------- lib_enc/ivas_core_pre_proc_front.c | 30 +++++++++++++++--------------- lib_enc/long_enr.c | 16 ++++++++-------- 3 files changed, 31 insertions(+), 31 deletions(-) diff --git a/lib_com/prot.h b/lib_com/prot.h index fdf92178da..8058f4834d 100644 --- a/lib_com/prot.h +++ b/lib_com/prot.h @@ -3245,19 +3245,19 @@ 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 */ + 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 */ #ifdef BE_FIX_887_GCC_WARNING_ARRAY_SIZE - FRONT_VAD_ENC_HANDLE hFrontVad[], /* i/o: front-VAD handles */ + 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 */ + 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 */ + 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 */ diff --git a/lib_enc/ivas_core_pre_proc_front.c b/lib_enc/ivas_core_pre_proc_front.c index cbcaf52932..f49fec3cea 100644 --- a/lib_enc/ivas_core_pre_proc_front.c +++ b/lib_enc/ivas_core_pre_proc_front.c @@ -99,23 +99,23 @@ ivas_error pre_proc_front_ivas( 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 */ + 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 */ + 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 */ - 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 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/long_enr.c b/lib_enc/long_enr.c index e88a71de79..a23427922c 100644 --- a/lib_enc/long_enr.c +++ b/lib_enc/long_enr.c @@ -50,19 +50,19 @@ *-------------------------------------------------------------------*/ 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 */ + 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 */ #ifdef BE_FIX_887_GCC_WARNING_ARRAY_SIZE - FRONT_VAD_ENC_HANDLE hFrontVad[], /* i/o: front-VAD handles */ + 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 */ + 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 */ + 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 */ -- GitLab From aefdf2d7fd9ae0385a1f3d77eafd7f51e75f0ff7 Mon Sep 17 00:00:00 2001 From: malenov Date: Tue, 31 Oct 2023 16:44:02 +0100 Subject: [PATCH 5/6] fix array size declaration for data_separated_object[] --- lib_com/ivas_prot.h | 4 ++++ lib_enc/ivas_enc.c | 22 ++-------------------- lib_enc/ivas_ism_enc.c | 4 ++++ 3 files changed, 10 insertions(+), 20 deletions(-) diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index cfe8467956..1331712453 100755 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -997,7 +997,11 @@ 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_enc/ivas_enc.c b/lib_enc/ivas_enc.c index 12f6447b27..c52a722c20 100644 --- a/lib_enc/ivas_enc.c +++ b/lib_enc/ivas_enc.c @@ -274,11 +274,8 @@ ivas_error ivas_enc( } else if ( ivas_format == MASA_ISM_FORMAT ) { -#ifdef BE_FIX_887_GCC_WARNING_ARRAY_SIZE - float *data_separated_object[1]; -#else float *data_separated_object; -#endif + int16_t idx_separated_object; int16_t flag_omasa_ener_brate; @@ -301,43 +298,28 @@ ivas_error ivas_enc( set_s( nb_bits_metadata, 0, MAX_SCE + 1 ); idx_separated_object = 0; -#ifdef BE_FIX_887_GCC_WARNING_ARRAY_SIZE - data_separated_object[0] = data_f[hEncoderConfig->nchan_ism + CPE_CHANNELS]; -#else + data_separated_object = data_f[hEncoderConfig->nchan_ism + CPE_CHANNELS]; -#endif /* put audio object data in SCE's */ if ( st_ivas->ism_mode != ISM_MASA_MODE_DISC ) { /* Estimate MASA parameters for the objects */ -#ifdef BE_FIX_887_GCC_WARNING_ARRAY_SIZE - ivas_omasa_enc( st_ivas->hOMasa, st_ivas->hMasa, st_ivas->hIsmMetaData, data_f, input_frame, st_ivas->nchan_transport, hEncoderConfig->nchan_ism, st_ivas->ism_mode, data_separated_object[0], &idx_separated_object ); -#else ivas_omasa_enc( st_ivas->hOMasa, st_ivas->hMasa, st_ivas->hIsmMetaData, data_f, input_frame, st_ivas->nchan_transport, hEncoderConfig->nchan_ism, st_ivas->ism_mode, data_separated_object, &idx_separated_object ); -#endif } /* Encode ISMs transport channels */ n = 0; if ( st_ivas->ism_mode == ISM_MASA_MODE_PARAM_ONE_OBJ ) { -#ifdef BE_FIX_887_GCC_WARNING_ARRAY_SIZE - if ( ( error = ivas_sce_enc( st_ivas, 0, data_separated_object[0], input_frame, nb_bits_metadata[1] ) ) != IVAS_ERR_OK ) /* there are no metadata bits in SCE in this mode */ -#else if ( ( error = ivas_sce_enc( st_ivas, 0, data_separated_object, input_frame, nb_bits_metadata[1] ) ) != IVAS_ERR_OK ) /* there are no metadata bits in SCE in this mode */ -#endif { return error; } } else if ( st_ivas->ism_mode == ISM_MASA_MODE_MASA_ONE_OBJ ) { -#ifdef BE_FIX_887_GCC_WARNING_ARRAY_SIZE - if ( ( error = ivas_ism_enc( st_ivas, data_separated_object, input_frame, &nb_bits_metadata[1], 0 ) ) != IVAS_ERR_OK ) -#else if ( ( error = ivas_ism_enc( st_ivas, &data_separated_object, input_frame, &nb_bits_metadata[1], 0 ) ) != IVAS_ERR_OK ) -#endif { return error; } diff --git a/lib_enc/ivas_ism_enc.c b/lib_enc/ivas_ism_enc.c index bae24163b1..fb4c202279 100644 --- a/lib_enc/ivas_ism_enc.c +++ b/lib_enc/ivas_ism_enc.c @@ -50,7 +50,11 @@ 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 */ -- GitLab From 95e9fce576d31548d06fa4c90bc11a6cdb24bc62 Mon Sep 17 00:00:00 2001 From: Vladimir Malenovsky Date: Tue, 31 Oct 2023 16:46:17 +0100 Subject: [PATCH 6/6] clang format --- lib_enc/ivas_ism_enc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib_enc/ivas_ism_enc.c b/lib_enc/ivas_ism_enc.c index fb4c202279..fef013604a 100644 --- a/lib_enc/ivas_ism_enc.c +++ b/lib_enc/ivas_ism_enc.c @@ -49,11 +49,11 @@ *-------------------------------------------------------------------*/ ivas_error ivas_ism_enc( - Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ + Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ #ifdef BE_FIX_887_GCC_WARNING_ARRAY_SIZE - float *data[], /* i : input signal [channels][samples] */ + float *data[], /* i : input signal [channels][samples] */ #else - float *data[MAX_NUM_OBJECTS], /* i : input signal */ + 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 */ -- GitLab