Commit f6dc3f4c authored by Manuel Jander's avatar Manuel Jander
Browse files

Merge remote-tracking branch 'origin' into basop-2493-usage-of-extract_l-with-values-out-of-range

parents aad8e88d 6dd0ecbe
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -163,6 +163,8 @@
#define FIX_ISSUE_1966_F0_32BIT                         /* FhG: Basop issue 1966: use 32-bit variables for F0 and thresholdModification */
#define FIX_BASOP_2519_TCA_LA_ZERO_EXP                  /* FhG: BASOP #2519: Exclude zero samples from exp_com calculation in tcaTargetCh_LA_fx */
#define FIX_BASOP_2519_ICBWE_DEC_Q_TRACK                /* FhG: BASOP #2519: Track Q-format of dec_2over3_mem_fx across frames in stereo_icBWE_preproc_fx */
#define FIX_BASOP_2592_OVERFLOW                         /* FhG: BASOP #2592: fix overflow in GetF0() */
#define FIX_BASOP_2591_EDGE_DETECT_COMP                 /* FhG: BASOP #2591: Wrong comparison in edge_detect_fx() */

/* ##################### End NON-BE switches ########################### */

+4 −0
Original line number Diff line number Diff line
@@ -473,7 +473,11 @@ static void GetF0(
        {
            Word16 tmp_32 = 0;
            Word32 F0_32 = BASOP_Util_Divide3232_Scale_newton( L_shl( nSamplesCore, Q16 ), tmpPitchLag, &tmp_32 );
#ifdef FIX_BASOP_2592_OVERFLOW
            F0_32 = L_shl_sat( F0_32, tmp_32 - Q16 ); /* saturation needed to allow 0x40000000 << 1 */
#else
            F0_32 = L_shl( F0_32, tmp_32 - Q16 );
#endif
            *pF0_32 = F0_32;
            move32();
            *pOrigF0_32 = *pF0_32; /*Q26*/
+4 −0
Original line number Diff line number Diff line
@@ -1587,7 +1587,11 @@ static void edge_detect_fx(
        set_zero_fx( edge, EDGE_MAX_LEN );

        /* set error at 0th index */
#ifdef FIX_BASOP_2591_EDGE_DETECT_COMP
        IF( GT_32( L_shr( inp[0], 3 ), inp_max ) )
#else
        IF( GT_32( L_shr( inp[0], 6 ), inp_max ) )
#endif
        {
            err0 = 0;
            move32();
+6 −6
Original line number Diff line number Diff line
@@ -1310,8 +1310,8 @@ void stereo_icBWE_preproc_fx(
                IF( NE_16( hStereoICBWE->q_dec_2over3_mem_fx, hStereoICBWE->q_dataChan_fx ) )
                {
                    Word16 scf = sub( hStereoICBWE->q_dataChan_fx, hStereoICBWE->q_dec_2over3_mem_fx );
                    scale_sig( hStereoICBWE->dec_2over3_mem_fx, L_FILT_2OVER3, scf );
                    scale_sig( hStereoICBWE->dec_2over3_mem_lp_fx, L_FILT_2OVER3_LP, scf );
                    Scale_sig( hStereoICBWE->dec_2over3_mem_fx, L_FILT_2OVER3, scf );
                    Scale_sig( hStereoICBWE->dec_2over3_mem_lp_fx, L_FILT_2OVER3_LP, scf );
                    hStereoICBWE->q_dec_2over3_mem_fx = hStereoICBWE->q_dataChan_fx;
                    move16();
                }
@@ -1341,8 +1341,8 @@ void stereo_icBWE_preproc_fx(
                IF( NE_16( hStereoICBWE->q_dec_2over3_mem_fx, hStereoICBWE->q_dataChan_fx ) )
                {
                    Word16 scf = sub( hStereoICBWE->q_dataChan_fx, hStereoICBWE->q_dec_2over3_mem_fx );
                    scale_sig( hStereoICBWE->dec_2over3_mem_fx, L_FILT_2OVER3, scf );
                    scale_sig( hStereoICBWE->dec_2over3_mem_lp_fx, L_FILT_2OVER3_LP, scf );
                    Scale_sig( hStereoICBWE->dec_2over3_mem_fx, L_FILT_2OVER3, scf );
                    Scale_sig( hStereoICBWE->dec_2over3_mem_lp_fx, L_FILT_2OVER3_LP, scf );
                    hStereoICBWE->q_dec_2over3_mem_fx = hStereoICBWE->q_dataChan_fx;
                    move16();
                }
@@ -1434,8 +1434,8 @@ void stereo_icBWE_preproc_fx(
        IF( NE_16( hStereoICBWE->q_dec_2over3_mem_fx, hStereoICBWE->q_dataChan_fx ) )
        {
            Word16 scf = sub( hStereoICBWE->q_dataChan_fx, hStereoICBWE->q_dec_2over3_mem_fx );
            scale_sig( hStereoICBWE->dec_2over3_mem_fx, L_FILT_2OVER3, scf );
            scale_sig( hStereoICBWE->dec_2over3_mem_lp_fx, L_FILT_2OVER3_LP, scf );
            Scale_sig( hStereoICBWE->dec_2over3_mem_fx, L_FILT_2OVER3, scf );
            Scale_sig( hStereoICBWE->dec_2over3_mem_lp_fx, L_FILT_2OVER3_LP, scf );
            hStereoICBWE->q_dec_2over3_mem_fx = hStereoICBWE->q_dataChan_fx;
            move16();
        }