Commit 34450602 authored by Arthur Tritthart's avatar Arthur Tritthart
Browse files

Merge branch 'main' of https://forge.3gpp.org/rep/sa4/audio/ivas-basop into...

Merge branch 'main' of https://forge.3gpp.org/rep/sa4/audio/ivas-basop into 1744-use-of-divide3232-with-restricted-call-parameters-l_num-l_denom
parents df97c617 07f95b5e
Loading
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -75,6 +75,9 @@
#define FIX_1379_MASA_ANGLE_ROUND

/* Note: each compile switch (FIX_1101_...) is independent from the other ones */
#define OPT_SBA_REND_V1_BE
#define OPT_HEAD_ROT_REND_V1_BE
#define OPT_SBA_DEC_V2_BE
#define OPT_SBA_ENC_V1_BE
#define OPT_BIN_RENDERER_V1
#define OPT_BIN_RENDERER_V2
+57 −0
Original line number Diff line number Diff line
@@ -20,6 +20,63 @@
 *   (adaptive codebook excitation)                                  *
 *-------------------------------------------------------------------*/

void pred_lt4_ivas_fx(
    const Word16 excI[],   /* in : excitation buffer       Q_exc*/
    Word16 excO[],         /* out: excitation buffer       Q_exc*/
    const Word16 T0,       /* input : integer pitch lag    Q0*/
    Word16 frac,           /* input : fraction of lag      Q0*/
    const Word16 L_subfr,  /* input : subframe size        Q0*/
    const Word32 *win,     /* i  : interpolation window    Q31*/
    const Word16 nb_coef,  /* i  : nb of filter coef       Q0*/
    const Word16 up_sample /* i  : up_sample               Q0*/
)
{
    Word16 i, j;
    Word32 s;
    const Word16 *x0, *x1, *x2;
    const Word32 *c1, *c2;
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
    move32();
#endif
    x0 = &excI[-T0];

    frac = negate( frac );

    IF( frac < 0 )
    {
        frac = add( frac, up_sample ); /* Q0 */
        x0--;
    }

    FOR( j = 0; j < L_subfr; j++ )
    {
        x1 = x0++;                       /* Q_exc */
        x2 = x1 + 1;                     /* Q_exc */
        c1 = ( &win[frac] );             /* Q14 */
        c2 = ( &win[up_sample - frac] ); /* Q14 */

        {
            Word64 s64 = 0;
            move64();
            FOR( i = 0; i < nb_coef; i++ )
            {
                /*s += (*x1--) * (*c1) + (*x2++) * (*c2);*/
                s64 = W_mac_32_32( s64, L_deposit_l( *x1-- ), ( *c1 ) ); /* Q_exc + Q32 */
                s64 = W_mac_32_32( s64, L_deposit_l( *x2++ ), ( *c2 ) ); /* Q_exc + Q32 */

                c1 += up_sample;
                c2 += up_sample;
            }
            s = W_sat_l( W_shr( s64, 16 ) ); /* Q_exc + Q16 */
        }

        excO[j] = round_fx_o( s, &Overflow ); /* Q_exc */
        move16();
    }
    return;
}

void pred_lt4(
    const Word16 excI[],   /* in : excitation buffer       Q_exc*/
    Word16 excO[],         /* out: excitation buffer       Q_exc*/
+10 −0
Original line number Diff line number Diff line
@@ -7183,6 +7183,16 @@ void pred_lt4(
    const Word16 up_sample /* i  : up_sample               Q0*/
);
void pred_lt4_ivas_fx(
    const Word16 excI[],   /* in : excitation buffer       Q_exc*/
    Word16 excO[],         /* out: excitation buffer       Q_exc*/
    const Word16 T0,       /* input : integer pitch lag    Q0*/
    Word16 frac,           /* input : fraction of lag      Q0*/
    const Word16 L_subfr,  /* input : subframe size        Q0*/
    const Word32 *win,     /* i  : interpolation window    Q31*/
    const Word16 nb_coef,  /* i  : nb of filter coef       Q0*/
    const Word16 up_sample /* i  : up_sample               Q0*/
);
void pred_lt4_tc_fx(
    Word16 exc[],         /* i/o: excitation buffer        Q0*/
+12 −0
Original line number Diff line number Diff line
@@ -1332,6 +1332,18 @@ const Word16 inter4_2_fx[] =
};
/* 1/4 resolution interpolation filter (-3 dB at 0.856*fs/2) */
const Word32 L_pitch_inter4_2[PIT_FIR_SIZE2] = { /* Q31 */
    2018634624, 1839083520, 1357785216, 724904576, 126856152, -281447072,
    -428193216, -340524320, -121030032, 102233104, 229241728, 222704784,
    111802296, -32603096, -136805440, -158183648, -99851544, -2110976,
    82091856, 114123720, 86026048, 19988778, -46544560, -81104016,
    -71266392, -27977416, 22982370, 55621972, 56517476, 29680372,
    -7827578, -36105644, -42638288, -27414776, -1138166, 21646636,
    30326764, 22885734, 5570572, -11516955, -20066088, -17396766,
    -6833293, 5003637, 12101070, 11944304, 6107443, -1346472, -6427418,
    -7219840, -4389456, -249108, 2823941, 3633542, 2471753, 556198,
    -895500, -1327144, -932007, -285615, 135291, 210453, 103079, 15032, 0
};
const Word16 pitch_inter4_2[PIT_FIR_SIZE2] =
{
  /* cut-off frequency at 0.94*fs/2 */
+2 −1
Original line number Diff line number Diff line
@@ -175,7 +175,8 @@ extern const Word16 fft256_read_indexes[]; /* FFT Q0*/
extern const Word16 inter4_2_fx_Q15[];     // Q15     /* 1/4 resolution interpolation filter */
extern const Word16 inter4_2_fx[];
extern const Word16 pitch_inter4_1[UP_SAMP * L_INTERPOL1 + 1]; /*1Q14*/
extern const Word16 pitch_inter4_2[PIT_FIR_SIZE2];             /*1Q14*/
extern const Word16 pitch_inter4_2[PIT_FIR_SIZE2];             /*Q15*/
extern const Word32 L_pitch_inter4_2[PIT_FIR_SIZE2];           /*Q31*/
extern const Word16 Assym_window_W16fx[];                      // Q15
extern const Word16 assym_window_16k_fx[];                     // Q15
extern const Word16 grid50_fx[( GRID50_POINTS - 1 ) / 2 - 1];  // Q15
Loading