Commit ebf10d0b authored by vaclav's avatar vaclav
Browse files

review and remove redundant code under IVAS_CODE

parent 7bf53946
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -408,7 +408,7 @@ static Word16 BITS_ALLOC_adjust_acelp_fixed_cdk(
    return bitsused;
}

/*#ifdef IVAS_CODE Below basop operators are missing */

/*-------------------------------------------------------------------*
 * fcb_table()
 *
@@ -3271,4 +3271,3 @@ Word16 set_ACELP_flag_IVAS(
        return 0;
    }
}
/*#endif IVAS_CODE*/
+7 −306
Original line number Diff line number Diff line
@@ -143,66 +143,6 @@ ivas_error acelp_core_dec_fx(
        return error;
    }


#ifdef IVAS_CODE
    output_frame = (int16_t) ( st->output_Fs / FRAMES_PER_SEC );

    /*----------------------------------------------------------------*
     * stereo SID and CNG frames processing
     *----------------------------------------------------------------*/

    if ( st->core_brate <= SID_2k40 && st->element_mode == IVAS_CPE_DFT && nchan_out == 2 )
    {
        if ( st->cng_type == FD_CNG )
        {
            configureFdCngDec_fx( st->hFdCngDec, st->bwidth, ACELP_14k25, st->L_frame, st->last_L_frame, st->element_mode );

            /* Only run parameter decoding in SID frames */
            if ( st->core_brate == SID_2k40 )
            {
                FdCng_decodeSID_fx( st );
            }

            for ( i = 0; i < NPART; i++ )
            {
                st->hFdCngDec->hFdCngCom->sidNoiseEstLp[i] = STEREO_DFT_FD_FILT * st->hFdCngDec->hFdCngCom->sidNoiseEstLp[i] + ( 1 - STEREO_DFT_FD_FILT ) * st->hFdCngDec->hFdCngCom->sidNoiseEst[i];
            }

#ifdef IVAS_CODE_CNG_FIX185_PLC_FADEOUT
            ApplyFdCng_fx( NULL, NULL, NULL, NULL, st, 0, 0 );
#else
            ApplyFdCng_fx( NULL, NULL, NULL, NULL, st, 0, 0 );
#endif
        }
        else
        {
            configureFdCngDec_fx( st->hFdCngDec, st->bwidth, ACELP_14k25, st->L_frame, st->last_L_frame, st->element_mode );

            /* decode CNG parameters */
            CNG_dec( st, last_element_mode, Aq, lsp_new, lsf_new, &allow_cn_step, sid_bw, q_env );

            /* comfort noise generation */
            CNG_exc( st->core_brate, st->L_frame, &st->hTdCngDec->Enew, &st->hTdCngDec->cng_seed, NULL, NULL, &st->lp_ener, st->last_core_brate, &st->first_CNG, &( st->hTdCngDec->cng_ener_seed ), NULL, allow_cn_step, &st->hTdCngDec->last_allow_cn_step, st->hTdCngDec->num_ho, q_env, st->hTdCngDec->lp_env, st->hTdCngDec->old_env, st->hTdCngDec->exc_mem, st->hTdCngDec->exc_mem1, sid_bw, &st->hTdCngDec->cng_ener_seed1, NULL, st->Opt_AMR_WB, st->element_mode );

            mvr2r( Aq, st->Aq_cng, M + 1 );

            /* update old LSP and LSF vector */
            mvr2r( lsf_new, st->lsf_old, M );
            mvr2r( lsp_new, st->lsp_old, M );
        }

        set_f( output, 0, output_frame ); /* output and synth are not used in DFT domain CNG generation and the decoder output is unaffected if they are left uninitalized */
        set_f( synth, 0, output_frame );  /* They are however read in a few places which causes errors in the valgrind tests. Simplest solution from a code perspective was to set them to zero. */

        /* CN generation done in DFT domain */
        wmops_sub_end();
        return error;
    }

    /*----------------------------------------------------------------*
     * Active frames processing
     *----------------------------------------------------------------*/
#endif
    FOR( i = 0; i < CLDFB_NO_COL_MAX; i++ )
    {
        set32_fx( realBufferTmp[i], 0, CLDFB_NO_CHANNELS_MAX );
@@ -265,13 +205,7 @@ ivas_error acelp_core_dec_fx(
            move32();
        }
    }
