Commit 4e93fd5c authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch 'basop_instrumentation_float_struct_cleanup' into 'main'

jbm and dirac renderer clean-up, BASOP and instrumentation changes

See merge request !372
parents 3a445559 b63cb1a1
Loading
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -954,7 +954,7 @@ ivas_error ivas_jbm_dec_tc(
    float *data                                                /* o  : output synthesis signals                                    */
);
#endif

#ifndef IVAS_FLOAT_FIXED
ivas_error ivas_jbm_dec_render(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                                      */
    const uint16_t nSamplesAsked,                               /* i  : number of samples wanted                                    */
@@ -962,6 +962,7 @@ ivas_error ivas_jbm_dec_render(
    uint16_t *nSamplesAvailableNext,                            /* o  : number of samples still available in the rendering pipeline */
    int16_t *data                                               /* o  : output synthesis signal                                     */
);
#endif
#ifdef IVAS_FLOAT_FIXED
ivas_error ivas_jbm_dec_flush_renderer_fx(
    Decoder_Struct *st_ivas,                     /* i/o: IVAS decoder structure    */
@@ -7394,7 +7395,7 @@ void ivas_omasa_rearrange_channels(
    const int16_t nchan_transport_ism,                          /* i  : number of ISM TCs                       */
    const int16_t output_frame                                  /* i  : output frame length per channel         */
);

#ifndef IVAS_FLOAT_FIXED
void ivas_omasa_dirac_rend_jbm(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder handle                     */
    const uint16_t nSamplesAsked,                               /* i  : number of samples requested             */
@@ -7403,7 +7404,7 @@ void ivas_omasa_dirac_rend_jbm(
    const int16_t nchan_transport,                              /* i  : number of transport channels            */
    float *output_f[]                                           /* o  : rendered time signal                    */
);

#endif
#ifdef IVAS_FLOAT_FIXED
void ivas_omasa_preProcessStereoTransportsForMovedObjects_fx(
    Decoder_Struct *st_ivas,
+19 −5
Original line number Diff line number Diff line
@@ -2097,10 +2097,7 @@ void td_bwe_dec_init_ivas_fx(

void ivas_dirac_dec_render_sf_fx(
    Decoder_Struct *st_ivas,       /* i/o: IVAS decoder structure                  */
    float *output_f[],       /* i/o: synthesized core-coder transport channels/DirAC output  */
#ifdef MSAN_FIX
    Word32 *output_fx[],           /* i/o: synthesized core-coder transport channels/DirAC output  */
#endif                             // MSAN_FIX
    const int16_t nchan_transport, /* i  : number of transport channels            */
    Word32 *pppQMfFrame_ts_re_fx[IVAS_MAX_FB_MIXER_IN_CH][CLDFB_NO_COL_MAX],
    Word32 *pppQMfFrame_ts_im_fx[IVAS_MAX_FB_MIXER_IN_CH][CLDFB_NO_COL_MAX] );
@@ -2111,7 +2108,7 @@ void ivas_dirac_dec_render_fx(
    const UWord16 nSamplesAsked,    /* i  : number of CLDFB slots requested          */
    UWord16 *nSamplesRendered,      /* o  : number of CLDFB slots rendered           */
    UWord16 *nSamplesAvailableNext, /* o  : number of CLDFB slots still to render    */
    float *output_f[]               /* o  : rendered time signal                     */
    Word32 *output_f[]              /* o  : rendered time signal                     */
);

void ivas_dirac_dec_read_BS_fx(
@@ -2268,4 +2265,21 @@ void ivas_sba_get_spar_hoa_md_flag_fx(
    const Word32 ivas_total_brate, /* i  : IVAS total bitrate           */
    Word16 *spar_hoa_md_flag,
    Word16 *spar_hoa_dirac2spar_md_flag );

void ivas_omasa_dirac_rend_jbm_fx(
    Decoder_Struct *st_ivas,      /* i/o: IVAS decoder handle                      */
    const UWord16 nSamplesAsked,  /* i  : number of samples requested              */
    UWord16 *nSamplesRendered,    /* o  : number of samples rendered               */
    UWord16 *nSamplesAvailable,   /* o  : number of samples still to render        */
    const Word16 nchan_transport, /* i  : number of transport channels             */
    Word32 *output_f[]            /* o  : rendered time signal                     */
);

ivas_error ivas_jbm_dec_render_fx(
    Decoder_Struct *st_ivas,        /* i/o: IVAS decoder structure                                      */
    const UWord16 nSamplesAsked,    /* i  : number of samples wanted                                    */
    UWord16 *nSamplesRendered,      /* o  : number of samples rendered                                  */
    UWord16 *nSamplesAvailableNext, /* o  : number of samples still available in the rendering pipeline */
    Word16 *data                    /* o  : output synthesis signal                                      */
);
#endif
+1 −1
Original line number Diff line number Diff line
@@ -8149,7 +8149,7 @@ void IGFSCFDecoderDecode(
);

// ari_dec_fx.c
Word16 ari_decode_overflow_fx( Tastat *s );
Word32 ari_decode_overflow_fx( Tastat *s );

void ari_start_decoding_14bits_fx(
    Decoder_State *st,
+50 −39
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ ivas_error acelp_core_switch_dec_fx(
    Word16 i, delta, L_frame_for_cs, decode_bwe, tmp;
    Word16 d1m, ind1, fdelay, gapsize;
    Word32 cbrate;
    Word16 synth_intFreq[2 * L_SUBFR];
    Word16 synth_intFreq[L_SUBFR * 2];
    CLDFB_SCALE_FACTOR scaleFactor;
    Word32 workBuffer[128 * 3];
    Word16 old_exc[L_EXC_DEC], *exc;
@@ -42,7 +42,7 @@ ivas_error acelp_core_switch_dec_fx(
    Word16 hb_synth_tmp[NS2SA( 48000, 10000000 )];
    const Word16 *hp_filter;
    Word16 Aq[2 * ( M + 1 )];
    Word16 bpf_error_signal[2 * L_SUBFR];
    Word16 bpf_error_signal[L_SUBFR * 2];
    Word16 *pt1, *pt2;
    Word16 syn_fx_tmp[L_FRAME_16k];
    Word32 *realBuffer[CLDFB_NO_COL_MAX_SWITCH], *imagBuffer[CLDFB_NO_COL_MAX_SWITCH];
@@ -72,12 +72,13 @@ ivas_error acelp_core_switch_dec_fx(
    Copy( st_fx->old_Aq_12_8_fx, Aq, M + 1 );
    Copy( st_fx->old_Aq_12_8_fx, Aq + ( M + 1 ), M + 1 );

    set16_fx( mem_synth, 0, NS2SA( 16000, DELAY_CLDFB_NS ) + 2 );
    set16_fx( mem_synth, 0, add( NS2SA( 16000, DELAY_CLDFB_NS ), 2 ) );
    set16_fx( synth_subfr_out, 0, SWITCH_MAX_GAP ); /* avoid valgrind complaining about uninitialized memory in core_switching_OLA_fx() */

    /* set multiplication factor according to the sampling rate */
    delta = 1;
    if ( GT_16( output_frame, L_FRAME16k ) )
    move16();
    IF( GT_16( output_frame, L_FRAME16k ) )
    {
        delta = shr( output_frame, 8 );
    }
@@ -97,7 +98,7 @@ ivas_error acelp_core_switch_dec_fx(
        IF( EQ_16( st_fx->last_L_frame, L_FRAME ) )
        {
            cbrate = L_add( st_fx->core_brate, 0 );
            if ( GT_32( cbrate, ACELP_24k40 ) )
            IF( GT_32( cbrate, ACELP_24k40 ) )
            {
                cbrate = L_add( ACELP_24k40, 0 );
            }
@@ -138,7 +139,7 @@ ivas_error acelp_core_switch_dec_fx(
        Rescale_mem( st_fx->Q_exc, &st_fx->prev_Q_syn, &st_fx->Q_syn, st_fx->mem_syn2_fx, st_fx->mem_syn_clas_estim_fx,
                     4, &st_fx->mem_deemph_fx, hBPF->pst_old_syn_fx, &hBPF->pst_mem_deemp_err_fx, &st_fx->agc_mem_fx[1], st_fx->hPFstat, 1, 0, NULL );

        syn_12k8_fx( 2 * L_SUBFR, Aq, exc, synth_intFreq, st_fx->mem_syn2_fx, 1, st_fx->Q_exc, st_fx->Q_syn );
        syn_12k8_fx( shl( L_SUBFR, 1 ), Aq, exc, synth_intFreq, st_fx->mem_syn2_fx, 1, st_fx->Q_exc, st_fx->Q_syn );

        IF( st_fx->hPFstat->on && ( EQ_16( st_fx->last_bwidth, NB ) ) )
        {
@@ -149,20 +150,20 @@ ivas_error acelp_core_switch_dec_fx(
                pitch_buf_tmp[i] = L_SUBFR;
                move16();
            }
            nb_post_filt_fx( 2 * L_SUBFR, st_fx->hPFstat, &tmp_noise, 0, synth_intFreq, Aq, pitch_buf_tmp, AUDIO, st_fx->BER_detect, 0 );
            nb_post_filt_fx( shl( L_SUBFR, 1 ), st_fx->hPFstat, &tmp_noise, 0, synth_intFreq, Aq, pitch_buf_tmp, AUDIO, st_fx->BER_detect, 0 );
        }

        IF( EQ_16( L_frame_for_cs, L_FRAME ) )
        {
            deemph_fx( synth_intFreq, PREEMPH_FAC, 2 * L_SUBFR, &( st_fx->mem_deemph_fx ) );
            deemph_fx( synth_intFreq, PREEMPH_FAC, shl( L_SUBFR, 1 ), &( st_fx->mem_deemph_fx ) );
        }
        ELSE
        {
            deemph_fx( synth_intFreq, PREEMPH_FAC_16k, 2 * L_SUBFR, &( st_fx->mem_deemph_fx ) );
            deemph_fx( synth_intFreq, PREEMPH_FAC_16k, shl( L_SUBFR, 1 ), &( st_fx->mem_deemph_fx ) );
        }

        unscale_AGC( synth_intFreq, st_fx->Q_syn, syn_fx_tmp + M, st_fx->agc_mem_fx, 2 * L_SUBFR );
        Copy( syn_fx_tmp + M, synth_intFreq, 2 * L_SUBFR );
        unscale_AGC( synth_intFreq, st_fx->Q_syn, syn_fx_tmp + M, st_fx->agc_mem_fx, shl( L_SUBFR, 1 ) );
        Copy( syn_fx_tmp + M, synth_intFreq, shl( L_SUBFR, 1 ) );

        test();
        IF( st_fx->hPFstat->on && ( NE_16( st_fx->last_bwidth, NB ) ) )
@@ -172,16 +173,16 @@ ivas_error acelp_core_switch_dec_fx(
            Residu3_fx( Aq, bpf_error_signal + M, exc, L_SUBFR, 1 );
            E_UTIL_synthesis( 1, Aq, exc, bpf_error_signal, L_SUBFR, st_fx->hPFstat->mem_stp + L_SYN_MEM - M, 0, M );
            scale_st_fx( synth_intFreq, bpf_error_signal, &st_fx->hPFstat->gain_prec, L_SUBFR );
            Copy( bpf_error_signal, synth_intFreq, L_SUBFR / 2 );
            blend_subfr2_fx( bpf_error_signal + L_SUBFR / 2, synth_intFreq + L_SUBFR / 2, synth_intFreq + L_SUBFR / 2 );
            Copy( bpf_error_signal, synth_intFreq, shr( L_SUBFR, 1 ) );
            blend_subfr2_fx( bpf_error_signal + shr( L_SUBFR, 1 ), synth_intFreq + shr( L_SUBFR, 1 ), synth_intFreq + shr( L_SUBFR, 1 ) );
        }
        st_fx->hPFstat->on = 0;

        move16();

        IF( st_fx->flag_cna != 0 )
        IF( NE_16( st_fx->flag_cna, 0 ) )
        {
            generate_masking_noise_fx( synth_intFreq, st_fx->Q_syn, st_fx->hFdCngDec->hFdCngCom, 2 * L_SUBFR, 0 );
            generate_masking_noise_fx( synth_intFreq, st_fx->Q_syn, st_fx->hFdCngDec->hFdCngCom, shl( L_SUBFR, 1 ), 0 );
        }

        /*----------------------------------------------------------------*
@@ -189,11 +190,11 @@ ivas_error acelp_core_switch_dec_fx(
         * Bass post-filter
         *----------------------------------------------------------------*/

        bass_psfilter_fx( st_fx->hBPF, st_fx->Opt_AMR_WB, synth_intFreq, 2 * L_SUBFR, NULL,
        bass_psfilter_fx( st_fx->hBPF, st_fx->Opt_AMR_WB, synth_intFreq, shl( L_SUBFR, 1 ), NULL,
                          st_fx->bpf_off, st_fx->stab_fac_fx, &st_fx->stab_fac_smooth_fx,
                          GENERIC, st_fx->Q_syn, bpf_error_signal );

        if ( ( error = cldfb_save_memory( st_fx->cldfbAna ) ) != IVAS_ERR_OK )
        IF( ( error = cldfb_save_memory( st_fx->cldfbAna ) ) != IVAS_ERR_OK )
        {
            return error;
        }
@@ -206,13 +207,13 @@ ivas_error acelp_core_switch_dec_fx(
        move16();

        /* CLDFB analysis and add the BPF error signal */
        if ( ( error = cldfb_save_memory( st_fx->cldfbBPF ) ) != IVAS_ERR_OK )
        IF( ( error = cldfb_save_memory( st_fx->cldfbBPF ) ) != IVAS_ERR_OK )
        {
            return error;
        }
        i = 0;
        move16();
        if ( st_fx->bpf_off == 0 )
        IF( EQ_16( st_fx->bpf_off, 0 ) )
        {
            i = CLDFB_NO_COL_MAX_SWITCH;
            move16();
@@ -223,8 +224,9 @@ ivas_error acelp_core_switch_dec_fx(

        /* CLDFB synthesis of the combined signal */
        scaleFactor.hb_scale = scaleFactor.lb_scale;
        move16();

        if ( ( error = cldfb_save_memory( st_fx->cldfbSyn ) ) != IVAS_ERR_OK )
        IF( ( error = cldfb_save_memory( st_fx->cldfbSyn ) ) != IVAS_ERR_OK )
        {
            return error;
        }
@@ -233,7 +235,7 @@ ivas_error acelp_core_switch_dec_fx(
        *Q_syn = 0;
        move16();

        Copy_Scale_sig( synth_intFreq + NS2SA( L_frame_for_cs * 50, SWITCH_GAP_LENGTH_NS - DELAY_CLDFB_NS ) - 2, mem_synth, NS2SA( L_frame_for_cs * 50, DELAY_CLDFB_NS ) + 2, negate( st_fx->Q_syn ) ); /* Copy mem with Q0 */
        Copy_Scale_sig( synth_intFreq + sub( NS2SA( i_mult( L_frame_for_cs, 50 ), L_sub( SWITCH_GAP_LENGTH_NS, DELAY_CLDFB_NS ) ), 2 ), mem_synth, add( NS2SA( i_mult( L_frame_for_cs, 50 ), DELAY_CLDFB_NS ), 2 ), negate( st_fx->Q_syn ) ); /* Copy mem with Q0 */

        /*----------------------------------------------------------------*
         * BWE decoding
@@ -258,7 +260,7 @@ ivas_error acelp_core_switch_dec_fx(
        test();
        IF( decode_bwe && !( ( EQ_16( output_frame, L_FRAME16k ) && EQ_16( st_fx->last_L_frame, L_FRAME16k ) ) || EQ_16( output_frame, L_FRAME8k ) ) )
        {
            set16_fx( tmp_mem2, 0, 2 * L_FILT48k );
            set16_fx( tmp_mem2, 0, shl( L_FILT48k, 1 ) );

            hp_filter = hp16000_48000_fx;
            fdelay = 48;
@@ -297,7 +299,7 @@ ivas_error acelp_core_switch_dec_fx(
            /* safety check in case of bit errors */
            i = MAX_D1M_16k;
            move16();
            if ( EQ_16( st_fx->last_L_frame, L_FRAME ) )
            IF( EQ_16( st_fx->last_L_frame, L_FRAME ) )
            {
                i = MAX_D1M_12k8;
                move16();
@@ -312,7 +314,7 @@ ivas_error acelp_core_switch_dec_fx(
                move16();
            }

            i = NS2SA_fx2( st_fx->output_Fs, FRAME_SIZE_NS - ACELP_LOOK_NS - DELAY_BWE_TOTAL_NS );
            i = NS2SA_fx2( st_fx->output_Fs, L_sub( FRAME_SIZE_NS, L_add( ACELP_LOOK_NS, DELAY_BWE_TOTAL_NS ) ) );
            move16();
            Copy( st_fx->old_synth_sw_fx, hb_synth_tmp, i );
            set16_fx( hb_synth_tmp + i, 0, NS2SA_fx2( st_fx->output_Fs, 10000000L ) - i );
@@ -421,12 +423,12 @@ ivas_error acelp_core_switch_dec_bfi_fx(
        set16_fx( old_exc2, 0, L_EXC_MEM );
    }
    exc2 = old_exc2 + L_EXC_MEM;
    if ( st_fx->hBWE_TD != NULL )
    IF( st_fx->hBWE_TD != NULL )
    {
        Copy( st_fx->hBWE_TD->old_bwe_exc_fx, old_bwe_exc, PIT16k_MAX * 2 );
        bwe_exc = old_bwe_exc + PIT16k_MAX * 2;
        Copy( st_fx->hBWE_TD->old_bwe_exc_fx, old_bwe_exc, shl( PIT16k_MAX, 1 ) );
        bwe_exc = old_bwe_exc + shl( PIT16k_MAX, 1 );
    }
    else
    ELSE
    {
        bwe_exc = NULL;
    }
@@ -437,7 +439,7 @@ ivas_error acelp_core_switch_dec_bfi_fx(
    move16();

    /* SC-VBR */
    if ( EQ_16( st_fx->last_nelp_mode_dec, 1 ) )
    IF( EQ_16( st_fx->last_nelp_mode_dec, 1 ) )
    {
        st_fx->nelp_mode_dec = 1;
        move16();
@@ -465,12 +467,14 @@ ivas_error acelp_core_switch_dec_bfi_fx(
        Word16 gain_buf[NB_SUBFR16k];
        Scale_sig( exc - L_EXC_MEM, L_EXC_MEM, -st_fx->Q_exc );
        st_fx->Q_exc = 0;
        move16();
        /* SC-VBR */
        decod_nelp_fx( st_fx, &tmp_noise, pitch_buf, exc, exc2, voice_factors, bwe_exc, &Q_exc, st_fx->bfi, gain_buf );
        FEC_pitch = pitch_buf[3];
        move16();
        Rescale_exc( hMusicPF->dct_post_old_exc_fx, exc, NULL, st_fx->hGSCDec->last_exc_dct_in_fx, L_FRAME, 0, (Word32) 0, &Q_exc, st_fx->Q_subfr, exc2, L_FRAME, coder_type );
        st_fx->Q_exc = Q_exc;
        move16();
    }
    ELSE
    {
@@ -516,6 +520,7 @@ ivas_error acelp_core_switch_dec_bfi_fx(
    syn_12k8_fx( st_fx->L_frame, Aq, exc2, syn, tmp_float, 1, Q_exc, st_fx->Q_syn );

    tmp_float32 = st_fx->enr_old_fx;
    move32();
    frame_ener_fx( st_fx->L_frame, st_fx->last_good, syn, shr( add( FEC_pitch, 32 ), 6 ), &tmp_float32, st_fx->L_frame, st_fx->Q_syn, 3, 0 );

    /*------------------------------------------------------------------*
@@ -558,11 +563,12 @@ ivas_error acelp_core_switch_dec_bfi_fx(
    Copy( tmp_float5, hBPF->Track_on_hist, L_TRACK_HIST );
    Copy( tmp_float6, hBPF->vibrato_hist, L_TRACK_HIST );
    hBPF->psf_att_fx = tmp_float7;
    move16();
    /*----------------------------------------------------------------*
     * Resamping to the output sampling frequency
     *----------------------------------------------------------------*/
    /* CLDFB analysis of the synthesis at internal sampling rate */
    if ( ( error = cldfb_save_memory( st_fx->cldfbAna ) ) != IVAS_ERR_OK )
    IF( ( error = cldfb_save_memory( st_fx->cldfbAna ) ) != IVAS_ERR_OK )
    {
        return error;
    }
@@ -571,9 +577,10 @@ ivas_error acelp_core_switch_dec_bfi_fx(
    cldfb_restore_memory( st_fx->cldfbAna );

    scaleFactor.hb_scale = scaleFactor.lb_scale;
    move16();

    /* CLDFB synthesis of the combined signal */
    if ( ( error = cldfb_save_memory( st_fx->cldfbSyn ) ) != IVAS_ERR_OK )
    IF( ( error = cldfb_save_memory( st_fx->cldfbSyn ) ) != IVAS_ERR_OK )
    {
        return error;
    }
@@ -662,12 +669,12 @@ ivas_error acelp_core_switch_dec_bfi_ivas_fx(
        set16_fx( old_exc2, 0, L_EXC_MEM );
    }
    exc2 = old_exc2 + L_EXC_MEM;
    if ( st_fx->hBWE_TD != NULL )
    IF( st_fx->hBWE_TD != NULL )
    {
        Copy( st_fx->hBWE_TD->old_bwe_exc_fx, old_bwe_exc, PIT16k_MAX * 2 );
        bwe_exc = old_bwe_exc + PIT16k_MAX * 2;
    }
    else
    ELSE
    {
        bwe_exc = NULL;
    }
@@ -678,7 +685,7 @@ ivas_error acelp_core_switch_dec_bfi_ivas_fx(
    move16();

    /* SC-VBR */
    if ( EQ_16( st_fx->last_nelp_mode_dec, 1 ) )
    IF( EQ_16( st_fx->last_nelp_mode_dec, 1 ) )
    {
        st_fx->nelp_mode_dec = 1;
        move16();
@@ -706,12 +713,14 @@ ivas_error acelp_core_switch_dec_bfi_ivas_fx(
        Word16 gain_buf[NB_SUBFR16k];
        Scale_sig( exc - L_EXC_MEM, L_EXC_MEM, -st_fx->Q_exc );
        st_fx->Q_exc = 0;
        move16();
        /* SC-VBR */
        decod_nelp_fx( st_fx, &tmp_noise, pitch_buf, exc, exc2, voice_factors, bwe_exc, &Q_exc, st_fx->bfi, gain_buf );
        FEC_pitch = pitch_buf[3];
        move16();
        Rescale_exc( hMusicPF->dct_post_old_exc_fx, exc, NULL, st_fx->hGSCDec->last_exc_dct_in_fx, L_FRAME, 0, (Word32) 0, &Q_exc, st_fx->Q_subfr, exc2, L_FRAME, coder_type );
        st_fx->Q_exc = Q_exc;
        move16();
    }
    ELSE
    {
@@ -757,6 +766,7 @@ ivas_error acelp_core_switch_dec_bfi_ivas_fx(
    syn_12k8_fx( st_fx->L_frame, Aq, exc2, syn, tmp_float, 1, Q_exc, st_fx->Q_syn );

    tmp_float32 = st_fx->enr_old_fx;
    move32();
    frame_ener_fx( st_fx->L_frame, st_fx->last_good, syn, shr( add( FEC_pitch, 32 ), 6 ), &tmp_float32, st_fx->L_frame, st_fx->Q_syn, 3, 0 );

    /*------------------------------------------------------------------*
@@ -803,9 +813,9 @@ ivas_error acelp_core_switch_dec_bfi_ivas_fx(
     * Resamping to the output sampling frequency
     *----------------------------------------------------------------*/
    /* CLDFB analysis of the synthesis at internal sampling rate */
    Qtmp = 11 - st_fx->Q_syn;
    Qtmp = sub( 11, st_fx->Q_syn );
    Copy_Scale_sig_16_32( syn, syn32, L_FRAME16k, Qtmp );
    if ( ( error = cldfb_save_memory_ivas_fx( st_fx->cldfbAna ) ) != IVAS_ERR_OK )
    IF( ( error = cldfb_save_memory_ivas_fx( st_fx->cldfbAna ) ) != IVAS_ERR_OK )
    {
        return error;
    }
@@ -817,7 +827,7 @@ ivas_error acelp_core_switch_dec_bfi_ivas_fx(
    // scaleFactor.hb_scale = scaleFactor.lb_scale;

    /* CLDFB synthesis of the combined signal */
    if ( ( error = cldfb_save_memory_ivas_fx( st_fx->cldfbSyn ) ) != IVAS_ERR_OK )
    IF( ( error = cldfb_save_memory_ivas_fx( st_fx->cldfbSyn ) ) != IVAS_ERR_OK )
    {
        return error;
    }
@@ -825,7 +835,7 @@ ivas_error acelp_core_switch_dec_bfi_ivas_fx(
                             negate(st_fx->Q_syn), CLDFB_NO_COL_MAX_SWITCH_BFI, workBuffer );*/
    Scale_sig32( st_fx->cldfbSyn->cldfb_state_fx, st_fx->cldfbSyn->cldfb_state_length, 1 );
    st_fx->cldfbSyn->Q_cldfb_state = add( st_fx->cldfbSyn->Q_cldfb_state, 1 );
    Copy_Scale_sig_16_32( synth_out, synth32, L_FRAME48k, 11 - 5 - 1 );
    Copy_Scale_sig_16_32( synth_out, synth32, L_FRAME48k, 5 ); /*11-5-1*/

    // cldfbSynthesis_ivas_fx(realBuffer, imagBuffer, synth_out, (int16_t)(st_fx->output_Fs * 0.01f), st_fx->cldfbSyn);
    cldfbSynthesis_ivas_fx( realBuffer, imagBuffer, synth32, extract_l( Mpy_32_16_1( st_fx->output_Fs, 328 ) ), st_fx->cldfbSyn );
@@ -873,6 +883,7 @@ static void decod_gen_voic_core_switch_fx(
    hGSCDec = st_fx->hGSCDec;
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
    move16();
#endif


@@ -905,7 +916,7 @@ static void decod_gen_voic_core_switch_fx(
     * Find the adaptive codebook vector.
     *--------------------------------------------------------------*/

    pred_lt4( &exc[0], &exc[0], T0, T0_frac, L_SUBFR + 1, pitch_inter4_2, L_INTERPOL2, PIT_UP_SAMP );
    pred_lt4( &exc[0], &exc[0], T0, T0_frac, add( L_SUBFR, 1 ), pitch_inter4_2, L_INTERPOL2, PIT_UP_SAMP );

    /*--------------------------------------------------------------*
     * LP filtering of the adaptive excitation
+70 −58

File changed.

Preview size limit exceeded, changes collapsed.

Loading