From b0b037b479258584120093ff0e2f5a73bc0832e8 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Mon, 13 May 2024 14:36:13 +0200 Subject: [PATCH] fix for #1091, change limit calculation for the regularized inverse of Kx in the mixing matrix calculation of the covariance synthesis. --- lib_com/options.h | 2 +- lib_dec/ivas_dirac_output_synthesis_cov.c | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index cc4e5d249b..9565b94fbd 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -174,7 +174,7 @@ #define NONBE_FIX_1070_USAN_SEGFAULT_MC_TO_BIN_BTSW_HEADROT /* fix 1070 USAN: nullptr-with-offset and Segfaults in 7_1_4 to BINAURAL and BINAURAL_ROOM_REVERB decoding with bitrate switching and head rotation*/ #define NONBE_FIX_MC_LFE_LPF /* Dlb: Adding the LFE LPF filter back for MC content. */ #define NONBE_FIX_1052_SBA_EXT /* Dlb: SBA external output support */ - +#define NONBE_FIX_1091_PMC_LOW_SIGNAL_BURSTS /* FhG: fix for #1091, fix limit calculation for the regularized inverse of Kx to avoid bursts in very low signals */ /* ##################### End NON-BE switches ########################### */ /* ################## End DEVELOPMENT switches ######################### */ diff --git a/lib_dec/ivas_dirac_output_synthesis_cov.c b/lib_dec/ivas_dirac_output_synthesis_cov.c index 7afa191edb..00d7b2b776 100644 --- a/lib_dec/ivas_dirac_output_synthesis_cov.c +++ b/lib_dec/ivas_dirac_output_synthesis_cov.c @@ -51,6 +51,13 @@ #include "wmc_auto.h" #include "rom_dec.h" +#ifdef NONBE_FIX_1091_PMC_LOW_SIGNAL_BURSTS +/*-----------------------------------------------------------------------* + * Local constants + *-----------------------------------------------------------------------*/ + +#define SQRT_EPSILON 3.16227755e-08 /* square root of EPSILON */ +#endif /*-------------------------------------------------------------------* * ivas_dirac_dec_output_synthesis_cov_open() @@ -577,8 +584,11 @@ int16_t computeMixingMatrices( *-----------------------------------------------------------------*/ maximum( svd_s_buffer, lengthCx, &limit ); +#ifdef NONBE_FIX_1091_PMC_LOW_SIGNAL_BURSTS + limit = (float) max( limit * reg_Sx, SQRT_EPSILON ); +#else limit = limit * reg_Sx + EPSILON; - +#endif for ( i = 0; i < lengthCx; ++i ) { svd_s_buffer[i] = ( ( svd_s_buffer[i] > limit ) ? svd_s_buffer[i] : limit ); -- GitLab