Commit 40159e46 authored by multrus's avatar multrus
Browse files

Merge branch 'basop-2591-wrong-scaling-for-comparison-in-edge_detect_fx' into 'main'

[non-BE] Resolve "Wrong scaling for comparison in edge_detect_fx()"

Closes #2591

See merge request !3035
parents d8ba6bfb d6c016e7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -152,6 +152,7 @@
#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
@@ -1583,7 +1583,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();