/* Delay Alignment in FX is done inside swb_tbe_enc_fx() */
FOR(i=j=0;i<length_half;i++)
@@ -5851,7 +5855,6 @@ void non_linearity_ivas_fx(
max_val=s_max(max_val,tmp);
}
IF(GT_16(max_val,shl_sat(1,Q_inp)))
{
exp=norm_s(max_val);
@@ -5866,6 +5869,7 @@ void non_linearity_ivas_fx(
sc_factor=s_max(sub(13,norm_s(add(j,1))),0);/* Adapt the scaling factor allowed depending of max position */
sc_factor=s_max(sc_factor,1);/* Note: The sc_factor is the log2 of the sc_factor in the float code to simplify condition below */
test();
IF(prev_scale<=0||GT_32(L_shr(prev_scale,sub(sc_factor,1)/*Q30 -> Q31*/),scale/*Q31*/))/* Since the sc_factor is the log2 of sc_factor in float, we apply it using L_shr */