Loading lib_enc/swb_bwe_enc_lr_fx.c +2 −3 Original line number Diff line number Diff line Loading @@ -175,10 +175,9 @@ static Word16 GetSubbandCorrIndex2_har_fx( /* o : L_corr_sq = L_mult_o( corr_sq_hi_fx, corr_sq_hi_fx, &Overflow ); /* (((Qhi:Qsh+exp_norm_hi-16)+Qss+1)+exp_norm-16)*2+1 */ #ifdef ISSUE_1799_replace_L_shr_o L_corr_sq = L_shr_sat( L_corr_sq, s_min( shl( exp_norm, 1 ), 31 ) ); /* (QCorr-16)*2+1 */ /* Catching an Overflow: solve MAX_32 = x / 2^y for integers x < 2^31 and y : /* Catching a false-positive Overflow: solve MAX_32 = x * 2^y for integers x < 2^31 and y : x has to be MAX_32 and y has to be 0 So, a saturated overflow has occured if the result is MAX_32 and y is != 0 THe case MIN_32 with negative x is not valid since x is calculated by square */ So, a saturated overflow has occured if the result is MAX_32 and y is != 0*/ test(); IF( L_corr_sq == MAX_32 && ( exp_norm < 0 ) ) { Loading Loading
lib_enc/swb_bwe_enc_lr_fx.c +2 −3 Original line number Diff line number Diff line Loading @@ -175,10 +175,9 @@ static Word16 GetSubbandCorrIndex2_har_fx( /* o : L_corr_sq = L_mult_o( corr_sq_hi_fx, corr_sq_hi_fx, &Overflow ); /* (((Qhi:Qsh+exp_norm_hi-16)+Qss+1)+exp_norm-16)*2+1 */ #ifdef ISSUE_1799_replace_L_shr_o L_corr_sq = L_shr_sat( L_corr_sq, s_min( shl( exp_norm, 1 ), 31 ) ); /* (QCorr-16)*2+1 */ /* Catching an Overflow: solve MAX_32 = x / 2^y for integers x < 2^31 and y : /* Catching a false-positive Overflow: solve MAX_32 = x * 2^y for integers x < 2^31 and y : x has to be MAX_32 and y has to be 0 So, a saturated overflow has occured if the result is MAX_32 and y is != 0 THe case MIN_32 with negative x is not valid since x is calculated by square */ So, a saturated overflow has occured if the result is MAX_32 and y is != 0*/ test(); IF( L_corr_sq == MAX_32 && ( exp_norm < 0 ) ) { Loading