diff --git a/lib_com/options.h b/lib_com/options.h index cf016659dadd0463a03c3b7f1af8f921df038de5..7872de13b305e2d78690a1d335f4f5ca8b96cf31 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -165,6 +165,7 @@ #define FIX_1835_REVERB_ACTIVATION /* FhG: Modified reverberation activation logic and corrected factEQ calculation */ #define NON_BE_FIX_EVS_USAN_ERR_IN_WAVEADJUST /* FhG: address issue 1037 */ #define FIX_1038_OFFSET_TO_NULL_PTR_IN_EVS_TCX_BFI /* FhG: move setting of pointers for parameter decoding so they are skipped in lost frames when they are not needed */ +#define NONBE_FIX_1056_ISM_RATE_SWITCH /* FhG: Fix #1056: fix TC buffer udpate on a ISM rate switch */ /* #################### End BASOP porting switches ############################ */ diff --git a/lib_dec/ivas_ism_dec_fx.c b/lib_dec/ivas_ism_dec_fx.c index 41c1efcdc6889c15f86b8c64419cf958c106b0e4..ec5a19a5db5a11e7aa94b69da1cfc055b757741b 100644 --- a/lib_dec/ivas_ism_dec_fx.c +++ b/lib_dec/ivas_ism_dec_fx.c @@ -142,9 +142,16 @@ static ivas_error ivas_ism_bitrate_switching_dec_fx( { test(); test(); +#ifndef NONBE_FIX_1056_ISM_RATE_SWITCH test(); - /* transfer subframe info from DirAC or ParamMC to central tc buffer */ +#endif +/* transfer subframe info from DirAC or ParamMC to central tc buffer */ +#ifdef NONBE_FIX_1056_ISM_RATE_SWITCH + /* only do this if we are not having done everything already in the TC decoding part and having only played out from the TC buffer */ + IF( EQ_32( last_ism_mode, ISM_MODE_PARAM ) && st_ivas->hSpatParamRendCom != NULL && NE_32( st_ivas->hTcBuffer->tc_buffer_mode, TC_BUFFER_MODE_BUFFER ) ) +#else IF( EQ_32( last_ism_mode, ISM_MODE_PARAM ) && st_ivas->hSpatParamRendCom != NULL && ( NE_32( st_ivas->renderer_type, RENDERER_MONO_DOWNMIX ) && NE_32( st_ivas->renderer_type, RENDERER_DISABLE ) ) ) +#endif { st_ivas->hTcBuffer->nb_subframes = st_ivas->hSpatParamRendCom->nb_subframes; move16(); diff --git a/lib_dec/ivas_jbm_dec_fx.c b/lib_dec/ivas_jbm_dec_fx.c index 48264d70fb7cb3dd87229a603e510fa7d4c1a798..f4c6619508cf5082146d692d26f56fc836d35b39 100644 --- a/lib_dec/ivas_jbm_dec_fx.c +++ b/lib_dec/ivas_jbm_dec_fx.c @@ -3828,6 +3828,9 @@ static void ivas_jbm_dec_tc_buffer_playout_fx( slots_to_render = sub( slots_to_render, st_ivas->hTcBuffer->subframe_nbslots[last_sf] ); last_sf = add( last_sf, 1 ); } +#ifdef DEBUGGING + assert( slots_to_render == 0 ); +#endif FOR( ch_idx = 0; ch_idx < st_ivas->hTcBuffer->nchan_transport_jbm; ch_idx++ ) {