diff --git a/lib_com/options.h b/lib_com/options.h index 54389fefef7840087f1770e37f590aafe8004ded..64f02d191e9d625953b858601b4aaaa2a116988f 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -153,7 +153,7 @@ #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 RESOLVE_SBA_COMPILE_WARNINGS /* #################### End BE switches ################################## */ diff --git a/lib_enc/ivas_front_vad.c b/lib_enc/ivas_front_vad.c index 52c3b8cd45c474b9a11bfaf6107b8a3d20717616..28353d7691291b3898518621442951f494d6651d 100644 --- a/lib_enc/ivas_front_vad.c +++ b/lib_enc/ivas_front_vad.c @@ -351,13 +351,26 @@ ivas_error front_vad_spar( const int16_t input_frame /* i : input frame length */ ) { +#ifndef RESOLVE_SBA_COMPILE_WARNINGS FRONT_VAD_ENC_HANDLE hFrontVad; +#else + FRONT_VAD_ENC_HANDLE hfront_vad[CPE_CHANNELS]; + FRONT_VAD_ENC_HANDLE hFrontVad; +#endif float input[L_FRAME48k]; int16_t vad_flag_dtx[1]; float fr_bands[1][2 * NB_BANDS]; +#ifndef RESOLVE_SBA_COMPILE_WARNINGS float Etot[1]; +#else + float Etot[CPE_CHANNELS]; +#endif float lf_E[1][2 * VOIC_BINS]; +#ifndef RESOLVE_SBA_COMPILE_WARNINGS int16_t localVAD_HE_SAD[1]; +#else + int16_t localVAD_HE_SAD[CPE_CHANNELS]; +#endif int16_t vad_hover_flag[1]; float band_energies[2 * NB_BANDS]; int16_t high_lpn_flag; @@ -387,7 +400,12 @@ ivas_error front_vad_spar( push_wmops( "front_vad_SPAR" ); error = IVAS_ERR_OK; +#ifndef RESOLVE_SBA_COMPILE_WARNINGS hFrontVad = hSpar->hFrontVad; +#else + hfront_vad[0] = hSpar->hFrontVad; + hFrontVad = hfront_vad[0]; +#endif st = hSpar->hCoreCoderVAD; if ( hEncoderConfig->Opt_DTX_ON && hEncoderConfig->ivas_total_brate <= SBA_DTX_BITRATE_THRESHOLD ) @@ -466,8 +484,11 @@ ivas_error front_vad_spar( ivas_smc_gmm( st, NULL, localVAD_HE_SAD[0], Etot[0], lsp_new, cor_map_sum, epsP, PS, non_staX, relE, &high_lpn_flag, flag_spitch ); /* long-term energy update */ +#ifndef RESOLVE_SBA_COMPILE_WARNINGS long_enr( st, -1, localVAD_HE_SAD[0], high_lpn_flag, &hFrontVad, 1, localVAD_HE_SAD, Etot ); - +#else + long_enr( st, -1, localVAD_HE_SAD[0], high_lpn_flag, hfront_vad, 1, localVAD_HE_SAD, Etot ); +#endif /* increase ini_frame counter */ hFrontVad->ini_frame = min( hFrontVad->ini_frame + 1, MAX_FRAME_COUNTER ); st->ini_frame = hFrontVad->ini_frame;