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

use st->total_brate in FD cng configuration for SCEs

parent ca227f6e
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -214,6 +214,8 @@
//#define HODIRAC_READ_PARAMS
#endif

#define FIX_443_FD_CNG_INIT                             /* FhG: correct bitrate value for FD-CNG init */

/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */

+7 −0
Original line number Diff line number Diff line
@@ -563,7 +563,14 @@ ivas_error pre_proc_front_ivas(

    if ( st->hFdCngEnc != NULL && ( st->ini_frame == 0 || last_element_brate != element_brate || st->last_bwidth != st->bwidth ) )
    {
#ifdef FIX_443_FD_CNG_INIT
        int16_t total_brate;

        total_brate = ( element_mode == IVAS_SCE ) ? st->total_brate : st->bits_frame_nominal * FRAMES_PER_SEC;
        configureFdCngEnc( st->hFdCngEnc, max( st->input_bwidth, WB ), total_brate );
#else
        configureFdCngEnc( st->hFdCngEnc, max( st->input_bwidth, WB ), st->bits_frame_nominal * FRAMES_PER_SEC );
#endif
        if ( hCPE != NULL )
        {
            st->hFdCngEnc->hFdCngCom->CngBitrate = hCPE->element_brate - 1;