diff --git a/lib_com/options.h b/lib_com/options.h index e533e2822b7c91a6c14c42d6a2f79a79bc991ad6..70b82e17fae1b5845db867f70eac36070ad38aec 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -193,6 +193,7 @@ #define NONBE_FIX_869_MASA_PREREND_MERGE /* Nokia: issue: #869: MASA pre-rend not updating energy */ #define FIX_910_REMOVE_DUPLICATION_TD_REND /* VA: issue 910: remove duplication of function ivas_td_binaural_renderer() */ #define FIX_940_DEBUGGING_VARIABLE /* Nokia: issue #940: remove debugging variable */ +#define NONBE_FIX_931_IGF_STEREO_DEC_NOISE /* FhG: issue #931: fix noise substitution in the stereo IGF decoder */ /* #################### End BASOP porting switches ############################ */ diff --git a/lib_dec/igf_dec_fx.c b/lib_dec/igf_dec_fx.c index 5bfa7476a76b4d3f951d270290412d12d6a2eccf..c39c69752c872817795adfb58e2d11281467f17d 100644 --- a/lib_dec/igf_dec_fx.c +++ b/lib_dec/igf_dec_fx.c @@ -895,9 +895,9 @@ static void IGF_prepStereo( Word16 *igf_specL_e_arr, /* i/o: prepared left IGF spectrum exponents for each index */ Word32 *igf_specR_fx, /* i/o: prepared right IGF spectrum */ Word16 *igf_specR_e_arr, /* i/o: prepared right IGF spectrum exponents for each index */ - const Word32 *src_specL_fx, /* i : left source spectrum */ + Word32 *src_specL_fx, /* i : left source spectrum */ const Word16 src_specL_e, /* i : left source spectrum exp */ - const Word32 *src_specR_fx, /* i : right source spectrum */ + Word32 *src_specR_fx, /* i : right source spectrum */ const Word16 src_specR_e, /* i : right source spectrum exp */ const Word16 *coreMsMask /* i : line wise ms Mask Q0 */ ) @@ -964,6 +964,17 @@ static void IGF_prepStereo( { IF( hPrivateDataL->n_noise_bands_off ) { +#ifdef NONBE_FIX_931_IGF_STEREO_DEC_NOISE + IGF_replaceTCXNoise_2_new_ivas( src_specL_fx, + src_specL_e, + TCXNoiseL, + strt_cpy, + stop, + hPrivateDataL->totalNoiseNrg_off, + hPrivateDataL->totalNoiseNrg_off_exp, + hPrivateDataL->n_noise_bands_off, + hInfoL->nfSeed ); +#else IGF_replaceTCXNoise_2_new_ivas_with_var_shift( igf_specL_fx, igf_specL_e_arr, TCXNoiseL, @@ -973,6 +984,7 @@ static void IGF_prepStereo( hPrivateDataL->totalNoiseNrg_off_exp, hPrivateDataL->n_noise_bands_off, hInfoL->nfSeed ); +#endif } selectionL = 1; move16(); @@ -999,6 +1011,17 @@ static void IGF_prepStereo( { IF( hPrivateDataR->n_noise_bands_off ) { +#ifdef NONBE_FIX_931_IGF_STEREO_DEC_NOISE + IGF_replaceTCXNoise_2_new_ivas( src_specR_fx, + src_specR_e, + TCXNoiseR, + strt_cpy, + stop, + hPrivateDataR->totalNoiseNrg_off, + hPrivateDataR->totalNoiseNrg_off_exp, + hPrivateDataR->n_noise_bands_off, + hInfoR->nfSeed ); +#else IGF_replaceTCXNoise_2_new_ivas_with_var_shift( igf_specR_fx, igf_specR_e_arr, TCXNoiseR, @@ -1008,6 +1031,7 @@ static void IGF_prepStereo( hPrivateDataR->totalNoiseNrg_off_exp, hPrivateDataR->n_noise_bands_off, hInfoR->nfSeed ); +#endif } selectionR = 1; move16(); @@ -1129,6 +1153,17 @@ static void IGF_prepStereo( { IF( hPrivateDataL->n_noise_bands_off ) { +#ifdef NONBE_FIX_931_IGF_STEREO_DEC_NOISE + IGF_replaceTCXNoise_2_new_ivas( src_specL_fx, + src_specL_e, + TCXNoiseL, + strt_cpy, + stop, + hPrivateDataL->totalNoiseNrg_off, + hPrivateDataL->totalNoiseNrg_off_exp, + hPrivateDataL->n_noise_bands_off, + hInfoL->nfSeed ); +#else IGF_replaceTCXNoise_2_new_ivas_with_var_shift( igf_specL_fx, igf_specL_e_arr, TCXNoiseL, @@ -1138,6 +1173,7 @@ static void IGF_prepStereo( hPrivateDataL->totalNoiseNrg_off_exp, hPrivateDataL->n_noise_bands_off, hInfoL->nfSeed ); +#endif } selectionL = 1; move16(); @@ -1164,6 +1200,17 @@ static void IGF_prepStereo( { IF( hPrivateDataR->n_noise_bands_off ) { +#ifdef NONBE_FIX_931_IGF_STEREO_DEC_NOISE + IGF_replaceTCXNoise_2_new_ivas( src_specR_fx, + src_specR_e, + TCXNoiseR, + strt_cpy, + stop, + hPrivateDataR->totalNoiseNrg_off, + hPrivateDataR->totalNoiseNrg_off_exp, + hPrivateDataR->n_noise_bands_off, + hInfoR->nfSeed ); +#else IGF_replaceTCXNoise_2_new_ivas_with_var_shift( igf_specR_fx, igf_specR_e_arr, TCXNoiseR, @@ -1173,6 +1220,7 @@ static void IGF_prepStereo( hPrivateDataR->totalNoiseNrg_off_exp, hPrivateDataR->n_noise_bands_off, hInfoR->nfSeed ); +#endif } selectionR = 1; move16();