Commit 581b1f30 authored by multrus's avatar multrus
Browse files

[cleanup] accept NONBE_MR2809

parent 959de23e
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -94,7 +94,6 @@
/* #################### Start NON-BE switches ############################ */
/* any switch which is non-be wrt. TS 26.251 V3.0 */

#define NONBE_MR2809
#define FIX_2432_ISM_SPIKES_16KHZ                       /* VA: basop issue 2432: fix spikes in ISM decoding at 16kHz output sampling rate */
#define FIX_2448_RENDERER_MSAN_ERROR                    /* FhG: basop issue 2448: fix MSAN error with MSA rendering */
#define FIX_2283_ISM_MD_DELAY                           /* Dolby: Fix ISM metadata delay round-off */
+0 −5
Original line number Diff line number Diff line
@@ -50,13 +50,8 @@ extern const Word32 unclr_coef_td[];

extern const Word16 xtalk_isel_td[];
extern const Word32 xtalk_mean_td[];
#ifdef NONBE_MR2809
extern const Word32 xtalk_factor_td_m[];
extern const Word16 xtalk_factor_td_e[];
#else
extern const Word32 xtalk_scale_td[];
extern const Word32 xtalk_coef_td[];
#endif
extern const Word16 xtalk_isel_dft[];
extern const Word32 xtalk_mean_dft_q15[];
extern const Word32 xtalk_scale_dft_q15[];
+0 −12
Original line number Diff line number Diff line
@@ -98,7 +98,6 @@ const Word32 xtalk_mean_td[SIZE_XTALK_ISEL_TD] = /*Q15*/
    19572, 4323, 44674958, 20928, 248554, 5077, 123099, 19205, 217973, 57391, 22648, 21, 23142, 342411, 59, 612, -71224
};

#ifdef NONBE_MR2809
const Word32 xtalk_factor_td_m[SIZE_XTALK_ISEL_TD] =
{
    1699245373, 1831181873, 1809297797, -1237097441, 1524499779, 1779553202, -1210195954, 1749773419,
@@ -109,17 +108,6 @@ const Word16 xtalk_factor_td_e[SIZE_XTALK_ISEL_TD] =
{
    -4, 1, -12, -1, -7, -2, -5, -4, 0, 0, -2, 6, -2, -11, 11, -7, -1
};
#else
const Word32 xtalk_scale_td[SIZE_XTALK_ISEL_TD] = /*Q15*/
{
    37220, 2553, 16147962, 18786, 191263, 13110, 139310, 20547, 45408, 60617, 17627, 43, 9123, 2070239, 88, 21549, 68968
};

const Word32 xtalk_coef_td[SIZE_XTALK_ISEL_TD] = /*Q15*/
{
    1841, 4353, 3322, -5411, 1061, 2716, -2453, 1046, 45199, -51474, -2431, -2245, 2194, -542, -135853, 99, 18138
};
#endif
const Word16 xtalk_isel_dft[SIZE_XTALK_ISEL_DFT] = 
{ 
    E_clas, E_gainILD, E_gainIPD, E_angle_rot, E_g_pred, E_d_prodL_prodR, E_sum_xcorr, E_xcorr_itd_value, E_gphat_d_itd2, E_gphat_ratio_m1_m2, E_gphat_m2_m2 
+0 −13
Original line number Diff line number Diff line
@@ -842,11 +842,7 @@ void stereo_classifier_features_ivas_fx(
    ELSE
    {
        hStereoClassif->xtalk_fv_fx[E_d_ps_diff] = L_abs( L_sub( L_shr( hStereoClassif->ps_diff_ch1_fx, sub( 16, hStereoClassif->ps_diff_ch1_e ) ) /*q15*/, L_shr( hStereoClassif->ps_diff_ch2_fx, sub( 16, hStereoClassif->ps_diff_ch2_e ) ) /*q15*/ ) ); /*q15*/
#ifdef NONBE_MR2809
        hStereoClassif->xtalk_fv_fx[E_d_ps_sta] = L_abs( L_sub( L_shr( hStereoClassif->ps_sta_ch1_fx, sub( 16, hStereoClassif->ps_sta_ch1_e ) ) /*q15*/, L_shr( hStereoClassif->ps_sta_ch2_fx, sub( 16, hStereoClassif->ps_sta_ch2_e ) ) /*q15*/ ) ); /*q15*/
#else
        hStereoClassif->xtalk_fv_fx[E_d_ps_sta] = L_abs( L_sub( L_shr( hStereoClassif->ps_sta_ch1_fx, sub( 16, hStereoClassif->ps_sta_ch1_e ) ) /*q15*/, L_shr( hStereoClassif->ps_sta_ch2_fx, sub( 16, hStereoClassif->ps_sta_ch1_e ) ) /*q15*/ ) ); /*q15*/
#endif
    }
    move32();
    move32();
@@ -1150,21 +1146,12 @@ void xtalk_classifier_td_fx(
        move16();

        /* mean & std removal */
#ifdef NONBE_MR2809
        fvn = L_sub( hStereoClassif->xtalk_fv_fx[ind], xtalk_mean_td[i] );
        fvn = Mpy_32_32( fvn, xtalk_factor_td_m[i] ); // exp = 16 + 20 = 36
        exp = add( 16, xtalk_factor_td_e[i] );

        /* LR */
        score = BASOP_Util_Add_Mant32Exp( score, score_exp, fvn, exp, &score_exp );
#else
        fvn = BASOP_Util_Divide3232_Scale_newton( L_sub( hStereoClassif->xtalk_fv_fx[ind], xtalk_mean_td[i] ), xtalk_scale_td[i], &exp );
        fvn = Mpy_32_32( fvn, xtalk_coef_td[i] ); // Q = 31-exp+15-31 = 15-exp
        exp = add( exp, 16 );                     // exp = 31-(15-exp) = 16+exp

        /* LR */
        score = BASOP_Util_Add_Mant32Exp( score, score_exp, fvn, exp, &score_exp );
#endif
    }

    score = L_shl_sat( score, sub( score_exp, 3 ) ); // Q28
+0 −2
Original line number Diff line number Diff line
@@ -2040,12 +2040,10 @@ void stereo_tca_enc_fx(
    move16();
    sts[1]->q_inp32 = input_mem_loc_q;
    move16();
#ifdef NONBE_MR2809
    sts[0]->q_old_inp32 = input_mem_loc_q;
    move16();
    sts[1]->q_old_inp32 = input_mem_loc_q;
    move16();
#endif

    icaMemUpdate_fx( sts, hCPE, input_mem_loc_fx[0], input_mem_loc_fx[1], input_mem_loc_q, lMemRecalc, lMemRecalc_SCh, input_frame );