diff --git a/lib_com/options.h b/lib_com/options.h index 49d8d544d2b6700f0c8fb400ed092ae9aef3ec71..77fe75096d82188105ab9065fc13264b8e461df9 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -207,6 +207,7 @@ #define FIX_642 /* FhG: Fix for issue 642, buggy DoA-array access in DirAC head rotation*/ +#define FIX_443_FD_CNG_INIT /* FhG: correct bitrate value for FD-CNG init */ #define VARIABLE_SPEED_DECODING /* FhG: variable speed decoding employing the JBM functioniality */ #define JBM_TSM_ON_TCS /* FhG: run the TSM part of JBM on the TCs instead of the final output pcm waveforms */ diff --git a/lib_enc/ivas_core_pre_proc_front.c b/lib_enc/ivas_core_pre_proc_front.c index cf23ddef539f2e2f7ceeba7997129b0f07829b9c..5f775d2403a18af76b8b74fc1d1816dfdf7c314d 100644 --- a/lib_enc/ivas_core_pre_proc_front.c +++ b/lib_enc/ivas_core_pre_proc_front.c @@ -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 + int32_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;