Unverified Commit 630ac53c authored by norvell's avatar norvell
Browse files

Added FIX_BASOP_2563_CRASH_HQ_GENERIC_DEC to resolve basop issue 2563

parent 8ff889f8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -107,6 +107,7 @@
#define FIX_BASOP_2555_FRAMELEN_CALC                    /* FhG: BASOP issue 2555: Simplify (sub-)framelength calculation in ivas_mdct_core_tns_ns_fx() */
#define FIX_BASOP_2095_REMOVE_TABLES_PT01               /* FhG: BASOP issue 2095: remove unused tables, part 01 */
#define FIX_2346_DUPLICATED_IGF_FUNCTIONS_2             /* FhG: part 2 of basop issue 2346: Review potentially duplicated IGF functions */
#define FIX_BASOP_2563_CRASH_HQ_GENERIC_DEC             /* Eri: BASOP issue 2563: Crash in hq_generic decoding. EVS code --> solve with _sat operator */

/* #################### End BE switches ################################## */

+5 −1
Original line number Diff line number Diff line
@@ -2748,7 +2748,11 @@ void hq_generic_decoding_fx(
    tmp1_fx = extract_h( L_shl( L_tmp1, exp1 ) );
    tmp2_fx = extract_h( L_shl( L_tmp2, exp2 ) );
    tmp3_fx = div_s( tmp2_fx, tmp1_fx ); /*15 + exp2 + 15 - (exp1 + 15) */
#ifdef FIX_BASOP_2563_CRASH_HQ_GENERIC_DEC
    tmp3_fx = shr_sat( tmp3_fx, add( 5, sub( exp2, exp1 ) ) ); /*10 */
#else
    tmp3_fx = shr( tmp3_fx, add( 5, sub( exp2, exp1 ) ) ); /*10 */
#endif

    if ( LT_16( tmp3_fx, 307 /*0.3 in Q10 */ ) )
    {