diff --git a/lib_com/options.h b/lib_com/options.h index 6b2998e3de454d0963569468fb349da4d42883b4..142e1ea7106465cc02b45fbc2338569a5a8b61a5 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -185,6 +185,7 @@ #define NONBE_FIX_991_PARAMBIN_BINARY_HRTF /* Nokia: issue #991: fix using of binary file HRTF in ParamBin (to actiate when USE_NEW_HRTF_BINARY_FILE_FORMAT and FIX_777_COMBI_RENDER_CONFIG_FILE are on )*/ #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 */ #define NONBE_FIX_984_OMASA_EXT_OUTPUT /* Nok: issue 1497 - porting OMASA EXT MR */ /* #################### End BASOP porting switches ############################ */ diff --git a/lib_dec/ivas_ism_dec.c b/lib_dec/ivas_ism_dec.c index 330999862a548f4c076286c4b7febea5a7d38c5c..b3b19d4424334c4a63eed54531b80f66b294376e 100644 --- a/lib_dec/ivas_ism_dec.c +++ b/lib_dec/ivas_ism_dec.c @@ -125,8 +125,13 @@ static ivas_error ivas_ism_bitrate_switching_dec( } { - /* transfer subframe info from DirAC or ParamMC to central tc buffer */ +/* 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 3371cc929850623137f1c2417ca655c4457300e1..ed9c49a51a35d1fe3ffcc0c47aefc40a18f910cf 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -2513,6 +2513,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++ ) {