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

add NONBE_FIX_2493_CHECK_EXTRACT_L_bw_detect_fx and specify which fixes use...

add NONBE_FIX_2493_CHECK_EXTRACT_L_bw_detect_fx and specify which fixes use saturation and which not.
parent 1c908092
Loading
Loading
Loading
Loading
Loading
+11 −10
Original line number Diff line number Diff line
@@ -145,22 +145,23 @@
#define FIX_2493_CHECK_64BIT                            /* FhG: Verify that 64 bit ops do not encounter an overflow. */
// #define FIX_2493_CHECK_EXTRACT_L_EVS                    /* FhG: Verify that extract_l, W_extract_l etc. do not encounter an overflow for EVS only modes. */
#define NONBE_FIX_2493_CHECK_EXTRACT_L_estDownmixGain_fx /* FhG: Fix extract_l overflow inside estDownmixGain_fx() */
#define NONBE_FIX_2493_CHECK_EXTRACT_L_swb_pre_proc_fx  /* FhG: Fix extract_l overflow inside swb_pre_proc_fx() */
#define NONBE_FIX_2493_EXTRACT_L_spectral_balancer_fx16 /* FhG: Fix extract_l overflow inside spectral_balancer_fx16() */
#define NONBE_FIX_2493_EXTRACT_L_IGF_CalculateStereoEnvelope_fx /* FhG: Fix extract_l overflow inside IGF_CalculateStereoEnvelope_fx() */
#define NONBE_FIX_2493_CHECK_EXTRACT_L_GetTCXMaxenergyChange_fx /* FhG: Fix extract_l overflow inside GetTCXMaxenergyChange_fx() */
#define NONBE_FIX_2493_CHECK_EXTRACT_L_swb_pre_proc_fx  /* FhG: Fix extract_l overflow inside swb_pre_proc_fx(). Saturation, not a optimal fix. */
#define NONBE_FIX_2493_EXTRACT_L_spectral_balancer_fx16 /* FhG: Fix extract_l overflow inside spectral_balancer_fx16(). Saturation, not a optimal fix. */
#define NONBE_FIX_2493_EXTRACT_L_IGF_CalculateStereoEnvelope_fx /* FhG: Fix extract_l overflow inside IGF_CalculateStereoEnvelope_fx(). Was completely wrong. */
#define NONBE_FIX_2493_CHECK_EXTRACT_L_GetTCXMaxenergyChange_fx /* FhG: Fix extract_l overflow inside GetTCXMaxenergyChange_fx(). Saturation, not a optimal fix. */
#define NONBE_FIX_2493_CHECK_EXTRACT_L_res_bpf_adapt_ivas_fx /* FhG: Fix extract_l overflow inside res_bpf_adapt_ivas_fx() */
#define NONBE_FIX_2493_CHECK_EXTRACT_L_ivas_core_dec_fx  /* FhG: Fix extract_l overflow inside ivas_core_dec_fx() */
#define NONBE_FIX_2493_CHECK_EXTRACT_L_ivas_core_dec_fx  /* FhG: Fix extract_l overflow inside ivas_core_dec_fx(). Saturation, not a optimal fix. */
#define NONBE_FIX_2493_CHECK_EXTRACT_L_d_syn_filt_fx     /* FhG: Fix extract_l overflow inside d_syn_filt_fx(). W_shr( x, s ) with s out of range problem. */
#define NONBE_FIX_2493_CHECK_EXTRACT_L_EnhanceClass_fx  /* FhG: Fix extract_l overflow inside EnhanceClass_fx() (EVS) */
#define NONBE_FIX_2493_CHECK_EXTRACT_L_decoder_tcx_post_fx /* FhG: Fix extract_l overflow inside decoder_tcx_post_fx() (EVS) */
#define NONBE_FIX_2493_CHECK_EXTRACT_L_WB_BWE_gain_pred_fx /* FhG: Fix extract_l overflow inside WB_BWE_gain_pred_fx() (EVS) */
#define NONBE_FIX_2493_CHECK_EXTRACT_L_cftmdl_16fx      /* FhG: Fix extract_l overflow inside cftmdl_16fx() (EVS) */
#define NONBE_FIX_2493_CHECK_EXTRACT_L_EnhanceClass_fx  /* FhG: Fix extract_l overflow inside EnhanceClass_fx() (EVS). Saturation, not a optimal fix. */
#define NONBE_FIX_2493_CHECK_EXTRACT_L_decoder_tcx_post_fx /* FhG: Fix extract_l overflow inside decoder_tcx_post_fx() (EVS). Saturation, not a optimal fix. */
#define NONBE_FIX_2493_CHECK_EXTRACT_L_WB_BWE_gain_pred_fx /* FhG: Fix extract_l overflow inside WB_BWE_gain_pred_fx() (EVS). Saturation, not a optimal fix. */
#define NONBE_FIX_2493_CHECK_EXTRACT_L_cftmdl_16fx      /* FhG: Fix extract_l overflow inside cftmdl_16fx() (EVS). Saturation, not a optimal fix. */
#define NONBE_FIX_2493_EXTRACT_L_acelp_core_dec_fx      /* FhG: Fix extract_l overflow inside acelp_core_dec_fx() */
#define NONBE_FIX_2493_CHECK_EXTRACT_L_E_LPC_a_isp_conversion /* FhG: Fix extract_l overflow inside E_LPC_a_isp_conversion() (EVS) */
#define NONBE_FIX_2493_CHECK_EXTRACT_L_acelp_fast_fx    /* FhG: Fix extract_l overflow inside acelp_fast_fx() */
#define NONBE_FIX_2493_CHECK_EXTRACT_L_acelp_fast_fx    /* FhG: Fix extract_l overflow inside acelp_fast_fx(). Saturation, not a optimal fix. */
#define NONBE_FIX_2493_CHECK_EXTRACT_L_envelop_modify_fx /* FhG: Fix extract_l overflow inside envelop_modify_fx() */
#define NONBE_FIX_2493_CHECK_EXTRACT_L_swb_tbe_enc_fx   /* FhG: Fix extract_l overflow inside swb_tbe_enc_fx() */
#define NONBE_FIX_2493_CHECK_EXTRACT_L_bw_detect_fx     /* FhG: Fix extract_l overflow inside bw_detect_fx(). Saturation, not a optimal fix. */
#define FIX_2493_FIX_ISSUE_1966_F0_32BIT                /* Fhg: Fix saturation that popped up from FIX_ISSUE_1966_F0_32BIT  */
#define FIX_2493_CHECK_EXTRACT_L_FIX_INSTRUMENTATION    /* FhG: BE instrumentation fix */
#define FIX_2584_TD_SM_ISSUE                            /* VA: Fix inconsistencies in the SM part of the TD stereo */
+7 −0
Original line number Diff line number Diff line
@@ -413,6 +413,12 @@ void bw_detect_fx(
            cldfb_ener_offset_32 = L_deposit_l( cldfb_ener_offset );       /* Q14 in 32bit var */
            cldfb_ener_offset_32 = L_shl( cldfb_ener_offset_32, 25 - 14 ); /* Q14 -> Q25 */

#ifdef NONBE_FIX_2493_CHECK_EXTRACT_L_bw_detect_fx
            mean_NB = extract_h( L_shr_sat( L_add( mean_NB32, cldfb_ener_offset_32 ), 25 - 11 - 16 ) ); /* (Q25 + Q25) -> Q11 */
            max_NB = extract_h( L_shr_sat( L_add( max_NB32, cldfb_ener_offset_32 ), 25 - 11 - 16 ) );   /* (Q25 + Q25) -> Q11 */
            mean_WB = extract_h( L_shr_sat( L_add( mean_WB32, cldfb_ener_offset_32 ), 25 - 11 - 16 ) ); /* (Q25 + Q25) -> Q11 */
            max_WB = extract_h( L_shr_sat( L_add( max_WB32, cldfb_ener_offset_32 ), 25 - 11 - 16 ) );   /* (Q25 + Q25) -> Q11 */
#else
#ifdef FIX_2493_CHECK_EXTRACT_L
            mean_NB = extract_l2( L_shr( L_add( mean_NB32, cldfb_ener_offset_32 ), 25 - 11 ) ); /* (Q25 + Q25) -> Q11 */
            max_NB = extract_l2( L_shr( L_add( max_NB32, cldfb_ener_offset_32 ), 25 - 11 ) );   /* (Q25 + Q25) -> Q11 */
@@ -423,6 +429,7 @@ void bw_detect_fx(
            max_NB = extract_l( L_shr( L_add( max_NB32, cldfb_ener_offset_32 ), 25 - 11 ) );   /* (Q25 + Q25) -> Q11 */
            mean_WB = extract_l( L_shr( L_add( mean_WB32, cldfb_ener_offset_32 ), 25 - 11 ) ); /* (Q25 + Q25) -> Q11 */
            max_WB = extract_l( L_shr( L_add( max_WB32, cldfb_ener_offset_32 ), 25 - 11 ) );   /* (Q25 + Q25) -> Q11 */
#endif
#endif

            /*if WB */