diff --git a/lib_com/options.h b/lib_com/options.h index 09300d64f7d59afe202b47e3bf508583a9f41d2a..ac427455ffd6c55148b0ba3af0ab0942a6ae4591 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -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 ########################### */ diff --git a/lib_enc/ivas_stereo_classifier_fx.c b/lib_enc/ivas_stereo_classifier_fx.c index 621a00bd4b41784868b153a945ba844fa2c196f1..f38e7c9158f2670e404024ab06782860335b4334 100644 --- a/lib_enc/ivas_stereo_classifier_fx.c +++ b/lib_enc/ivas_stereo_classifier_fx.c @@ -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();