diff --git a/lib_rend/ivas_dirac_dec_binaural_functions.c b/lib_rend/ivas_dirac_dec_binaural_functions.c index 04e02ca1038597c07a4e4826b2f7e36ad49206f1..4985fe0976981994cc82662e58dc7fa705ee71e5 100644 --- a/lib_rend/ivas_dirac_dec_binaural_functions.c +++ b/lib_rend/ivas_dirac_dec_binaural_functions.c @@ -1438,7 +1438,7 @@ static void ivas_dirac_dec_binaural_internal( floatToFixed_arr32( hDiracDecBin->earlyPartEneCorrection, hDiracDecBin->earlyPartEneCorrection_fx, q_earlyPartEneCorrection, hSpatParamRendCom->num_freq_bands ); floatToFixed_arr32( hDiracDecBin->diffuseFieldCoherence, hDiracDecBin->diffuseFieldCoherence_fx, Q31, hSpatParamRendCom->num_freq_bands ); - FOR( j = 0; j < CLDFB_NO_CHANNELS_MAX; j++ ) + FOR( j = 0; j < nBins; j++ ) { f2me( hDiracDecBin->ChCrossRePrev[j], &hDiracDecBin->ChCrossRePrev_fx[j], &hDiracDecBin->ChCrossRePrev_e[j] ); f2me( hDiracDecBin->ChCrossImPrev[j], &hDiracDecBin->ChCrossImPrev_fx[j], &hDiracDecBin->ChCrossImPrev_e[j] ); @@ -1543,7 +1543,7 @@ static void ivas_dirac_dec_binaural_internal( } } - FOR( j = 0; j < CLDFB_NO_CHANNELS_MAX; j++ ) + FOR( j = 0; j < nBins; j++ ) { hDiracDecBin->ChCrossRePrev[j] = me2f( hDiracDecBin->ChCrossRePrev_fx[j], hDiracDecBin->ChCrossRePrev_e[j] ); hDiracDecBin->ChCrossImPrev[j] = me2f( hDiracDecBin->ChCrossImPrev_fx[j], hDiracDecBin->ChCrossImPrev_e[j] ); @@ -6013,7 +6013,7 @@ static void ivas_masa_ext_rend_parambin_internal( hDiracDecBin->q_earlyPartEneCorrection = q_earlyPartEneCorrection; floatToFixed_arr32( hDiracDecBin->earlyPartEneCorrection, hDiracDecBin->earlyPartEneCorrection_fx, q_earlyPartEneCorrection, hSpatParamRendCom->num_freq_bands ); floatToFixed_arr32( hDiracDecBin->diffuseFieldCoherence, hDiracDecBin->diffuseFieldCoherence_fx, Q31, hSpatParamRendCom->num_freq_bands ); - FOR( j = 0; j < CLDFB_NO_CHANNELS_MAX; j++ ) + FOR( j = 0; j < nBins; j++ ) { f2me( hDiracDecBin->ChCrossRePrev[j], &hDiracDecBin->ChCrossRePrev_fx[j], &hDiracDecBin->ChCrossRePrev_e[j] ); f2me( hDiracDecBin->ChCrossImPrev[j], &hDiracDecBin->ChCrossImPrev_fx[j], &hDiracDecBin->ChCrossImPrev_e[j] ); @@ -6186,7 +6186,7 @@ static void ivas_masa_ext_rend_parambin_internal( } } - FOR( j = 0; j < CLDFB_NO_CHANNELS_MAX; j++ ) + FOR( j = 0; j < nBins; j++ ) { hDiracDecBin->ChCrossRePrev[j] = me2f( hDiracDecBin->ChCrossRePrev_fx[j], hDiracDecBin->ChCrossRePrev_e[j] ); hDiracDecBin->ChCrossImPrev[j] = me2f( hDiracDecBin->ChCrossImPrev_fx[j], hDiracDecBin->ChCrossImPrev_e[j] );