Commit d2a063a4 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Encoder float intermediates and structure members cleanup, ltv crash fixes

parent e0a989ab
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -698,6 +698,7 @@ enum
#define AUTO_REGRESSIVE                     2

#define INT_FS_12k8                         12800                                                                                                            /* internal sampling frequency                */
#define ONE_BY_INT_FS_12k8_Q42                        343597384                                                                                                            /* internal sampling frequency                */
#define M                                   16                                                                                                               /* order of the LP filter @ 12.8kHz           */
#define L_FRAME                             256                                                                                                              /* frame size at 12.8kHz                      */
#define NB_SUBFR                            4                                                                                                                /* number of subframes per frame              */
+3 −3
Original line number Diff line number Diff line
@@ -3178,9 +3178,9 @@ int16_t read_GR0(

void ivas_mdct_core_whitening_enc(
    CPE_ENC_HANDLE hCPE,                                        /* i/o: CPE encoder structure                   */
    float new_samples[CPE_CHANNELS][L_INP],                     /* i  : new samples                             */
    float old_wsp[CPE_CHANNELS][L_WSP],                         /* i  : 12.8kHz weighted speech (for LTP        */
    float pitch_buf[CPE_CHANNELS][NB_SUBFR16k],                 /* o  : floating pitch for each subframe        */
    Word16 new_samples_fx[CPE_CHANNELS][L_INP],                     /* i  : new samples                             */
    Word16 old_wsp_fx[CPE_CHANNELS][L_WSP],                         /* i  : 12.8kHz weighted speech (for LTP        */
    Word16 pitch_buf[CPE_CHANNELS][NB_SUBFR16k],                 /* o  : floating pitch for each subframe        */
    float *mdst_spectrum_long[CPE_CHANNELS],                    /* o  : buffer for MDST spectrum                */
    int16_t tnsBits[CPE_CHANNELS][NB_DIV],                      /* o  : buffer TNS bits                         */
    float *orig_spectrum_long[CPE_CHANNELS],                    /* o  : origingal spectrum w/o whitening        */
+1 −1
Original line number Diff line number Diff line
@@ -2875,7 +2875,7 @@ void stereo_dft_cng_side_gain_fx(
Word16 quantize_sns_fx(
    Word32 sns_in_fx[CPE_CHANNELS][NB_DIV][M],   /* sns_e */
    Word32 snsQ_out_fx[CPE_CHANNELS][NB_DIV][M], /* sns_e */
    Word16 *sns_e,
    Word16 sns_e,
    Encoder_State **sts,
    Word16 *indices,           /* Q0 */
    Word16 *zero_side_flag,    /* Q0 */
+4 −0
Original line number Diff line number Diff line
@@ -2400,7 +2400,11 @@ ivas_error acelp_core_enc(
    const int16_t vad_hover_flag,        /* i  : VAD hangover flag                       */
    const int16_t attack_flag,           /* i  : attack flag (GSC or TC)                 */
    float bwe_exc_extended[],            /* i/o: bandwidth extended excitation           */
#ifndef IVAS_FLOAT_FIXED
    float *voice_factors,                /* o  : voicing factors                         */
#else
    Word16 *voice_factors_fx, /* o  : voicing factors                      Q15 */
#endif
    float old_syn_12k8_16k[],            /* o  : ACELP core synthesis at 12.8kHz or 16kHz to be used by SWB BWE */
    float pitch_buf[NB_SUBFR16k],        /* o  : floating pitch for each subframe        */
    int16_t *unbits,                     /* o  : number of unused bits                   */
+13 −0
Original line number Diff line number Diff line
@@ -2368,6 +2368,19 @@ void Syn_filt_s(
    const Word16 update /* i  : 0=no update, 1=update of memory.          Q0   */
);
#ifdef IVAS_FLOAT_FIXED
void syn_filt_fx(
    const Word16 shift,   /* i  : scaling to apply                          Q0   */
    const Word16 a[],     /* i  : LP filter coefficients                    Q12  */
    const Word16 m,       /* i  : order of LP filter                        Q0   */
    const Word16 x[],     /* i  : input signal                              Qx   */
    Word16 y[],           /* o  : output signal                             Qx-s */
    const Word16 l,       /* i  : size of filtering                         Q0   */
    Word16 mem[],         /* i/o: initial filter states                     Qx-s */
    const Word16 update_m /* i  : update memory flag Q0 : 0 --> no memory update */
);                        /*                              1 --> update of memory */
#endif
void E_UTIL_synthesis( const Word16 shift, const Word16 a[], const Word16 x[], Word16 y[], const Word16 lg, Word16 mem[], const Word16 update, const Word16 m );
void E_UTIL_synthesis_fx( const Word16 shift, const Word32 a[], const Word32 x[], Word32 y[], const Word16 lg, Word32 mem[], const Word16 update, const Word16 m );
Loading