Commit a4f5af60 authored by emerit's avatar emerit
Browse files

Merge branch 'main' of forge.3gpp.org:ivas-codec-pc/ivas-codec

parents 4ef1fe17 82b4f423
Loading
Loading
Loading
Loading
+26 −21
Original line number Diff line number Diff line
@@ -536,6 +536,9 @@ ivas_error config_acelp1(
    const int16_t tdm_lp_reuse_flag, /* i  : LPC reuse flag (can be 1 only with secondary channel */
    const int16_t tdm_low_rate_mode, /* i  : secondary channel low rate mode flag */
    const int16_t idchan,            /* i  : stereo channel ID               */
#ifdef LSF_RE_USE_SECONDARY_CHANNEL_REUSEMODE
    const int16_t active_cnt, /* i  : Active frame counter            */
#endif
    const int16_t tdm_Pitch_reuse_flag, /* i  : primary channel pitch reuse flag*/
    const int16_t tdm_LRTD_flag,        /* i  : LRTD stereo mode flag           */
    const int16_t GSC_IVAS_mode         /* i  : GSC IVAS mode                   */
@@ -754,11 +757,12 @@ ivas_error config_acelp1(
            bits -= acelp_cfg->mid_lsf_bits;
        }
#ifdef LSF_RE_USE_SECONDARY_CHANNEL_REUSEMODE
        else if ( tdm_lp_reuse_flag == 1 && idchan == 1 )
        else if ( tdm_lp_reuse_flag == 1 && idchan == 1 && active_cnt != 1 )
        {
            bits -= TDM_IC_LSF_PRED_BITS;
        }
#endif

        /* gain Q bit-budget - part 1 */
        if ( ( coder_type != UNVOICED && coder_type != AUDIO && coder_type != INACTIVE && !( core_brate <= ACELP_8k00 && coder_type != TRANSITION ) ) || ( coder_type == INACTIVE && total_brate > MAX_GSC_INACTIVE_BRATE ) )
        {
@@ -1323,6 +1327,7 @@ ivas_error config_acelp1(
                else
                {
                    int16_t nb_prm = 4;

                    if ( tdm_low_rate_mode == 1 )
                    {
                        nb_prm = 2;
+19 −0
Original line number Diff line number Diff line
@@ -1391,6 +1391,25 @@ enum
#define NPARTCLDFB                          10
#define NPART_SHAPING                       62

#ifdef ERI_FDCNGVQ_LOW_ROM
#define FDCNG_VQ_MAX_LEN        FD_CNG_maxN_37bits   
#define FDCNG_VQ_DCT_NSEGM      4   
#define FDCNG_VQ_DCT_MINTRUNC   8   
#define FDCNG_VQ_DCT_MAXTRUNC   18  
#define FDCNG_VQ_MAX_LEN_WB     21 

#define FDCNG_VQ_DCT_NPOST   8   

typedef enum _DCTTYPE
{
    DCT_T2_24_XX = 0, /* truncated DCT_T2_24 */
    IDCT_T2_XX_24 = 1,
    DCT_T2_21_XX = 2, /* truncated DCT_T2_21 */
    IDCT_T2_XX_21 = 3
} DCTTYPE;

#endif 

#define MSSUBFRLEN                          12
#define MSNUMSUBFR                          6
#define MSBUFLEN                            5
+5 −1
Original line number Diff line number Diff line
@@ -793,7 +793,7 @@ enum fea_names
#define TDM_SIGNAL_BITS_READ_FROM_THE_END_OF_BS ( TDM_SECONDARY_SIGNALLING + TDM_RATIO_BITS + TDM_LP_REUSE_BITS + TDM_LR_CONTENT_BITS + STEREO_BITS_TCA )
#ifdef LSF_RE_USE_SECONDARY_CHANNEL
#ifdef LSF_RE_USE_SECONDARY_CHANNEL_REUSEMODE
#define TDM_IC_LSF_PRED_BITS                    1                           /* Number of bits to code the inter channel lsf prediction mode */
#define TDM_IC_LSF_PRED_BITS                    1                           /* number of bits to code the inter channel LSF prediction mode */
#endif
#endif

@@ -1442,7 +1442,11 @@ typedef enum
#define SFX_SPAT_BIN_NUM_SUBSAMPLES             64
#define ITD_MEM_LEN                             (MAX_ITD + SFX_SPAT_BIN_SINC_M)
#define L_SUBFRAME5MS_48k                       (L_FRAME48k/4)
#ifdef FIX_421_TD_INT_TUNE
#define MAX_ANGULAR_STEP                        (0.01f)
#else
#define MAX_ANGULAR_STEP                        (1.0f)
#endif
#define MAX_ANGULAR_STEP_INV                    ( 1.0f / MAX_ANGULAR_STEP )
#define MAX_INTERPOLATION_STEPS                 12

+1 −0
Original line number Diff line number Diff line
@@ -84,6 +84,7 @@ static inline ivas_error ivas_error_wrapper( const ivas_error error_code, const

    fprintf( stderr, "\n\nIn function: %s(), %s:%d\n\n", function, file, line );
    // assert( 0 );

    return error_code;
}
#else
+4 −4
Original line number Diff line number Diff line
@@ -1919,7 +1919,7 @@ void tdm_low_rate_dec(
void tdm_SCh_LSF_intra_pred(
    const int32_t element_brate,                                /* i  : element bitrate                         */
    const float *tdm_lsfQ_PCh,                                  /* i  : primary channel LSFs                    */
    float *pred_lsf_secondary                                   /* o  : predicted secondary channel LSFs        */
    float *pred_lsf_SCh                                         /* o  : predicted secondary channel LSFs        */
);

#ifdef LSF_RE_USE_SECONDARY_CHANNEL_REUSEMODE
@@ -1930,7 +1930,7 @@ void tdm_SCh_lsf_reuse(
    float lsp_new[M],                                           /* i/o: LSPs at the end of the frame            */
    const float tdm_lsfQ_PCh[M],                                /* i  : primary channel LSFs                    */
    const float lsf_wgts[M],                                    /* i  : LSF weights                             */
    int16_t beta_index[]                                        /* i/o: quantization index                      */
    int16_t *beta_index                                         /* i/o: quantization index                      */
);
#endif
#endif
Loading