pT60_filter_coeff[i]=L_shl_sat(params.pT60_filter_coeff_fx[i],17);// needed because calc_color_levels() uses 32-bit representaion of T60_filter_coefficients
exp_argument_fx=BASOP_Util_Divide3232_Scale_newton(delay_diff_fx,L_tmp,&tmp_exp);// exp_argument_L_fx in Q30 (not alwys, because tmp_exp values are not constant)
exp_argument_fx=L_shr_sat(exp_argument_fx,sub(6,tmp_exp));// exp_argument_L_fx in Q26
tmp=Mpy_32_32(96817114,exp_argument_fx);//Q21 -> multiplication of Q26 by Q26 // x * 1/ln(2) it is ensured that exp_argument_fx is always in Q26
tmp=Mpy_32_32(96817114,exp_argument_fx);//Q21
L_tmp=BASOP_util_Pow2(tmp,10,&pow_exp);// Q28 -> not always, because pow_exp is not fixed
L_tmp=Mpy_32_32(L_tmp,output_ene_fx[idx]);// Q27 if result of previous step is in Q28
L_tmp=L_shl_sat(L_tmp,add(1,pow_exp));// L_tmp in Q31
L_tmp=BASOP_util_Pow2(tmp,10,&pow_exp);
L_tmp=Mpy_32_32(L_tmp,output_ene_fx[idx]);
L_tmp=L_shl_sat(L_tmp,add(1,pow_exp));//Q31
// Assign energy to output pointer
pOutput_ene[idx]=L_tmp;
pOutput_ene[idx]=L_tmp;//Q31
move32();
// Assign t60 to output pointer
pOutput_t60[idx]=output_t60_fx[idx];// Q26
}
ivas_reverb_set_energies(hHrtfStatistics->average_energy_l,hHrtfStatistics->average_energy_r,output_Fs,avg_pwr_left_fx,avg_pwr_right_fx);// This function returns avg powers for left and right in Q28 -> why?? how??