diff --git a/lib_com/options.h b/lib_com/options.h index 43901759b7e9e6d150826e15c5567cf16cb51e3b..7b786bd041727e6fb7f67c8247a3c9f1e08f8011 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -48,7 +48,7 @@ /* ################### Start DEBUGGING switches ########################### */ #ifndef RELEASE -/*#define DEBUGGING*/ /* Activate debugging part of the code */ +/*#define DEBUGGING*/ /* Activate debugging part of the code */ #endif /*#define WMOPS*/ /* Activate complexity and memory counters */ /*#define WMOPS_PER_FRAME*/ /* Output per-frame complexity (writes one float value per frame to the file "wmops_analysis") */ @@ -168,6 +168,7 @@ #define NON_BE_1055_RESET_LP_MEMORIES /* VA: issue 1055: Correctly reset LP filter MA and AR memories in bitrate switching */ #define NONBE_FIX_1058_DECODER_ERROR_WITH_REVERB_ROOM /* FhG: issue 1058: do not initialize EFAP when IntSetup is HOA3 */ +#define NONBE_FIX_1056_ISM_RATE_SWITCH /* FhG: Fix #1056: fix TC buffer udpate on a ISM rate switch */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_dec/ivas_ism_dec.c b/lib_dec/ivas_ism_dec.c index b23b16ca63898788844c83b46118f52a575d0ef8..b265faa3f074baac8c7560d9b09f31eb7b966b7b 100644 --- a/lib_dec/ivas_ism_dec.c +++ b/lib_dec/ivas_ism_dec.c @@ -130,7 +130,12 @@ static ivas_error ivas_ism_bitrate_switching_dec( { /* 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 ( last_ism_mode == ISM_MODE_PARAM && st_ivas->hSpatParamRendCom != NULL && st_ivas->hTcBuffer->tc_buffer_mode != TC_BUFFER_MODE_BUFFER ) +#else if ( last_ism_mode == ISM_MODE_PARAM && st_ivas->hSpatParamRendCom != NULL && ( st_ivas->renderer_type != RENDERER_MONO_DOWNMIX && st_ivas->renderer_type != RENDERER_DISABLE ) ) +#endif { st_ivas->hTcBuffer->nb_subframes = st_ivas->hSpatParamRendCom->nb_subframes; st_ivas->hTcBuffer->subframes_rendered = st_ivas->hSpatParamRendCom->subframes_rendered; diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index e6a2ee3194b708ba39bee12170f83bacd137ba5a..a4d760fbbdf7cfc6e76fc1c54dea15e1cdc88ef1 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -2585,6 +2585,9 @@ static void ivas_jbm_dec_tc_buffer_playout( slots_to_render -= st_ivas->hTcBuffer->subframe_nbslots[last_sf]; last_sf++; } +#ifdef DEBUGGING + assert( slots_to_render == 0 ); +#endif for ( ch_idx = 0; ch_idx < st_ivas->hTcBuffer->nchan_transport_jbm; ch_idx++ ) {