#ifdef IVAS_CODE
    if ( st->hFdCngDec != NULL && ( st->element_mode == IVAS_CPE_DFT || st->element_mode == IVAS_CPE_TD ) && ( st->last_core_brate == SID_2k40 || st->last_core_brate == FRAME_NO_DATA ) )
    {
        set_zero( st->hFdCngDec->hFdCngCom->olapBufferSynth2, FFTLEN );
        set_zero( hStereoCng->olapBufferSynth22, FFTLEN );
    }
#endif

    st_fx->clas_dec = st_fx->last_good;
    move16();
    enr_q_fx = 0;
@@ -413,7 +347,7 @@ ivas_error acelp_core_dec_fx(
            Copy( GEWB_Ave_fx, st_fx->mem_AR_fx, M ); // Qlog2(2.56)
        }
        set16_fx( st_fx->mem_MA_fx, 0, M );
#if 1 // def IVAS_CODE

        dec = DEC;
        move16();
        IF( NE_16( st_fx->element_mode, EVS_MONO ) )
@@ -424,9 +358,7 @@ ivas_error acelp_core_dec_fx(

        /* update synthesis filter memories */
        synth_mem_updt2( st_fx->L_frame, st_fx->last_L_frame, st_fx->old_exc_fx, st_fx->mem_syn_r, st_fx->mem_syn2_fx, NULL, dec );
#else
        synth_mem_updt2( st_fx->L_frame, st_fx->last_L_frame, st_fx->old_exc_fx, st_fx->mem_syn_r, st_fx->mem_syn2_fx, NULL, DEC );
#endif

        Copy( st_fx->old_exc_fx, old_exc_fx, L_EXC_MEM_DEC );                                 // Q_exc
        Copy_Scale_sig( st_fx->mem_syn2_fx, st_fx->mem_syn1_fx, M, sub( -1, st_fx->Q_syn ) ); /*Q-1*/

@@ -591,7 +523,7 @@ ivas_error acelp_core_dec_fx(
        {
            tc_subfr_fx = tc_classif_fx( st_fx, st_fx->L_frame );
        }
#if 1 // def IVAS_CODE

        /*----------------------------------------------------------------*
         * Decoding of GSC IVAS mode
         *----------------------------------------------------------------*/
@@ -611,7 +543,7 @@ ivas_error acelp_core_dec_fx(
                move16();
            }
        }
#endif

        /*----------------------------------------------------------------*
         * Decoding of inactive CNG frames
         *----------------------------------------------------------------*/
@@ -623,22 +555,13 @@ ivas_error acelp_core_dec_fx(
            {

                CNG_dec_fx( st_fx, st_fx->last_element_mode, Aq_fx, lsp_new_fx, lsf_new_fx, &allow_cn_step_fx, sid_bw, q_env );
#ifdef IVAS_CODE
                local_element_mode = st_fx->element_mode;
                move16();
                IF( ( EQ_16( nchan_out, 1 ) && EQ_16( st_fx->element_mode, IVAS_CPE_DFT ) ) || EQ_16( st_fx->masa_sid_format, 1 ) )
                {
                    local_element_mode = IVAS_SCE; /* For DFT Stereo mono decoding, run CNG_exc as in SCE */
                    move16();
                }
#endif

                /* comfort noise generation */
                CNG_exc_fx( st_fx->core_brate, st_fx->L_frame, &st_fx->hTdCngDec->Enew_fx, &st_fx->hTdCngDec->cng_seed, exc_fx, exc2_fx, &st_fx->lp_ener_fx, st_fx->last_core_brate,
                            &st_fx->first_CNG, &( st_fx->hTdCngDec->cng_ener_seed ), bwe_exc_fx, allow_cn_step_fx, &st_fx->hTdCngDec->last_allow_cn_step, st_fx->prev_Q_exc, st_fx->Q_exc, st_fx->hTdCngDec->num_ho,
                            q_env, st_fx->hTdCngDec->lp_env_fx, st_fx->hTdCngDec->old_env_fx, st_fx->hTdCngDec->exc_mem_fx, st_fx->hTdCngDec->exc_mem1_fx, sid_bw, &st_fx->hTdCngDec->cng_ener_seed1, exc3_fx, st_fx->Opt_AMR_WB, st_fx->element_mode );
#if 1                                                // def IVAS_CODE

                Copy( Aq_fx, st_fx->Aq_cng, M + 1 ); // Q12
#endif
            }
            ELSE
            {
@@ -649,32 +572,7 @@ ivas_error acelp_core_dec_fx(
                    *sid_bw = 0;
                    move16();
                }
#ifdef IVAS_CODE
                if ( st->element_mode == IVAS_CPE_DFT )
                {
                    assert( nchan_out == 1 );

                    for ( i = 0; i < NPART; i++ )
                    {
                        st->hFdCngDec->hFdCngCom->sidNoiseEstLp[i] = STEREO_DFT_FD_FILT * st->hFdCngDec->hFdCngCom->sidNoiseEstLp[i] + ( 1 - STEREO_DFT_FD_FILT ) * st->hFdCngDec->hFdCngCom->sidNoiseEst[i];
                    }
#ifdef IVAS_CODE_CNG_FIX185_PLC_FADEOUT
                    ApplyFdCng_fx( syn, 0, NULL, realBuffer, imagBuffer, NULL, st, 0, ( st->coder_type == AUDIO && !st->GSC_noisy_speech ) );
#else
                    ApplyFdCng_fx( syn, realBuffer, imagBuffer, st, 0, ( st->coder_type == AUDIO && !st->GSC_noisy_speech ) );
#endif
                }
                if ( !read_sid_info )
                {
                    float noise_lvl_highest;

                    noise_lvl_highest = st->hFdCngDec->hFdCngCom->cngNoiseLevel[st->hFdCngDec->hFdCngCom->stopFFTbin - st->hFdCngDec->hFdCngCom->startBand - 1];
                    for ( int16_t b = st->hFdCngDec->hFdCngCom->stopFFTbin - st->hFdCngDec->hFdCngCom->startBand; b < st->hFdCngDec->hFdCngCom->stopBand; b++ )
                    {
                        st->hFdCngDec->hFdCngCom->cngNoiseLevel[b] = noise_lvl_highest;
                    }
                }
#endif
                generate_comfort_noise_dec_fx( NULL, NULL, NULL, st_fx, &( st_fx->Q_exc ), 2, -1 );

                FdCng_exc( st_fx->hFdCngDec->hFdCngCom, &st_fx->CNG_mode, st_fx->L_frame, st_fx->lsp_old_fx, st_fx->first_CNG, st_fx->lspCNG_fx, Aq_fx, lsp_new_fx, lsf_new_fx, exc_fx, exc2_fx, bwe_exc_fx );
@@ -809,10 +707,6 @@ ivas_error acelp_core_dec_fx(
                move16();
                st_fx->last_nq_preQ = 0;
                move16();
#ifdef IVAS_CODE
                st_fx->last_code_preq = 0;
                move16();
#endif
            }

            st_fx->use_acelp_preq = 0;
@@ -1409,103 +1303,8 @@ ivas_error acelp_core_dec_fx(
#endif
            }
            /* CNA: Generate additional comfort noise to mask potential coding artefacts */

#ifdef IVAS_CODE
            if ( !st->cna_dirac_flag )
            {
                /* CNA: Generate additional comfort noise to mask potential coding artefacts */
                if ( st->flag_cna && !( st->coder_type == AUDIO && !( st->element_mode > EVS_MONO && st->GSC_noisy_speech ) ) )
                {
                    if ( st->element_mode == IVAS_CPE_TD && nchan_out == 2 )
                    {
                        if ( hStereoCng->flag_cna_fade )
                        {
                            generate_stereo_masking_noise( syn, st, hStereoTD, flag_sec_CNA, 1, hStereoCng, nchan_out );
                            hStereoCng->flag_cna_fade = 0;
                        }
                        else
                        {
                            if ( st->element_mode != last_element_mode && st->idchan == 0 )
                            {
                                /* Clear memory for secondary channel CNA */
                                set_f( hStereoCng->olapBufferSynth22, 0.0f, st->hFdCngDec->hFdCngCom->frameSize / 2 );
                            }

                            generate_stereo_masking_noise( syn, st, hStereoTD, flag_sec_CNA, 0, hStereoCng, nchan_out );
                        }
                    }
                    else if ( st->element_mode != IVAS_CPE_DFT )
                    {
                        if ( st->idchan == 0 )
                        {
                            if ( st->element_mode != last_element_mode )
                            {
                                set_f( st->hFdCngDec->hFdCngCom->olapBufferSynth2, 0.0f, st->hFdCngDec->hFdCngCom->fftlen );
                            }
                            generate_masking_noise_fx( syn, st->hFdCngDec->hFdCngCom, st->hFdCngDec->hFdCngCom->frameSize, 0, 0, 0, st->element_mode, hStereoCng, nchan_out );
                        }
                    }
                }
                else if ( st->flag_cna && st->coder_type == AUDIO && ( ( st->last_core == ACELP_CORE && !( st->last_coder_type == AUDIO && !( st->element_mode > EVS_MONO && st->Last_GSC_noisy_speech_flag ) ) ) || st->last_core == TCX_20_CORE ) )
                {
                    if ( st->element_mode == IVAS_CPE_TD && nchan_out == 2 )
                    {
                        generate_stereo_masking_noise( syn, st, hStereoTD, flag_sec_CNA, 1, hStereoCng, nchan_out );
                        hStereoCng->flag_cna_fade = 1;
                    }
                    else
                    {
                        v_multc( st->hFdCngDec->hFdCngCom->olapBufferSynth2 + 5 * st->hFdCngDec->hFdCngCom->frameSize / 4, (float) ( st->hFdCngDec->hFdCngCom->fftlen / 2 ), temp_buf, st->hFdCngDec->hFdCngCom->frameSize / 2 );
                        v_add( temp_buf, syn, syn, st->hFdCngDec->hFdCngCom->frameSize / 2 );
                    }
                }
                else
                {
                    if ( hStereoCng != NULL )
                    {
                        hStereoCng->flag_cna_fade = 1;
                        hStereoCng->enableSecCNA = 0;
                    }
        }

                if ( st->element_mode == IVAS_CPE_TD )
                {
                    /*Noise estimate*/
                    if ( st->idchan == 0 && ( nchan_out == 2 || ( st->core_brate != FRAME_NO_DATA && st->core_brate != SID_2k40 ) ) )
                    {
#ifdef IVAS_CODE_CNG_FIX185_PLC_FADEOUT
                        ApplyFdCng_fx( syn, st_fx->Q_syn, realBuffer, imagBuffer, NULL, st, 0, ( st->coder_type == AUDIO && !st->GSC_noisy_speech ) );
#else
                        ApplyFdCng_fx( syn, st_fx->Q_syn, realBuffer, imagBuffer, NULL, st, 0, ( st->coder_type == AUDIO && !st->GSC_noisy_speech ) );
#endif
                    }
                }
            }
#endif
        }

#ifdef IVAS_CODE
        if ( !st->cna_dirac_flag )
        {
            if ( st->flag_cna == 0 && st->L_frame == L_FRAME16k && st->last_flag_cna == 1 && ( ( st->last_core == ACELP_CORE && !( st->last_coder_type == AUDIO && !( st->element_mode > EVS_MONO && st->Last_GSC_noisy_speech_flag ) ) ) || st->last_core == AMR_WB_CORE ) )
            {
                v_multc( st->hFdCngDec->hFdCngCom->olapBufferSynth2 + 5 * st->L_frame / 4, 256.f, temp_buf, st->L_frame / 2 );
                v_add( temp_buf, syn, syn, st->L_frame / 2 );
            }

            if ( st->flag_cna == 0 || ( st->coder_type == AUDIO && !( st->element_mode > EVS_MONO && st->GSC_noisy_speech ) ) )
            {
                if ( st->idchan == 0 )
                {
                    set_f( st->hFdCngDec->hFdCngCom->olapBufferSynth2, 0.f, st->hFdCngDec->hFdCngCom->fftlen );
                }
                if ( hStereoCng != NULL && st->idchan == 0 )
                {
                    set_f( hStereoCng->olapBufferSynth22, 0.f, st->hFdCngDec->hFdCngCom->fftlen );
                }
            }
        }
#else
        test();
        test();
        test();
@@ -1522,29 +1321,6 @@ ivas_error acelp_core_dec_fx(
                move16();
            }
        }
#endif

#ifndef IVAS_CODE
        test();
        test();
        test();
        test();
        test();
        IF( st_fx->flag_cna == 0 && EQ_16( st_fx->L_frame, L_FRAME16k ) && EQ_16( st_fx->last_flag_cna, 1 ) && ( ( st_fx->last_core == ACELP_CORE && NE_16( st_fx->last_coder_type, AUDIO ) ) || EQ_16( st_fx->last_core, AMR_WB_CORE ) ) )
        {
            FOR( i = 0; i < st_fx->L_frame / 2; i++ )
            {
                syn_fx[i] = add( syn_fx[i], shr_r( st_fx->hFdCngDec->hFdCngCom->olapBufferSynth2[i + 5 * st_fx->L_frame / 4], negate( st_fx->Q_syn ) ) );
                move16();
            }
        }

        test();
        IF( st_fx->flag_cna == 0 || EQ_16( st_fx->coder_type, AUDIO ) )
        {
            set16_fx( st_fx->hFdCngDec->hFdCngCom->olapBufferSynth2, 0, st_fx->hFdCngDec->hFdCngCom->fftlen );
        }
#endif
    }

    /*----------------------------------------------------------------*
@@ -1589,20 +1365,6 @@ ivas_error acelp_core_dec_fx(
    test();
    IF( NE_16( st_fx->element_mode, IVAS_CPE_DFT ) || use_cldfb_for_dft )
    {
#ifdef IVAS_CODE
        float realBufferSave[CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX];
        float imagBufferSave[CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX];
        float *pRealSave[CLDFB_NO_COL_MAX], *pImagSave[CLDFB_NO_COL_MAX];
        for ( i = 0; i < CLDFB_NO_COL_MAX; i++ )
        {
            pRealSave[i] = realBufferSave[i];
            pImagSave[i] = imagBufferSave[i];
        }
        if ( st->p_bpf_noise_buf )
        {
            mvr2r( bpf_error_signal, st->p_bpf_noise_buf, st->L_frame );
        }
#endif
        /* analysis of the synthesis at internal sampling rate */
        cldfbAnalysisFiltering( st_fx->cldfbAna, realBuffer, imagBuffer, &scaleFactor, syn_fx, negate( st_fx->Q_syn ), CLDFB_NO_COL_MAX, workBuffer );

