Commit 3d0146a0 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

[cleanup] accept NONBE_FIX_947_STEREO_DMX_EVS_POC

parent 65c920be
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -114,10 +114,7 @@
#define FIX_699_FILE_READER_JBM_TSM                     /* VA: issue 699: complement FileReader_getFilePath() logic for TSM and JBM */
#define FIX_997_REMOVE_SPAR_DEC_UPMIXER                 /* VA: issue 997: remove obsolete function ivas_spar_dec_upmixer() */

#define NONBE_FIX_947_STEREO_DMX_EVS_POC                      /* Orange: Fix clicks on POC */
#ifdef NONBE_FIX_947_STEREO_DMX_EVS_POC
#define NONBE_FIX_947_STEREO_DMX_ROMOPT                       /* Orange: ROM optimisation for POC*/  
#endif
#define NONBE_FIX_947_STEREO_DMX_EVS_PHA                      /* Orange: Fix issues on PHA */
#ifdef NONBE_FIX_947_STEREO_DMX_EVS_PHA
#define NONBE_FIX_947_STEREO_DMX_FADOPT                       /* Orange: Fading optimisation */  
+0 −6
Original line number Diff line number Diff line
@@ -111,7 +111,6 @@ extern const UWord16 ECSQ_tab_vals[ECSQ_PARAM_COUNT - 1][1 + ECSQ_TAB_VALS_SIZE]
/*----------------------------------------------------------------------------------*
 * Stereo downmix to EVS ROM tables
 *----------------------------------------------------------------------------------*/
#ifdef NONBE_FIX_947_STEREO_DMX_EVS_POC
#ifdef NONBE_FIX_947_STEREO_DMX_ROMOPT
extern const Word32 Stereo_dmx_s_wnd_coef_16k_fx[L_FRAME16k >> 2];
extern const Word32 Stereo_dmx_s_wnd_coef_32k_fx[L_FRAME32k >> 2];
@@ -121,11 +120,6 @@ extern const Word32 Stereo_dmx_s_wnd_coef_16k_fx[L_FRAME16k >> 1];
extern const Word32 Stereo_dmx_s_wnd_coef_32k_fx[L_FRAME32k >> 1];
extern const Word32 Stereo_dmx_s_wnd_coef_48k_fx[L_FRAME48k >> 1];
#endif
#else
extern const Word32 Stereo_dmx_s_wnd_coef_16k_fx[L_FRAME16k >> 4];
extern const Word32 Stereo_dmx_s_wnd_coef_32k_fx[L_FRAME32k >> 4];
extern const Word32 Stereo_dmx_s_wnd_coef_48k_fx[L_FRAME48k >> 4];
#endif
extern const Word32 Stereo_dmx_wnd_coef_32k_fx[L_FRAME32k];
extern const Word32 Stereo_dmx_wnd_coef_48k_fx[L_FRAME48k];
/*----------------------------------------------------------------------------------*
+0 −24
Original line number Diff line number Diff line
@@ -509,7 +509,6 @@ const Word32 ari_bit_estimate_s17_LC_fx[RANGE_N_CONTEXT][RANGE_N_SYMBOLS] = // Q
 * Stereo downmix to EVS ROM tables
 *----------------------------------------------------------------------------------*/

#ifdef NONBE_FIX_947_STEREO_DMX_EVS_POC

#ifdef NONBE_FIX_947_STEREO_DMX_ROMOPT
// Q31
@@ -677,29 +676,6 @@ const Word32 ari_bit_estimate_s17_LC_fx[RANGE_N_CONTEXT][RANGE_N_SYMBOLS] = // Q
 };
#endif

