From 7e27b51c9e6fe984346478b408628c9a1a601e8d Mon Sep 17 00:00:00 2001 From: Simon Plain Date: Tue, 16 May 2023 11:54:58 +0200 Subject: [PATCH] Fix #469: ParamUpmix with bitrate switch --- lib_com/options.h | 2 ++ lib_dec/ivas_mct_dec.c | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 09e65fa5ab..de0967fc1a 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -196,6 +196,8 @@ #define FIX_441_SBA_PARAMBIN_GAINS /* Nokia: Fix issue 441 by changing gains in SBA path of parametric binauralizer */ #define MC_PARAMUPMIX_MODE /* Dlb: Contribution 39: Multichannel Parametric Upmix */ +#define FIX_469_BRSWITCH_PUPMIX /* Dlb: Fix issue 469 for Param Upmix bitrate switching */ + #define HODIRAC /* FhG: Contribution 32: Sector-based HO-DirAC method for SBA at high bitrates */ #define DIRAC_ALLOC_HARM /* VA: harmonize DirAC parameters allocation/deallocation */ diff --git a/lib_dec/ivas_mct_dec.c b/lib_dec/ivas_mct_dec.c index 0dd2552c0f..19a0909461 100755 --- a/lib_dec/ivas_mct_dec.c +++ b/lib_dec/ivas_mct_dec.c @@ -815,8 +815,17 @@ static ivas_error ivas_mc_dec_reconfig( /* remove ls conversion if it was allocated by ParamMC */ ivas_ls_setup_conversion_close( &st_ivas->hLsSetUpConversion ); } + #ifdef MC_PARAMUPMIX_MODE +#ifdef FIX_469_BRSWITCH_PUPMIX + if ( last_mc_mode == MC_MODE_PARAMUPMIX ) + { + ivas_mc_paramupmix_dec_close( &( st_ivas->hMCParamUpmix ) ); + ivas_ls_setup_conversion_close( &( st_ivas->hLsSetUpConversion ) ); + } +#else ivas_mc_paramupmix_dec_close( &( st_ivas->hMCParamUpmix ) ); +#endif #endif /* De-allocate McMasa-related handles */ ivas_masa_dec_close( &( st_ivas->hMasa ) ); -- GitLab