@@ -1663,40 +1425,6 @@ ivas_error acelp_core_dec_fx(
        /* synthesis of the combined signal */
        st_fx->Q_syn2 = st_fx->Q_syn;
        move16();
#ifdef IVAS_CODE
        if ( save_hb_synth != NULL )
        {
            /* save and then zero-out lowband */
            for ( int16_t j = 0; j < CLDFB_NO_CHANNELS_MAX; j++ )
            {
                for ( i = 0; i < CLDFB_NO_COL_MAX; i++ )
                {
                    realBufferSave[i][j] = realBuffer[i][j];
                    imagBufferSave[i][j] = imagBuffer[i][j];
                    if ( j < st->hFdCngDec->hFdCngCom->numCoreBands && i < st->hFdCngDec->hFdCngCom->numSlots )
                    {
                        realBuffer[i][j] = 0.0f;
                        imagBuffer[i][j] = 0.0f;
                    }
                }
            }

            cldfbSynthesis( realBuffer, imagBuffer, save_hb_synth, -1, st->cldfbSynHB );

            /* restore lowband */
            for ( int16_t j = 0; j < CLDFB_NO_CHANNELS_MAX; j++ )
            {
                for ( i = 0; i < CLDFB_NO_COL_MAX; i++ )
                {
                    realBuffer[i][j] = realBufferSave[i][j];
                    imagBuffer[i][j] = imagBufferSave[i][j];
                }
            }

            cldfbSynthesis( pRealSave, pImagSave, synth, -1, st->cldfbSyn );
        }
        else
#endif
        {
            cldfbSynthesisFiltering( st_fx->cldfbSyn, realBuffer, imagBuffer, &scaleFactor, synth_out, negate( st_fx->Q_syn2 ), CLDFB_NO_COL_MAX, workBuffer );
        }
@@ -1708,34 +1436,7 @@ ivas_error acelp_core_dec_fx(
        /* save synthesis - needed in case of core switching */
        Copy( synth_out, st_fx->previoussynth_fx, output_frame );
    }
#ifdef IVAS_CODE
    ELSE
    {
        int16_t nSamples = NS2SA( st->L_frame * FRAMES_PER_SEC, FRAME_SIZE_NS /*DELAY_CLDFB_NS*/ ); /* IVAS-64: optimization is likely possible here (don't resample the whole frame) */

        /* analysis of the synthesis at internal sampling rate - needed for DFT stereo -> TD stereo switching */
        cldfbAnalysis( syn + st->L_frame - nSamples, realBuffer, imagBuffer, nSamples, st->cldfbAna );

        /* analysis and add the BPF error signal - needed for DFT stereo -> TD stereo switching */
        addBassPostFilter( bpf_error_signal + st->L_frame - nSamples, st->bpf_off ? 0 : nSamples, realBuffer, imagBuffer, st->cldfbBPF );

        /* synthesis of the combined signal - needed for DFT stereo -> TD stereo switching */
        cldfbSynthesis( realBuffer, imagBuffer, synth /*dummy*/, NS2SA( st->output_Fs, FRAME_SIZE_NS /*DELAY_CLDFB_NS*/ ), st->cldfbSyn );

        if ( st->p_bpf_noise_buf )
        {
            mvr2r( bpf_error_signal, st->p_bpf_noise_buf, st->L_frame );
        }

        set_f( synth, 0.0f, output_frame );
    }

    /* Copy output signal */
    if ( st->element_mode > EVS_MONO )
    {
        mvr2r( syn, output, st->L_frame );
    }
#endif
    /*-----------------------------------------------------------------*
     * Bandwidth extension 6kHz-7kHz
     *-----------------------------------------------------------------*/
+3 −5
Original line number Diff line number Diff line
@@ -8,7 +8,6 @@
#include "prot_fx.h" /* Function prototypes                    */
#include "rom_com.h" /* Static table prototypes                */

#define IVAS_CODE
#define IVAS_CODE_AVQ
/*-----------------------------------------------------------------*
 * transf_cdbk_dec()
@@ -36,7 +35,6 @@ void transf_cdbk_dec_fx(
    Flag Overflow = 0;
    move32();
#endif
#ifdef IVAS_CODE
    Word16 avq_bit_sFlag;
    Word16 trgtSvPos;
    Word16 Nsv;
@@ -50,7 +48,7 @@ void transf_cdbk_dec_fx(
        move16();
        avq_bit_sFlag = 1;
    }
#endif

    /*--------------------------------------------------------------*
     * Set bit-allocation
     *--------------------------------------------------------------*/
@@ -112,7 +110,7 @@ void transf_cdbk_dec_fx(
        *gain_preQ = round_fx( L_tmp );          /* Q2*/
        move16();
    }
#ifdef IVAS_CODE

    trgtSvPos = sub( Nsv, 1 );
    test();
    test();
@@ -126,7 +124,7 @@ void transf_cdbk_dec_fx(
        move16();
        move16();
    }
#endif

    /*--------------------------------------------------------------*
     * Demultiplex and decode subvectors from bit-stream
     *--------------------------------------------------------------*/
+0 −4
Original line number Diff line number Diff line
@@ -36,11 +36,7 @@ ivas_error evs_dec_fx(
    Word16 exp, fra;
    Word16 tmp_buffer_fx[L_FRAME48k];
    Word16 tmp16, tmp16_2;
#ifdef IVAS_CODE
    Word16 synth_fx[L_FRAME48k];
#else
    Word16 synth_fx[L_FRAME48k + HQ_DELTA_MAX * HQ_DELAY_COMP];
#endif
    Word16 fb_exc_fx[L_FRAME16k];
    Word16 pitch_buf_fx[NB_SUBFR16k] = { 0 };
    Word16 Q_fb_exc;
+2 −9
Original line number Diff line number Diff line
@@ -370,11 +370,8 @@ void decod_audio_fx(

    tmp_nb_bits_tot = st_fx->next_bit_pos; /* Q0 */
    move16();
#ifdef IVAS_CODE
    if ( st_fx->extl_brate_fx_orig > 0 )
#else

    if ( st_fx->extl_brate > 0 )
#endif
    {
        /* subtract 1 bit for TBE/BWE BWE flag (bit counted in extl_brate) */
        tmp_nb_bits_tot = sub( tmp_nb_bits_tot, 1 ); /* Q0 */
@@ -873,17 +870,13 @@ void decod_audio_ivas_fx(

    tmp_nb_bits_tot = st_fx->next_bit_pos; /* Q0 */
    move16();
#if 1 // def IVAS_CODE

    if ( st_fx->extl_brate_orig > 0 )
#else
    if ( st_fx->extl_brate > 0 )
#endif
    {
        /* subtract 1 bit for TBE/BWE BWE flag (bit counted in extl_brate) */
        tmp_nb_bits_tot = sub( tmp_nb_bits_tot, 1 ); /* Q0 */
    }


    test();
    test();
    if ( st_fx->coder_type == INACTIVE && LE_32( st_fx->core_brate, ACELP_9k60 ) && st_fx->idchan == 0 )
Loading