From 5d3ee4210a09f476089c2489360df9fd6a18ad52 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Wed, 21 May 2025 16:21:14 +0200 Subject: [PATCH] port NONBE_FIX_999_JBM_MCT_FLUSH --- lib_com/options.h | 1 + lib_dec/ivas_jbm_dec.c | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 23bacc0d5..51de9fe28 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -219,6 +219,7 @@ #define FIX_ACCESS_WITHIN_NULL_STRUCT_MC_BW_SWITCHING /* FhG: fix usan error in MCT with bw swicthing */ #define NONBE_FIX_986_MC_BW_SWITCHING /* FhG: fix crash in bw and br switching with MC */ +#define NONBE_FIX_999_JBM_MCT_FLUSH /* FhG: issue #999: fix wrong flushing for MCT at a JBM rate switch */ /* #################### End BASOP porting switches ############################ */ diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 6942b1e7d..5c5136738 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -1652,7 +1652,11 @@ ivas_error ivas_jbm_dec_flush_renderer( ivas_binaural_add_LFE( st_ivas, hTcBuffer->n_samples_granularity, st_ivas->hTcBuffer->tc, p_output ); } +#ifdef NONBE_FIX_999_JBM_MCT_FLUSH + else if ( renderer_type_old == RENDERER_BINAURAL_OBJECTS_TD ) +#else else if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) +#endif { if ( ( error = ivas_td_binaural_renderer_sf( st_ivas, p_output, hTcBuffer->n_samples_granularity ) ) != IVAS_ERR_OK ) { @@ -1661,6 +1665,12 @@ ivas_error ivas_jbm_dec_flush_renderer( ivas_binaural_add_LFE( st_ivas, hTcBuffer->n_samples_granularity, st_ivas->hTcBuffer->tc, p_output ); } +#ifdef NONBE_FIX_999_JBM_MCT_FLUSH + else + { + return IVAS_ERROR( IVAS_ERR_WRONG_MODE, "Wrong renderer in MCT VoIP renderer flushing!" ); + } +#endif } else { -- GitLab