tmp_ene=(L_add(avg_pwr_left_fx[idx],avg_pwr_right_fx[idx]))>>1;// Or Madd32_32()??
// Step 3 : multiply temp variable by gain, with appropriate scaling for Q31 and Q16 multiplication
tmp_ene=Mpy_32_32(tmp_ene,dmx_gain_2_fx);// Mpy_32_32_ss multiplies two 32 bit numberrs in 64-bit with saturation or L_mult -> outputs word16
tmp_ene=Mpy_32_32(tmp_ene,dmx_gain_2_fx);// Mpy_32_32_ss multiplies two 32 bit numberrs in 64-bit with saturation or L_mult -> outputs word16 // Qfactor of tmp_ene?? dmx_gain_2_fx is in Q16
// incomplete implentation
// Step 4 : multiply step 3 result with output energy