@@ -1053,6 +1053,10 @@ Word16 SQ_gain_estimate_fx( /* output: SQ gain
Word32tmp=0,tmpp=0;
move32();
move32();
#ifdef OPT_MCT_ENC_V3_NBE
Word64ener64_fx;
Word16tmp_exp;
#endif
/* tmp = 0.5f * (float) log10( (float) lg / (float) NORM_MDCT_FACTOR ) + + 0.94f; lowest gain + expected value of the quantization noise energy per quadruple (log10(4/12)) in Q16*/
/* tmpp = 0.5f * (float) log10( (float) lg / (float) NORM_MDCT_FACTOR ) * log2(10) in Q16 */
@@ -1166,9 +1170,21 @@ Word16 SQ_gain_estimate_fx( /* output: SQ gain
lg_4=shr(lg,2);
#ifdef OPT_MCT_ENC_V3_NBE
tmp_exp=shl(x_e,1);
#endif
/* SNR of quadruples for unit step quantizer and lowest possible gain */