Review usage of cx_e and cx_next_band_e in ivas_param_mc_dec_prepare_renderer()
Bug description
The usage of the exponents cx_e and cx_next_band_e in ivas_param_mc_dec_prepare_renderer() are at least confusing, for example in this code:
IF( hParamMC->hMetadataPMC->bAttackPresent && ( EQ_32( hParamMC->synthesis_conf, PARAM_MC_SYNTH_LS_CONV_COV ) || EQ_32( hParamMC->synthesis_conf, PARAM_MC_SYNTH_MONO_STEREO ) ) )
{
Word16 len = imult1616( nchan_transport, nchan_transport );
Word16 sc = s_min( getScaleFactor32( cx_fx, len ), getScaleFactor32( cx_next_band_fx, len ) );
IF( EQ_16( sc, 0 ) )
{
Scale_sig32( cx_fx, len, -Q1 ); // add one bit head room
Scale_sig32( cx_next_band_fx, len, -Q1 ); // add one bit head room
cx_e = add( cx_e, Q1 );
cx_next_band_e = add( cx_e, Q1 );
}
v_add_fx( cx_fx, cx_next_band_fx, cx_fx, len );
Copy32( cx_fx, cx_next_band_fx, len );
}
One should think that the line
cx_next_band_e = add( cx_e, Q1 );
should actually read
cx_next_band_e = add( cx_next_band_e, Q1 );
This should be checked.