Commit c01940a6 authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch '101-fd-cng-encoder-handle-initialization' into 'main'

[non-BE] Resolve "FD CNG encoder handle initialization"

See merge request !200
parents 4590e00d e95e67d2
Loading
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -785,8 +785,13 @@ ivas_error init_encoder(
        }

        initFdCngEnc( st->hFdCngEnc, st->input_Fs, st->cldfbAnaEnc->scale );

        /* initialization for IVAS modes happens in first frame pre-processing */
        if ( st->element_mode == EVS_MONO )
        {
            configureFdCngEnc( st->hFdCngEnc, st->bwidth, st->rf_mode && st->total_brate == ACELP_13k20 ? ACELP_9k60 : st->total_brate );
        }
    }
    else
    {
        st->hFdCngEnc = NULL;
+1 −1
Original line number Diff line number Diff line
@@ -553,7 +553,7 @@ ivas_error pre_proc_front_ivas(
     * Adjust FD-CNG Noise Estimator
     *----------------------------------------------------------------*/

    if ( st->hFdCngEnc != NULL && ( last_element_brate != element_brate || st->last_bwidth != st->bwidth ) )
    if ( st->hFdCngEnc != NULL && ( st->ini_frame == 0 || last_element_brate != element_brate || st->last_bwidth != st->bwidth ) )
    {
        configureFdCngEnc( st->hFdCngEnc, max( st->input_bwidth, WB ), st->bits_frame_nominal * FRAMES_PER_SEC );
        if ( hCPE != NULL )