diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index b37a31268c2842de8f75c0de6a6c559bae90ac32..133171245338f6d6fded8a6f327ccebf6ac9ee48 100755 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -189,10 +189,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 */ +#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 */ @@ -990,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_com/options.h b/lib_com/options.h index 05bd618b72312a4dc7992cff263004565ea01a39..628f889cd249283bd062a0080edec5920b8f243f 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -154,7 +154,7 @@ #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 */ /* #################### End BE switches ################################## */ diff --git a/lib_com/prot.h b/lib_com/prot.h index d3884cbf4f6a7d352cd8baa295f987d31897732c..8058f4834db43a3328d93d80a863f9a340742060 100644 --- a/lib_com/prot.h +++ b/lib_com/prot.h @@ -3245,14 +3245,23 @@ 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 */ +#else FRONT_VAD_ENC_HANDLE hFrontVad[CPE_CHANNELS], /* i/o: front-VAD handles */ - const int16_t n_chan, /* i : number of channels */ +#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 92c66f0de3a45a8fedce45a6eef569ef81f0e68b..f49fec3ceaba24b24f5150c5286e6f73e4e62ab5 100644 --- a/lib_enc/ivas_core_pre_proc_front.c +++ b/lib_enc/ivas_core_pre_proc_front.c @@ -98,17 +98,24 @@ 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[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 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 */ +#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 */ + 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_enc.c b/lib_enc/ivas_enc.c index 2cf50b22724e468b1924194d20aeb00408948f13..c52a722c20303c1e1875296c1a9dd7e033979728 100644 --- a/lib_enc/ivas_enc.c +++ b/lib_enc/ivas_enc.c @@ -275,6 +275,7 @@ ivas_error ivas_enc( else if ( ivas_format == MASA_ISM_FORMAT ) { float *data_separated_object; + int16_t idx_separated_object; int16_t flag_omasa_ener_brate; @@ -297,6 +298,7 @@ ivas_error ivas_enc( set_s( nb_bits_metadata, 0, MAX_SCE + 1 ); idx_separated_object = 0; + data_separated_object = data_f[hEncoderConfig->nchan_ism + CPE_CHANNELS]; /* put audio object data in SCE's */ diff --git a/lib_enc/ivas_ism_enc.c b/lib_enc/ivas_ism_enc.c index bae24163b106548a90d7fba2c02374dfba07976d..fef013604a7829e7dc37eeb7e2432a103f8e5ea7 100644 --- a/lib_enc/ivas_ism_enc.c +++ b/lib_enc/ivas_ism_enc.c @@ -49,8 +49,12 @@ *-------------------------------------------------------------------*/ ivas_error ivas_ism_enc( - Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ - float *data[MAX_NUM_OBJECTS], /* i : input signal */ + 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 c520c642c786962bda2c1e7a83e395c526514b3a..a23427922cd2df49911c23a7ec024cdff5043f99 100644 --- a/lib_enc/long_enr.c +++ b/lib_enc/long_enr.c @@ -50,14 +50,23 @@ *-------------------------------------------------------------------*/ 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 */ +#else FRONT_VAD_ENC_HANDLE hFrontVad[CPE_CHANNELS], /* i/o: front-VAD handles */ - const int16_t n_chan, /* i : number of channels */ +#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;