#else
// Q31
const Word32 Stereo_dmx_s_wnd_coef_16k_fx[L_FRAME16k >> 4] = {
    3309988, 29667578, 81733728, 158226416, 257262128, 376402368, 512713184, 662838656, 823081792, 989497088,
    1157986560, 1324401920, 1484645120, 1634770560, 1771081600, 1890221568, 1989257344, 2065750016, 2117816064, 2144173568
};
// Q31
const Word32 Stereo_dmx_s_wnd_coef_32k_fx[L_FRAME32k >> 4] = {
    827816, 7442688, 20631648, 40313376, 66366540, 98630536, 136906352, 180958112, 230514208, 285269056,
    344885056, 408994752, 477202848, 549088896, 624209472, 702101440, 782284928, 864265344, 947537088, 1031587008,
    1115896832, 1199946752, 1283218432, 1365198592, 1445382400, 1523274368, 1598395136, 1670280960, 1738488832, 1802598528,
    1862214528, 1916969472, 1966525568, 2010577280, 2048853120, 2081117056, 2107170304, 2126851968, 2140040960, 2146655872
};
// Q31
const Word32 Stereo_dmx_s_wnd_coef_48k_fx[L_FRAME48k >> 4] = {
    367944, 3309988, 9186011, 17979908, 29667578, 44216976, 61588232, 81733728, 104598264, 130119136,
    158226416, 188843056, 221885136, 257262128, 294876992, 334626720, 376402368, 420089216, 465567840, 512713184,
    561396544, 611484032, 662838656, 715319488, 768782656, 823081792, 878067904, 933590528, 989497088, 1045634688,
    1101849216, 1157986560, 1213893504, 1269415808, 1324401920, 1378700928, 1432164224, 1484645120, 1535999488, 1586087424,
    1634770560, 1681915904, 1727394560, 1771081600, 1812856960, 1852606720, 1890221568, 1925598592, 1958640640, 1989257344,
    2017364480, 2042885504, 2065750016, 2085895424, 2103266688, 2117816064, 2129503616, 2138297728, 2144173568, 2147115776
};
#endif

// Q31
const Word32 Stereo_dmx_wnd_coef_32k_fx[L_FRAME32k] = {
+0 −46
Original line number Diff line number Diff line
@@ -1987,7 +1987,6 @@ static void weighted_ave_fx(
    const Word32 wnd_fx[]     /* i  : window coef                 Q31   */
)
{
#ifdef NONBE_FIX_947_STEREO_DMX_EVS_POC

#ifdef NONBE_FIX_947_STEREO_DMX_ROMOPT
    Word16 i, j, len, len2;
@@ -2035,26 +2034,6 @@ static void weighted_ave_fx(
    }
#endif

#else

    Word16 i, len;
    Word32 gain_tmp_fx = 0, gain_sub_fx;
    move32();
    len = shr( input_frame, 4 );
    gain_sub_fx = L_sub( gain_fx, old_gain_fx );
    FOR( i = 0; i < len; i++ )
    {
        gain_tmp_fx = L_add( old_gain_fx, Mpy_32_32( gain_sub_fx, wnd_fx[i] ) );                                              // Q31
        dst_fx[i] = L_add_sat( Mpy_32_32( src1_fx[i], gain_tmp_fx ), Mpy_32_32( src2_fx[i], L_sub( MAX_32, gain_tmp_fx ) ) ); // Q16
        move32();
    }
    FOR( ; i < input_frame; i++ )
    {
        dst_fx[i] = L_add_sat( Mpy_32_32( src1_fx[i], gain_fx ), Mpy_32_32( src2_fx[i], L_sub( MAX_32, gain_tmp_fx ) ) ); // Q16
        move32();
    }

#endif

    return;
}
@@ -2246,7 +2225,6 @@ static void adapt_gain_fx(
    const Word32 wnd_fx[]     /* i  : window coef                  Q31  */
)
{
#ifdef NONBE_FIX_947_STEREO_DMX_EVS_POC

#ifdef NONBE_FIX_947_STEREO_DMX_ROMOPT
    Word16 i, j, len, len2;
@@ -2298,30 +2276,6 @@ static void adapt_gain_fx(
    }
#endif

#else

    Word16 i, len;
    Word32 gain_tmp_fx, gain_sub_fx;

    len = shr( input_frame, 4 );

    //  gain_sub = gain - old_gain;
    gain_sub_fx = L_sub( gain_fx, old_gain_fx ); // Q31

    FOR( i = 0; i < len; i++ )
    {
        //  gain_tmp = old_gain + gain_sub * wnd[i];
        gain_tmp_fx = L_add( old_gain_fx, Mpy_32_32( gain_sub_fx, wnd_fx[i] ) ); // Q31                                                                          //  dst[i] = src[i] * gain_tmp;
        dst_fx[i] = Mpy_32_32( src_fx[i], gain_tmp_fx );                         // Q16
        move32();
    }
    FOR( ; i < input_frame; i++ )
    {
        //  dst[i] = src[i] * gain;
        dst_fx[i] = Mpy_32_32( src_fx[i], gain_fx ); // Q16
        move32();
    }
#endif

    return;
}