From 362a5935f4a97e0d2913eeb06bb169d574a21618 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Wed, 21 May 2025 16:23:49 +0200 Subject: [PATCH] port NONBE_FIX_999_JBM_MCT_FLUSH --- lib_com/options.h | 1 + lib_dec/ivas_jbm_dec_fx.c | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 3e4dae0d5..bffb21a18 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -128,6 +128,7 @@ #ifdef NONBE_FIX_947_STEREO_DMX_EVS_PHA #define NONBE_FIX_947_STEREO_DMX_FADOPT /* Orange: Fading optimisation */ #endif +#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_fx.c b/lib_dec/ivas_jbm_dec_fx.c index c85e36d8e..f8936a44c 100644 --- a/lib_dec/ivas_jbm_dec_fx.c +++ b/lib_dec/ivas_jbm_dec_fx.c @@ -2818,7 +2818,11 @@ ivas_error ivas_jbm_dec_flush_renderer_fx( ivas_binaural_add_LFE_fx( st_ivas, hTcBuffer->n_samples_granularity, st_ivas->hTcBuffer->tc_fx, p_output_fx ); } +#ifdef NONBE_FIX_999_JBM_MCT_FLUSH + ELSE IF( EQ_16( renderer_type_old, RENDERER_BINAURAL_OBJECTS_TD ) ) +#else ELSE IF( EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_OBJECTS_TD ) ) +#endif { IF( NE_32( ( error = ivas_td_binaural_renderer_sf_fx( st_ivas, p_output_fx, hTcBuffer->n_samples_granularity ) ), IVAS_ERR_OK ) ) { @@ -2826,6 +2830,12 @@ ivas_error ivas_jbm_dec_flush_renderer_fx( } ivas_binaural_add_LFE_fx( st_ivas, *nSamplesRendered, st_ivas->hTcBuffer->tc_fx, p_output_fx ); } +#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