diff --git a/lib_com/options.h b/lib_com/options.h index 225875b2a8e56ba0135b0396aa0933097b8df471..7b19fc92a1d5405d9ebd31166a9b6db6afc95197 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -131,9 +131,10 @@ #ifdef NONBE_FIX_947_STEREO_DMX_EVS_PHA #define NONBE_FIX_947_STEREO_DMX_FADOPT /* Orange: Fading optimisation */ #endif + #define FIX_1003_PARAMISM_BINAURAL_RECONFIG_USAN /* FhG: fix for #1003: fix USAN caused by ParamISM reconfig */ #define FIX_1001_ARI_HM_OVERFLOW /* FhG: (no changes needed in BASOP) fix for undef behaviour in in the harmonic TCX model arithmetic coder */ - +#define NONBE_FIX_1005_MC_RS_TCBUFFER_UPDATE /* FhG: issue #1005: fix TC Buffer update at a MC rate switch */ /* #################### End BASOP porting switches ############################ */ diff --git a/lib_dec/ivas_mct_dec_fx.c b/lib_dec/ivas_mct_dec_fx.c index db9cddc39b60321ed51c9394b12e19a518e38286..5550c4ea13ac4ce80082eed67e0b2553226b967f 100644 --- a/lib_dec/ivas_mct_dec_fx.c +++ b/lib_dec/ivas_mct_dec_fx.c @@ -1022,31 +1022,39 @@ static ivas_error ivas_mc_dec_reconfig_fx( ivas_output_init( &( st_ivas->hIntSetup ), st_ivas->intern_config ); /* transfer subframe info from DirAC or ParamMC to central tc buffer */ - test(); - IF( EQ_16( last_mc_mode, MC_MODE_PARAMMC ) ) - { - st_ivas->hTcBuffer->nb_subframes = st_ivas->hParamMC->nb_subframes; - move16(); - st_ivas->hTcBuffer->subframes_rendered = st_ivas->hParamMC->subframes_rendered; - move16(); - st_ivas->hTcBuffer->num_slots = st_ivas->hParamMC->num_slots; - move16(); - st_ivas->hTcBuffer->slots_rendered = st_ivas->hParamMC->slots_rendered; - move16(); - Copy( st_ivas->hParamMC->subframe_nbslots, st_ivas->hTcBuffer->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS ); - } - ELSE IF( EQ_16( last_mc_mode, MC_MODE_MCMASA ) && st_ivas->hSpatParamRendCom != NULL ) + +#ifdef NONBE_FIX_1005_MC_RS_TCBUFFER_UPDATE + if ( st_ivas->hTcBuffer->tc_buffer_mode != TC_BUFFER_MODE_BUFFER ) { - st_ivas->hTcBuffer->nb_subframes = st_ivas->hSpatParamRendCom->nb_subframes; - move16(); - st_ivas->hTcBuffer->subframes_rendered = st_ivas->hSpatParamRendCom->subframes_rendered; - move16(); - st_ivas->hTcBuffer->num_slots = st_ivas->hSpatParamRendCom->num_slots; - move16(); - st_ivas->hTcBuffer->slots_rendered = st_ivas->hSpatParamRendCom->slots_rendered; - move16(); - Copy( st_ivas->hSpatParamRendCom->subframe_nbslots, st_ivas->hTcBuffer->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS ); +#endif + test(); + IF( EQ_16( last_mc_mode, MC_MODE_PARAMMC ) ) + { + st_ivas->hTcBuffer->nb_subframes = st_ivas->hParamMC->nb_subframes; + move16(); + st_ivas->hTcBuffer->subframes_rendered = st_ivas->hParamMC->subframes_rendered; + move16(); + st_ivas->hTcBuffer->num_slots = st_ivas->hParamMC->num_slots; + move16(); + st_ivas->hTcBuffer->slots_rendered = st_ivas->hParamMC->slots_rendered; + move16(); + Copy( st_ivas->hParamMC->subframe_nbslots, st_ivas->hTcBuffer->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS ); + } + ELSE IF( EQ_16( last_mc_mode, MC_MODE_MCMASA ) && st_ivas->hSpatParamRendCom != NULL ) + { + st_ivas->hTcBuffer->nb_subframes = st_ivas->hSpatParamRendCom->nb_subframes; + move16(); + st_ivas->hTcBuffer->subframes_rendered = st_ivas->hSpatParamRendCom->subframes_rendered; + move16(); + st_ivas->hTcBuffer->num_slots = st_ivas->hSpatParamRendCom->num_slots; + move16(); + st_ivas->hTcBuffer->slots_rendered = st_ivas->hSpatParamRendCom->slots_rendered; + move16(); + Copy( st_ivas->hSpatParamRendCom->subframe_nbslots, st_ivas->hTcBuffer->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS ); + } +#ifdef NONBE_FIX_1005_MC_RS_TCBUFFER_UPDATE } +#endif /* JBM: when granularity goes down (e.g. MCT with CREND -> ParamMC with binaural fastconv render what still fits in the new granularity */