From c693b7cbdf974718196c85378516ca3e04d86980 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 19 Mar 2025 15:24:18 +0100 Subject: [PATCH 1/3] Accept FIX_920_IGF_INIT_ERROR --- lib_com/options.h | 1 - lib_com/prot.h | 2 -- lib_enc/core_enc_init.c | 6 ------ lib_enc/core_enc_switch.c | 4 ---- lib_enc/init_enc.c | 4 ---- 5 files changed, 17 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 253a52330..d57961166 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -179,7 +179,6 @@ #define NONBE_1211_DTX_BR_SWITCHING /* VA: port float issue 1211: fix crash in MASA DTX bitrate switching */ #define NONBE_FIX_1189_GSC_IVAS_OMASA /* VA: Fix for issue 1189: Bitstream desynchornization due to reading/writing of the GSC_IVAS_mode parameter */ #define NONBE_FIX_1087_OOB_SBA_DTX_RS /* VA: issue 1087: Extend the length of the buffer for MCT decoding to avoid out-of-bound writing in SBA SID bitrate switching decoding */ -#define FIX_920_IGF_INIT_ERROR /* FhG: issue 920: fix bitrate mismatch in initial IGF config to avoid error message in same cases */ #define NONBE_1273_ISM_METADATA_COUNTER /* VA: FLP issue 1273: fix counter overflow in ISM metadata encoder */ #define NONBE_FIX_GSC_BSTR /* VA: issue 1264 FLP (1189 BASOP): Fix bitstream synchronization between encoder and decoder in ACELP GSC in OMASA */ #define NONBE_FIX_1277_EVS_DTX_HIGH_RATE_THRESHOLD /* VA/Eri: FLP issue 1277: Fix Mismatch in DTX high-rate threshold between EVS float and BASOP */ diff --git a/lib_com/prot.h b/lib_com/prot.h index 57f477420..af90b9194 100644 --- a/lib_com/prot.h +++ b/lib_com/prot.h @@ -6771,9 +6771,7 @@ float correlation_shift( void init_coder_ace_plus( Encoder_State *st, /* i : Encoder state handle */ const int32_t last_total_brate, /* i : last total bitrate */ -#ifdef FIX_920_IGF_INIT_ERROR const int32_t igf_brate, /* i : IGF configuration bitrate */ -#endif const int16_t MCT_flag /* i : hMCT handle allocated (1) or not (0)*/ ); diff --git a/lib_enc/core_enc_init.c b/lib_enc/core_enc_init.c index 4b4bd0c4f..bb53175b7 100644 --- a/lib_enc/core_enc_init.c +++ b/lib_enc/core_enc_init.c @@ -64,9 +64,7 @@ static void init_modes( Encoder_State *st, const int32_t last_total_brate ); void init_coder_ace_plus( Encoder_State *st, /* i : Encoder state */ const int32_t last_total_brate, /* i : last total bitrate */ -#ifdef FIX_920_IGF_INIT_ERROR const int32_t igf_brate, /* i : IGF configuration bitrate */ -#endif const int16_t MCT_flag /* i : hMCT handle allocated (1) or not (0) */ ) { @@ -157,11 +155,7 @@ void init_coder_ace_plus( if ( st->igf && st->hIGFEnc != NULL ) { -#ifdef FIX_920_IGF_INIT_ERROR IGFEncSetMode( st->hIGFEnc, igf_brate, st->bwidth, st->element_mode, st->rf_mode ); -#else - IGFEncSetMode( st->hIGFEnc, st->total_brate, st->bwidth, st->element_mode, st->rf_mode ); -#endif } else if ( st->hIGFEnc != NULL ) { diff --git a/lib_enc/core_enc_switch.c b/lib_enc/core_enc_switch.c index 25266ed4c..dfc4b337b 100644 --- a/lib_enc/core_enc_switch.c +++ b/lib_enc/core_enc_switch.c @@ -152,11 +152,7 @@ void core_coder_mode_switch( else { st->igf = getIgfPresent( st->element_mode, st->total_brate, st->bwidth, st->rf_mode ); -#ifdef FIX_920_IGF_INIT_ERROR init_coder_ace_plus( st, last_total_brate, st->total_brate, MCT_flag ); -#else - init_coder_ace_plus( st, last_total_brate, MCT_flag ); -#endif } if ( st->igf && st->hBWE_TD != NULL ) diff --git a/lib_enc/init_enc.c b/lib_enc/init_enc.c index 9734864a6..e920f21bc 100644 --- a/lib_enc/init_enc.c +++ b/lib_enc/init_enc.c @@ -825,11 +825,7 @@ ivas_error init_encoder( set_f( st->totalNoise_increase_hist, 0.f, TOTALNOISE_HIST_SIZE ); st->totalNoise_increase_len = 0; -#ifdef FIX_920_IGF_INIT_ERROR init_coder_ace_plus( st, st->last_total_brate, igf_brate, 0 /* initialization value */ ); -#else - init_coder_ace_plus( st, st->last_total_brate, 0 /* initialization value */ ); -#endif /*-----------------------------------------------------------------* * FD-CNG encoder -- GitLab From 1827f9c7569e21cc44972cc373082afdf972e1ef Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 19 Mar 2025 15:51:11 +0100 Subject: [PATCH 2/3] Accept NONBE_FIX_855_JBM_FLUSH_OFFSET --- lib_com/options.h | 1 - lib_dec/ivas_jbm_dec.c | 6 ------ 2 files changed, 7 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index d57961166..ee26612db 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -198,7 +198,6 @@ #define SPLIT_REND_POSE_CORRECTION_UNUSED_BITS #define ISAR_BITSTREAM_UPDATE_LC3PLUS /* FhG: Multiple improvements to the ISAR bitstream when LC3plus is used. See MR 1456 for details. */ #endif -#define NONBE_FIX_855_JBM_FLUSH_OFFSET /* FhG: issue #855: add missing switch here for the code in JBM flushing */ #define FIX_923_EXTERNAL_REND_COMMAND_LINE /* VA: issue 923: enable external renderer command-line options in UPPER case letters */ #define FIX_921_OMASA_DELAY_PRINTOUT /* VA: issue 921: correct OMASA decoder delay printout */ #define NONBE_FIX_926_OSBA_DECODER_CRASH_PLANAR_SBA /* FhG: issue 926: crash in OSBA decoding with planar FOA */ diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 73eb0117e..24dab7098 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -1577,11 +1577,7 @@ ivas_error ivas_jbm_dec_flush_renderer( hTcBuffer->n_samples_buffered = hTcBuffer->n_samples_granularity + n_samples_still_available; hTcBuffer->n_samples_available = 0; hTcBuffer->n_samples_flushed = n_samples_to_render; -#ifdef NONBE_FIX_855_JBM_FLUSH_OFFSET hTcBuffer->n_samples_rendered = 0; -#else - hTcBuffer->n_samples_rendered = hTcBuffer->n_samples_granularity; -#endif for ( ch_idx = 0; ch_idx < MAX_CICP_CHANNELS; ch_idx++ ) { @@ -1733,9 +1729,7 @@ ivas_error ivas_jbm_dec_flush_renderer( { return IVAS_ERROR( IVAS_ERR_WRONG_MODE, "Wrong IVAS format in VoIP renderer flushing!" ); } -#ifdef NONBE_FIX_855_JBM_FLUSH_OFFSET hTcBuffer->n_samples_rendered = hTcBuffer->n_samples_granularity; -#endif } /* update global combined orientation start index */ -- GitLab From dd67e93ebc6a50d3b30f45c089660a9b95cdf0c7 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 19 Mar 2025 16:00:37 +0100 Subject: [PATCH 3/3] run formatter --- lib_com/prot.h | 4 ++-- lib_enc/core_enc_init.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib_com/prot.h b/lib_com/prot.h index af90b9194..b00bf85d6 100644 --- a/lib_com/prot.h +++ b/lib_com/prot.h @@ -6771,8 +6771,8 @@ float correlation_shift( void init_coder_ace_plus( Encoder_State *st, /* i : Encoder state handle */ const int32_t last_total_brate, /* i : last total bitrate */ - const int32_t igf_brate, /* i : IGF configuration bitrate */ - const int16_t MCT_flag /* i : hMCT handle allocated (1) or not (0)*/ + const int32_t igf_brate, /* i : IGF configuration bitrate */ + const int16_t MCT_flag /* i : hMCT handle allocated (1) or not (0)*/ ); void core_coder_reconfig( diff --git a/lib_enc/core_enc_init.c b/lib_enc/core_enc_init.c index bb53175b7..70f9efa9e 100644 --- a/lib_enc/core_enc_init.c +++ b/lib_enc/core_enc_init.c @@ -64,8 +64,8 @@ static void init_modes( Encoder_State *st, const int32_t last_total_brate ); void init_coder_ace_plus( Encoder_State *st, /* i : Encoder state */ const int32_t last_total_brate, /* i : last total bitrate */ - const int32_t igf_brate, /* i : IGF configuration bitrate */ - const int16_t MCT_flag /* i : hMCT handle allocated (1) or not (0) */ + const int32_t igf_brate, /* i : IGF configuration bitrate */ + const int16_t MCT_flag /* i : hMCT handle allocated (1) or not (0) */ ) { TCX_ENC_HANDLE hTcxEnc = st->hTcxEnc; -- GitLab