Commit 3c9aa7c2 authored by Fabian Bauer's avatar Fabian Bauer
Browse files

lib_enc/swb_bwe_enc_lr_fx.c : GetSubbandCorrIndex2_har_fx(() : keep L_shr_o, fix instrumentation

parent fa6526fc
Loading
Loading
Loading
Loading
Loading
+5 −16
Original line number Diff line number Diff line
@@ -173,26 +173,15 @@ static Word16 GetSubbandCorrIndex2_har_fx( /* o :
            corr_sq_hi_fx = extract_h( L_corr_sq );

            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 :
                x = MAX_32 && y == 0
                So, a saturated overflow has occured if the result is MAX_32 and y != 0 OR x != MAX_32*/
            test();
            IF( L_corr_sq == MAX_32 && ( exp_norm < 0 ) )
            {
                Overflow = 1;
            }
#else
            L_corr_sq = L_shr_o( L_corr_sq, s_min( shl( exp_norm, 1 ), 31 ), &Overflow ); /* (QCorr-16)*2+1 */
#endif
            IF( Overflow != 0 )
            if( Overflow != 0 )
            {
                L_corr_sq = 0x0L;
                move16();
                move32();
            }

            Overflow = 0;
            move16();
            }

            /* normalize for L_lagCorr_sq and L_corr_sq */
            L_buf = L_or( L_lagCorr_sq, L_corr_sq );