diff --git a/lib_dec/acelp_core_dec_ivas_fx.c b/lib_dec/acelp_core_dec_ivas_fx.c index e3d00c4f5c6c4593522c392d58652a4610d17fd0..39d3284ead5af40465f023f0f0e4763f9583a02c 100644 --- a/lib_dec/acelp_core_dec_ivas_fx.c +++ b/lib_dec/acelp_core_dec_ivas_fx.c @@ -775,7 +775,12 @@ ivas_error acelp_core_dec_ivas_fx( /* Check LSF stability (distance between old LSFs and current LSFs) */ st->stab_fac_fx = lsf_stab_ivas_fx( lsf_new_fx, st->lsf_old_fx, 0, st->L_frame ); } +#ifndef MSAN_FIX for (int nsf = 0; nsf < NB_SUBFR16k; nsf++) { +#else + FOR( int nsf = 0; nsf < st->nb_subfr; nsf++ ) +#endif + { Scale_sig(Aq_fx + (nsf * (M + 1)), M + 1, norm_s(Aq_fx[nsf * (M + 1)]) - Q2); Aq_fx[nsf * (M + 1)] = ONE_IN_Q12; } @@ -1518,9 +1523,14 @@ ivas_error acelp_core_dec_ivas_fx( pRealSave_fx[i] = realBufferSave_fx[i]; pImagSave_fx[i] = imagBufferSave_fx[i]; } +#ifndef MSAN_FIX Copy_Scale_sig_16_32(bpf_error_signal_16fx, bpf_error_signal_fx, st->L_frame, -1); //Q_syn-1 +#endif IF(st->p_bpf_noise_buf_32) { +#ifdef MSAN_FIX + Copy_Scale_sig_16_32( bpf_error_signal_16fx, bpf_error_signal_fx, st->L_frame, -1 ); // Q_syn-1 +#endif Copy32(bpf_error_signal_fx, st->p_bpf_noise_buf_32, st->L_frame); Scale_sig32( st->p_bpf_noise_buf_32, st->L_frame, sub( Q11, sub( st->Q_syn, 1 ) ) ); } @@ -1703,7 +1713,11 @@ ivas_error acelp_core_dec_ivas_fx( int16_t nSamples = NS2SA(st->L_frame * FRAMES_PER_SEC, FRAME_SIZE_NS /*DELAY_CLDFB_NS*/); /* IVAS-64: optimization is likely possible here (don't resample the whole frame) */ /* analysis of the synthesis at internal sampling rate - needed for DFT stereo -> TD stereo switching */ +#ifndef MSAN_FIX for (i = 0; i < L_FRAME16k; i++) +#else + FOR( i = 0; i < st->L_frame; i++ ) +#endif { syn_32_fx[i] = L_shr(L_deposit_h(psyn_fx[i]), 4 + st->Q_syn); } @@ -1763,11 +1777,17 @@ ivas_error acelp_core_dec_ivas_fx( Scale_sig32(imagBuffer_fx[i], CLDFB_NO_CHANNELS_MAX, Q_real); } Scale_sig32(st->cldfbSyn->cldfb_state_fx, st->cldfbSyn->p_filter_length, (Q_real - 1) - Q10); //(Q_real - 1) +#ifndef MSAN_FIX Scale_sig32( synth_fx, L_FRAME48k, Q_real - 1); +#endif cldfbSynthesis_ivas_fx(realBuffer_fx, imagBuffer_fx, synth_fx /*dummy*/, NS2SA(st->output_Fs, FRAME_SIZE_NS /*DELAY_CLDFB_NS*/), st->cldfbSyn); +#ifdef MSAN_FIX + Scale_sig32(synth_fx, output_frame, -(Q_real - 1)); +#else Scale_sig32(synth_fx, L_FRAME48k, -(Q_real - 1)); +#endif Scale_sig32(st->cldfbSyn->cldfb_state_fx, st->cldfbSyn->p_filter_length, Q10 - (Q_real - 1)); if (st->p_bpf_noise_buf_32) @@ -1783,7 +1803,11 @@ ivas_error acelp_core_dec_ivas_fx( } /* Copy output signal */ +#ifndef MSAN_FIX Scale_sig(syn_tmp_fx, L_FRAME16k + L_SUBFR, -st->Q_syn); +#else + Scale_sig(syn_tmp_fx, st->L_frame + L_SUBFR, -st->Q_syn); +#endif if (st->element_mode > EVS_MONO) { Copy(psyn_fx, output_fx, st->L_frame); diff --git a/lib_dec/ivas_core_dec.c b/lib_dec/ivas_core_dec.c index fd83492fd092efe9383e9917f646e05bab152878..672dab774a2bedcef38fb20486258ce53046b906 100644 --- a/lib_dec/ivas_core_dec.c +++ b/lib_dec/ivas_core_dec.c @@ -1142,10 +1142,13 @@ ivas_error ivas_core_dec( } Scale_sig( tmp_buffer_fx, L_FRAME48k, Q11 - Q_white_exc ); stereo_icBWE_dec_fx( hCPE, hb_synth_32_fx[0], hb_synth_32_fx[1], tmp_buffer_fx /*fb_synth_ref*/, voice_factors_fx[0], output_frame, &q ); - +#ifdef MSAN_FIX + Scale_sig32(hb_synth_32_fx[0], output_frame, sub(Q11 , q)); + Scale_sig32(hb_synth_32_fx[1], output_frame, sub(Q11 , q)); +#else Scale_sig32(hb_synth_32_fx[0], L_FRAME48k, sub(Q11 , q)); Scale_sig32(hb_synth_32_fx[1], L_FRAME48k, sub(Q11 , q)); - +#endif } IF( EQ_16( st->element_mode, EVS_MONO ) ) diff --git a/lib_dec/ivas_dirac_output_synthesis_cov.c b/lib_dec/ivas_dirac_output_synthesis_cov.c index e558dda691fb39949b22fd4dbabf3493bc0a82a5..8fbb8bb9b582fb9e3be066f0ae355106b3b8259b 100644 --- a/lib_dec/ivas_dirac_output_synthesis_cov.c +++ b/lib_dec/ivas_dirac_output_synthesis_cov.c @@ -100,6 +100,8 @@ ivas_error ivas_dirac_dec_output_synthesis_cov_open_fx( { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC synthesis covariance\n" ) ); } + h_dirac_output_synthesis_state->cx_old_len = nchan_in * nchan_in; + move16(); if ( ( h_dirac_output_synthesis_state->cy_old_fx[idx] = (Word32 *) malloc( nchan_out * nchan_out * sizeof(Word32) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC synthesis covariance\n" ) ); diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index 2ed3529f1b16cee4cec27679114ed9e217f6432a..54156a695a9dd3991afd8bfa3411ec7fab2be99a 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -1976,7 +1976,7 @@ ivas_error ivas_init_decoder_fx( // } // } //} - fixedToFloat_arrL( hParamMC->proto_matrix_int_fx, hParamMC->proto_matrix_int, Q31, nchan_out_transport * nchan_transport ); + fixedToFloat_arrL( hParamMC->proto_matrix_int_fx, hParamMC->proto_matrix_int, Q31, s_min(hParamMC->proto_matrix_int_len, nchan_out_transport * nchan_transport) ); //if ( hParamMC->ls_conv_dmx_matrix ) // fixedToFloat_arrL( hParamMC->ls_conv_dmx_matrix_fx, hParamMC->ls_conv_dmx_matrix, Q30, nchan_out_transport * nchan_out_cov ); if ( hParamMC->hoa_encoder_fx ) diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index f56362f1b2e50526f2ce8eefce95ebb883ae9975..25a296bc4f1d6d9adefcba4b06e519e2c7c256d7 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -1339,7 +1339,7 @@ ivas_error ivas_jbm_dec_tc( #endif #endif // IVAS_FLOAT_FIXED } - ELSE IF( st_ivas->renderer_type != RENDERER_DISABLE && NE_16( st_ivas->sba_dirac_stereo_flag, 0 ) ) + ELSE IF( st_ivas->renderer_type != RENDERER_DISABLE && EQ_16( st_ivas->sba_dirac_stereo_flag, 0 ) ) { Word16 size = st_ivas->hSpar->hMdDec->spar_md_cfg.nchan_transport + sba_ch_idx; IF( EQ_16( size, 3 ) ) @@ -3842,10 +3842,10 @@ void ivas_jbm_dec_feed_tc_to_renderer( FOR(Word16 param_band_idx = 0; param_band_idx < st_ivas->hParamMC->num_param_bands_synth; param_band_idx++) { - f2me_buf(st_ivas->hParamMC->h_output_synthesis_cov_state.cx_old[param_band_idx], st_ivas->hParamMC->h_output_synthesis_cov_state.cx_old_fx[param_band_idx], &st_ivas->hParamMC->h_output_synthesis_cov_state.cx_old_e[param_band_idx], nchan_transport * nchan_transport); + f2me_buf(st_ivas->hParamMC->h_output_synthesis_cov_state.cx_old[param_band_idx], st_ivas->hParamMC->h_output_synthesis_cov_state.cx_old_fx[param_band_idx], &st_ivas->hParamMC->h_output_synthesis_cov_state.cx_old_e[param_band_idx], s_min(st_ivas->hParamMC->h_output_synthesis_cov_state.cx_old_len, nchan_transport * nchan_transport)); f2me_buf(st_ivas->hParamMC->h_output_synthesis_cov_state.cy_old[param_band_idx], st_ivas->hParamMC->h_output_synthesis_cov_state.cy_old_fx[param_band_idx], &st_ivas->hParamMC->h_output_synthesis_cov_state.cy_old_e[param_band_idx], nchan_out_cov * nchan_out_cov); } - f2me_buf(st_ivas->hParamMC->proto_matrix_int, st_ivas->hParamMC->proto_matrix_int_fx, &st_ivas->hParamMC->proto_matrix_int_e, nchan_transport * nchan_out_transport); + f2me_buf(st_ivas->hParamMC->proto_matrix_int, st_ivas->hParamMC->proto_matrix_int_fx, &st_ivas->hParamMC->proto_matrix_int_e, s_min(st_ivas->hParamMC->proto_matrix_int_len, nchan_transport * nchan_out_transport)); ivas_param_mc_dec_digest_tc_fx( st_ivas, (uint8_t) n_render_timeslots, (Word32 **)p_data_f_fx, in_q ); @@ -3863,7 +3863,7 @@ void ivas_jbm_dec_feed_tc_to_renderer( FOR(Word16 param_band_idx = 0; param_band_idx < st_ivas->hParamMC->num_param_bands_synth; param_band_idx++) { - me2f_buf(st_ivas->hParamMC->h_output_synthesis_cov_state.cx_old_fx[param_band_idx], st_ivas->hParamMC->h_output_synthesis_cov_state.cx_old_e[param_band_idx], st_ivas->hParamMC->h_output_synthesis_cov_state.cx_old[param_band_idx], nchan_transport * nchan_transport); + me2f_buf(st_ivas->hParamMC->h_output_synthesis_cov_state.cx_old_fx[param_band_idx], st_ivas->hParamMC->h_output_synthesis_cov_state.cx_old_e[param_band_idx], st_ivas->hParamMC->h_output_synthesis_cov_state.cx_old[param_band_idx], s_min(st_ivas->hParamMC->h_output_synthesis_cov_state.cx_old_len, nchan_transport * nchan_transport)); me2f_buf(st_ivas->hParamMC->h_output_synthesis_cov_state.cy_old_fx[param_band_idx], st_ivas->hParamMC->h_output_synthesis_cov_state.cy_old_e[param_band_idx], st_ivas->hParamMC->h_output_synthesis_cov_state.cy_old[param_band_idx], nchan_out_cov * nchan_out_cov); } diff --git a/lib_dec/ivas_mc_param_dec.c b/lib_dec/ivas_mc_param_dec.c index 2e18522b5fc60e433efb6a0f88c2be28f33792f6..7474cd3755eea918bb3950344f8d3d01eadceada 100644 --- a/lib_dec/ivas_mc_param_dec.c +++ b/lib_dec/ivas_mc_param_dec.c @@ -382,6 +382,8 @@ ivas_error ivas_param_mc_dec_open_fx( { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Parametric MC\n" ) ); } + hParamMC->proto_matrix_int_len = nchan_out_transport * nchan_transport; + move16(); if ( hParamMC->synthesis_conf == PARAM_MC_SYNTH_LS_CONV_COV || hParamMC->synthesis_conf == PARAM_MC_SYNTH_MONO_STEREO ) { @@ -1461,6 +1463,8 @@ ivas_error ivas_param_mc_dec_reconfig_fx( { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Parametric MC\n" ) ); } + hParamMC->proto_matrix_int_len = nchan_out_transport * nchan_transport; + move16(); Copy32( ivas_param_mc_conf[config_index].dmx_fac_fx, hParamMC->proto_matrix_int_fx, nchan_transport * nchan_out_transport );/*Q31*/ } diff --git a/lib_dec/ivas_mct_dec.c b/lib_dec/ivas_mct_dec.c index 9bccd4b8117ea1c0b49db103ccc2a1f3a9dfa721..ea952616c8d95b210176aa290367f21616b41581 100644 --- a/lib_dec/ivas_mct_dec.c +++ b/lib_dec/ivas_mct_dec.c @@ -1443,9 +1443,9 @@ ivas_error ivas_mc_dec_config( if ( hParamMC->h_output_synthesis_cov_state.cx_old[i] ) { - floatToFixed_arrL( hParamMC->h_output_synthesis_cov_state.cx_old[i], hParamMC->h_output_synthesis_cov_state.cx_old_fx[i], 31 - cx_e, nchan_transport_old * nchan_transport_old ); + floatToFixed_arrL( hParamMC->h_output_synthesis_cov_state.cx_old[i], hParamMC->h_output_synthesis_cov_state.cx_old_fx[i], 31 - cx_e, s_min(st_ivas->hParamMC->h_output_synthesis_cov_state.cx_old_len, nchan_transport_old * nchan_transport_old )); floatToFixed_arrL( hParamMC->h_output_synthesis_cov_state.cy_old[i], hParamMC->h_output_synthesis_cov_state.cy_old_fx[i], 31 - cy_e, nchan_out_cov * nchan_out_cov ); - floatToFixed_arrL( hParamMC->h_output_synthesis_cov_state.mixing_matrix_old[i], hParamMC->h_output_synthesis_cov_state.mixing_matrix_old_fx[i], 31 - mmo_e, nchan_transport_old * nchan_out_cov ); + floatToFixed_arrL( hParamMC->h_output_synthesis_cov_state.mixing_matrix_old[i], hParamMC->h_output_synthesis_cov_state.mixing_matrix_old_fx[i], 31 - mmo_e, s_min(hParamMC->h_output_synthesis_cov_state.mixing_matrix_old_len, nchan_transport_old * nchan_out_cov) ); } } for ( int i = 0; i < CLDFB_NO_CHANNELS_MAX; i++ ) @@ -1455,7 +1455,7 @@ ivas_error ivas_mc_dec_config( floatToFixed_arrL( hParamMC->h_output_synthesis_cov_state.mixing_matrix_res_old[i], hParamMC->h_output_synthesis_cov_state.mixing_matrix_res_old_fx[i], 31 - mmro_e, nchan_out_cov * nchan_out_cov ); } } - floatToFixed_arrL( hParamMC->proto_matrix_int, hParamMC->proto_matrix_int_fx, Q31, nchan_out_transport * nchan_transport ); + floatToFixed_arrL( hParamMC->proto_matrix_int, hParamMC->proto_matrix_int_fx, Q31, s_min(st_ivas->hParamMC->proto_matrix_int_len, nchan_out_transport * nchan_transport) ); FOR( Word16 i = 0; i < hParamMC->diff_proto_info->num_protos_diff; i++ ) { if ( hParamMC->diff_proto_info ) @@ -1509,7 +1509,7 @@ ivas_error ivas_mc_dec_config( { fixedToFloat_arrL( hParamMC->diff_proto_info->proto_fac_fx[i], hParamMC->diff_proto_info->proto_fac[i], 26, hParamMC->diff_proto_info->num_source_chan_diff[i] ); } - fixedToFloat_arrL( hParamMC->proto_matrix_int_fx, hParamMC->proto_matrix_int, Q31, nchan_out_transport * nchan_transport ); + fixedToFloat_arrL( hParamMC->proto_matrix_int_fx, hParamMC->proto_matrix_int, Q31, s_min(st_ivas->hParamMC->proto_matrix_int_len, nchan_out_transport * nchan_transport) ); /*IF(st_ivas->hParamMC->ls_conv_dmx_matrix_fx ) fixedToFloat_arrL( st_ivas->hParamMC->ls_conv_dmx_matrix_fx, st_ivas->hParamMC->ls_conv_dmx_matrix, Q30, st_ivas->hDecoderConfig->nchan_out * ( st_ivas->hTransSetup.nchan_out_woLFE + st_ivas->hTransSetup.num_lfe ) );*/ if ( last_mc_mode == MC_MODE_PARAMMC ) @@ -1518,9 +1518,9 @@ ivas_error ivas_mc_dec_config( { if ( hParamMC->h_output_synthesis_cov_state.cx_old[i] ) { - fixedToFloat_arrL( hParamMC->h_output_synthesis_cov_state.cx_old_fx[i], hParamMC->h_output_synthesis_cov_state.cx_old[i], 31 - cx_e, nchan_transport_old * nchan_transport_old ); + fixedToFloat_arrL( hParamMC->h_output_synthesis_cov_state.cx_old_fx[i], hParamMC->h_output_synthesis_cov_state.cx_old[i], 31 - cx_e, s_min(st_ivas->hParamMC->h_output_synthesis_cov_state.cx_old_len, nchan_transport_old * nchan_transport_old) ); fixedToFloat_arrL( hParamMC->h_output_synthesis_cov_state.cy_old_fx[i], hParamMC->h_output_synthesis_cov_state.cy_old[i], 31 - cy_e, nchan_out_cov * nchan_out_cov ); - fixedToFloat_arrL( hParamMC->h_output_synthesis_cov_state.mixing_matrix_old_fx[i], hParamMC->h_output_synthesis_cov_state.mixing_matrix_old[i], 31 - mmo_e, nchan_transport_old * nchan_out_cov ); + fixedToFloat_arrL( hParamMC->h_output_synthesis_cov_state.mixing_matrix_old_fx[i], hParamMC->h_output_synthesis_cov_state.mixing_matrix_old[i], 31 - mmo_e, s_min(hParamMC->h_output_synthesis_cov_state.mixing_matrix_old_len, nchan_transport_old * nchan_out_cov) ); } } for ( int i = 0; i < CLDFB_NO_CHANNELS_MAX; i++ ) diff --git a/lib_dec/ivas_mdct_core_dec.c b/lib_dec/ivas_mdct_core_dec.c index 7aa9de8ceb122a7eb550c4e4cae32acb9fb4ee8a..16008fb1fbde5ccc6a8d3bb31350905712948a84 100644 --- a/lib_dec/ivas_mdct_core_dec.c +++ b/lib_dec/ivas_mdct_core_dec.c @@ -989,8 +989,13 @@ void ivas_mdct_core_invQ_fx( /* both input in same Q */ stereo_decoder_tcx_fx( hCPE->hStereoMdct, ms_mask, x_0[1], &spectralData_tmp[0], &spectralData_tmp[1], &hCPE->hStereoMdct->mdct_stereo_mode[0], sts[0]->core, sts[1]->core, sts[0]->igf, L_frameTCX[0], L_frameTCX[1], 0, sts[0]->last_core, sts[1]->last_core, 1, &q_r, &q_l ); +#ifdef MSAN_FIX + Copy_Scale_sig_32_16( spectralData_tmp[0], sts[0]->hTonalMDCTConc->lastBlockData.spectralData, L_frameTCX[0], -15 ); + Copy_Scale_sig_32_16( spectralData_tmp[1], sts[1]->hTonalMDCTConc->lastBlockData.spectralData, L_frameTCX[1], -15 ); +#else Copy_Scale_sig_32_16( spectralData_tmp[0], sts[0]->hTonalMDCTConc->lastBlockData.spectralData, L_FRAME_MAX, -15 ); Copy_Scale_sig_32_16( spectralData_tmp[1], sts[1]->hTonalMDCTConc->lastBlockData.spectralData, L_FRAME_MAX, -15 ); +#endif sts[0]->hTonalMDCTConc->lastBlockData.spectralData_exp = sub( 30, q_l ); sts[1]->hTonalMDCTConc->lastBlockData.spectralData_exp = sub( 30, q_r ); } diff --git a/lib_dec/ivas_post_proc.c b/lib_dec/ivas_post_proc.c index 8a50efab32f9a698c835d546e66bac3dafcca7c0..7267195a817da45778c6358748893c58a5bcbb76 100644 --- a/lib_dec/ivas_post_proc.c +++ b/lib_dec/ivas_post_proc.c @@ -322,7 +322,11 @@ void stereo_dft_dec_core_switching_fx( IF( st->p_bpf_noise_buf_32 ) { +#ifdef MSAN_FIX + Scale_sig32( st->p_bpf_noise_buf_32, st->L_frame, sub( *q, Q11 ) ); +#else Scale_sig32( st->p_bpf_noise_buf_32, L_FRAME16k, sub( *q, Q11 ) ); +#endif } IF( st->core == TCX_20_CORE || st->core == TCX_10_CORE || st->core == HQ_CORE || ( st->bfi == 1 && st->core == ACELP_CORE && st->con_tcx == 1 ) ) @@ -700,7 +704,11 @@ void stereo_dft_dec_core_switching_fx( IF( st->p_bpf_noise_buf_32 ) { +#ifdef MSAN_FIX + Scale_sig32( st->p_bpf_noise_buf_32, st->L_frame, negate( sub( *q, Q11 ) ) ); +#else Scale_sig32( st->p_bpf_noise_buf_32, L_FRAME16k, negate( sub( *q, Q11 ) ) ); +#endif } return; diff --git a/lib_dec/ivas_stat_dec.h b/lib_dec/ivas_stat_dec.h index 2b6fbddfacd9d7d9f581bd3b3bc6e906a9881a96..43c23da67ab79ccbe6697a65e7ffe31c3d5d1d6f 100644 --- a/lib_dec/ivas_stat_dec.h +++ b/lib_dec/ivas_stat_dec.h @@ -787,8 +787,10 @@ typedef struct dirac_output_synthesis_cov_state_structure float *mixing_matrix_res[CLDFB_NO_CHANNELS_MAX]; #ifdef IVAS_FLOAT_FIXED Word32 *cx_old_fx[CLDFB_NO_CHANNELS_MAX]; + Word16 cx_old_len; Word32 *cy_old_fx[CLDFB_NO_CHANNELS_MAX]; Word32 *mixing_matrix_old_fx[CLDFB_NO_CHANNELS_MAX]; + Word16 mixing_matrix_old_len; Word32 *mixing_matrix_fx[CLDFB_NO_CHANNELS_MAX]; Word32 *mixing_matrix_res_old_fx[CLDFB_NO_CHANNELS_MAX]; Word32 *mixing_matrix_res_fx[CLDFB_NO_CHANNELS_MAX]; @@ -886,6 +888,7 @@ typedef struct ivas_param_mc_dec_data_structure Word32 *ls_conv_dmx_matrix_fx; Word16 ls_conv_dmx_e; Word32 *proto_matrix_int_fx; + Word16 proto_matrix_int_len; Word16 proto_matrix_int_e; #endif diff --git a/lib_dec/ivas_stereo_switching_dec.c b/lib_dec/ivas_stereo_switching_dec.c index 78f8b26ddd02c04f70f5c3c1dd90758101da9d1a..029e2bcff12ecc23452572c95f3607da84f48e4a 100644 --- a/lib_dec/ivas_stereo_switching_dec.c +++ b/lib_dec/ivas_stereo_switching_dec.c @@ -3637,12 +3637,20 @@ void stereo_td2dft_update_fx( /* update buffers used for fading when switching to DFT Stereo */ v_add_fx( sts[0]->hHQ_core->old_outLB_fx + nsLB, sts[1]->hHQ_core->old_outLB_fx + nsLB, hCPE->old_outLB_mdct_fx, old_outLB_len ); L_lerp_fx_q11( hCPE->old_outLB_mdct_fx, hCPE->old_outLB_mdct_fx, STEREO_MDCT2DFT_FADE_LEN_48k, old_outLB_len ); +#ifndef MSAN_FIX for ( int i = 0; i < STEREO_MDCT2DFT_FADE_LEN_48k; i++ ) +#else + FOR( int i = 0; i < old_outLB_len; i++ ) +#endif { hCPE->old_outLB_mdct_fx[i] = L_shr( hCPE->old_outLB_mdct_fx[i], 1 ); } v_add_fx( sts[0]->hHQ_core->oldOut_fx + ns, sts[1]->hHQ_core->oldOut_fx + ns, hCPE->old_out_mdct_fx, old_out_len ); +#ifndef MSAN_FIX for ( int i = 0; i < STEREO_MDCT2DFT_FADE_LEN_48k; i++ ) +#else + FOR( int i = 0; i < old_out_len; i++ ) +#endif { hCPE->old_out_mdct_fx[i] = L_shr( hCPE->old_out_mdct_fx[i], 1 ); }