Commit 2a0141ae authored by vaclav's avatar vaclav
Browse files

- updates to init_encoder_ivas_fx()

- remove duplication of st->last_vad_spa_fx
- remove duplication of st->last_ener_fx
parent 93eb2417
Loading
Loading
Loading
Loading
+11 −13
Original line number Diff line number Diff line
@@ -7270,15 +7270,15 @@ void FEC_lsf2lsp_interp(
);
// fd_cng_dec_fx.c
ivas_error createFdCngDec_fx( HANDLE_FD_CNG_DEC *hFdCngDec );
ivas_error createFdCngDec_fx(
    HANDLE_FD_CNG_DEC *hFdCngDec );
void initFdCngDec_fx(
    DEC_CORE_HANDLE st, /* i/o: decoder state structure     */
    Word16 scale );
    const Word16 scale );
/* Delete the instance of type FD_CNG */
void deleteFdCngDec_fx( HANDLE_FD_CNG_DEC *hFdCngDec );
void deleteFdCngDec_fx(
    HANDLE_FD_CNG_DEC *hFdCngDec );
/* Configure CLDFB-CNG */
void configureFdCngDec_fx(
@@ -11056,8 +11056,6 @@ ivas_error init_encoder_ivas_fx(
    Encoder_State *st,          /* i/o: state structure                      */
    Encoder_Struct *st_ivas,    /* i/o: encoder state structure              */
    const Word16 idchan,        /* i  : channel ID                           */
    const Word16 var_SID_rate_flag, /* i  : flag for variable SID update rate    */
    const Word16 interval_SID,      /* i  : interval for SID update              */
    const Word16 vad_only_flag, /* i  : flag to indicate front-VAD structure */
    const ISM_MODE ism_mode,    /* i  : ISM mode                             */
    const Word32 element_brate  /* i  : element bitrate                      */
+1 −1
Original line number Diff line number Diff line
@@ -193,7 +193,7 @@ void initFdCngDec_ivas_fx(

void initFdCngDec_fx(
    DEC_CORE_HANDLE st, /* i/o: decoder state structure     */
    Word16 scale /*Q15*/ )
    const Word16 scale /*Q15*/ )
{
    /* Initialize common */
    HANDLE_FD_CNG_DEC hFdCngDec;
+27 −12
Original line number Diff line number Diff line
@@ -35,26 +35,33 @@ extern void BASOP_getTables( const PWord16 **ptwiddle, const PWord16 **sin_twidd
/*************************************
 * Create an instance of type FD_CNG *
 *************************************/
void createFdCngEnc_fx( HANDLE_FD_CNG_ENC *hFdCngEnc )
ivas_error createFdCngEnc_fx(
    HANDLE_FD_CNG_ENC *hFdCngEnc )
{
    HANDLE_FD_CNG_ENC hs;
    ivas_error error;

    /* Allocate memory */
    hs = (HANDLE_FD_CNG_ENC) calloc( 1, sizeof( FD_CNG_ENC ) );
    move16();
    IF( ( hs = (HANDLE_FD_CNG_ENC) malloc( sizeof( FD_CNG_ENC ) ) ) == NULL )
    {
        return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Cannot allocate memory for FD CNG ENC structure" );
    }

    IF( ( error = createFdCngCom_fx( &( hs->hFdCngCom ) ) ) != IVAS_ERR_OK )
    {
        return error;
    }

    createFdCngCom_fx( &( hs->hFdCngCom ) );
    *hFdCngEnc = hs;
    move16();

    return;
    return IVAS_ERR_OK;
}

void initFdCngEnc_fx(
    HANDLE_FD_CNG_ENC hsEnc,
    Word32 input_Fs, /* Q0 */
    Word16 scale )
    const Word32 input_Fs, /* Q0 */
    const Word16 scale )
{
    Word16 j;
    HANDLE_FD_CNG_COM hsCom = hsEnc->hFdCngCom;
@@ -155,9 +162,11 @@ void initFdCngEnc_fx(
/************************************
 * Configure FD_CNG                 *
 ************************************/
void configureFdCngEnc_fx( HANDLE_FD_CNG_ENC hsEnc, /* i/o: Contains the variables related to the FD-based CNG process */
                           Word16 bandwidth,        /* i:   bandwidth	Q0*/
                           Word32 bitrate           /* Q0 */

void configureFdCngEnc_fx(
    HANDLE_FD_CNG_ENC hsEnc, /* i/o: Contains the variables related to the FD-based CNG process */
    const Word16 bandwidth,  /* i:   bandwidth	Q0*/
    const Word32 bitrate     /* Q0 */
)
{
    HANDLE_FD_CNG_COM hsCom = hsEnc->hFdCngCom;
@@ -279,6 +288,8 @@ void configureFdCngEnc_fx( HANDLE_FD_CNG_ENC hsEnc, /* i/o: Contains the variabl
    BASOP_getTables( &hsCom->olapWinSyn, NULL, NULL, shr( hsCom->fftlen, 2 ) );
    hsCom->frameSize = shr( hsCom->fftlen, 1 );
    move16();

    return;
}

void configureFdCngEnc_ivas_fx(
@@ -416,12 +427,14 @@ void configureFdCngEnc_ivas_fx(
    return;
}


/**************************************
 * Delete the instance of type FD_CNG *
 **************************************/
void deleteFdCngEnc_fx( HANDLE_FD_CNG_ENC *hFdCngEnc )
{

void deleteFdCngEnc_fx(
    HANDLE_FD_CNG_ENC *hFdCngEnc )
{
    HANDLE_FD_CNG_ENC hsEnc;
    hsEnc = *hFdCngEnc;
    move16();
@@ -432,6 +445,8 @@ void deleteFdCngEnc_fx( HANDLE_FD_CNG_ENC *hFdCngEnc )
        *hFdCngEnc = NULL;
        move16();
    }

    return;
}


+1 −1
Original line number Diff line number Diff line
@@ -1000,7 +1000,7 @@ void gsc_enc_fx(

    highband_exc_dct_in_fx( st_fx->core_brate, mfreq_bindiv_loc, last_bin, Diff_len, hGSCEnc->noise_lev, tmp_band, exc_diffQ,
                            &hGSCEnc->seed_tcx, Ener_per_bd_iQ, nb_subfr, exc_dct_in, st_fx->last_coder_type, bitallocation_band, lsf_new,
                            hGSCEnc->last_exc_dct_in_fx, &st_fx->last_ener_fx, hGSCEnc->last_bitallocation_band, bitallocation_exc, 0, st_fx->coder_type,
                            hGSCEnc->last_exc_dct_in_fx, &hGSCEnc->last_ener_fx, hGSCEnc->last_bitallocation_band, bitallocation_exc, 0, st_fx->coder_type,
                            st_fx->bwidth, exc_wo_nf, Q_PVQ_OUT, Q_exc, st_fx->GSC_noisy_speech, NULL, st_fx->L_frame, st_fx->element_mode, st_fx->GSC_IVAS_mode );

    exc_dct_in[0] = 0;
+389 −232

File changed.

Preview size limit exceeded, changes collapsed.

Loading