From ca63673594f77d2619fc89be410075847022faf5 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Wed, 4 Jun 2025 10:22:14 +0200 Subject: [PATCH 1/2] port NONBE_FIX_1091_PMC_LOW_SIGNAL_BURSTS --- lib_com/options.h | 1 + lib_dec/ivas_dirac_output_synthesis_cov_fx.c | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 3315e495e..a9665c7ea 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -137,6 +137,7 @@ #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 */ #define NONBE_FIX_1004_USAN_DTX_MASA_NO_DIRS /* Nokia: fix USAN error caused by non-setting of correctly the number of MASA directions in DTX */ +#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 BASOP porting switches ############################ */ diff --git a/lib_dec/ivas_dirac_output_synthesis_cov_fx.c b/lib_dec/ivas_dirac_output_synthesis_cov_fx.c index caddb5c5c..30d2b639a 100644 --- a/lib_dec/ivas_dirac_output_synthesis_cov_fx.c +++ b/lib_dec/ivas_dirac_output_synthesis_cov_fx.c @@ -51,6 +51,13 @@ #include "rom_dec.h" #include "ivas_prot_fx.h" +#ifdef NONBE_FIX_1091_PMC_LOW_SIGNAL_BURSTS +/*-----------------------------------------------------------------------* + * Local constants + *-----------------------------------------------------------------------*/ + +#define SQRT_EPSILON_FX 68 /* Q31 square root of EPSILON */ +#endif /*-------------------------------------------------------------------* * ivas_dirac_dec_output_synthesis_cov_open() @@ -930,9 +937,21 @@ Word16 computeMixingMatrices_fx( } } +#ifdef NONBE_FIX_1091_PMC_LOW_SIGNAL_BURSTS + limit_fx = Mpy_32_32( limit_fx, reg_Sx_fx ); + limit_e = add( limit_e, reg_Sx_e ); + IF( BASOP_Util_Cmp_Mant32Exp( limit_fx, limit_e, SQRT_EPSILON_FX /* Q31 */, 0 ) < 0 ) + { + limit_fx = SQRT_EPSILON_FX; + move32(); + limit_e = 0; + move16(); + } +#else L_tmp = Mpy_32_32( limit_fx, reg_Sx_fx ); limit_e = add( limit_e, reg_Sx_e ); limit_fx = L_add( L_tmp, EPSILON_FX ); +#endif FOR( i = 0; i < lengthCx; ++i ) { -- GitLab From 5014ccac929bb1f31afc620e6a09b8b71ea89ef8 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Tue, 5 Aug 2025 21:01:21 +0200 Subject: [PATCH 2/2] formatting --- lib_dec/ivas_dirac_output_synthesis_cov_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/ivas_dirac_output_synthesis_cov_fx.c b/lib_dec/ivas_dirac_output_synthesis_cov_fx.c index b2635da91..758363bfb 100644 --- a/lib_dec/ivas_dirac_output_synthesis_cov_fx.c +++ b/lib_dec/ivas_dirac_output_synthesis_cov_fx.c @@ -899,7 +899,7 @@ Word16 computeMixingMatrices_fx( #else /* NONBE_FIX_1091_PMC_LOW_SIGNAL_BURSTS */ limit_fx = Madd_32_32( EPSILON_FX, limit_fx, reg_Sx_fx ); #endif - + FOR( i = 0; i < lengthCx; ++i ) { IF( LT_32( L_shl_sat( svd_s_buffer_fx[i], sub( svd_s_buffer_e[i], limit_e ) ), limit_fx ) ) -- GitLab