diff --git a/lib_com/ivas_spar_com.c b/lib_com/ivas_spar_com.c index f519ffec13a175a79850ee18d8469b6f1a0f66f0..096a2955ee99196d3d33da424c47ad4e61acdd07 100644 --- a/lib_com/ivas_spar_com.c +++ b/lib_com/ivas_spar_com.c @@ -1257,7 +1257,12 @@ static void ivas_calc_mat_inv( int16_t sign = 1; ivas_calc_mat_det( dbl_in_re, dim, &det_re ); + +#ifdef NONBE_FIX_1213_SBA_DET_MAT_INV_3BY3 + det = det_re > 0 ? 1 / max( IVAS_DBL_EPS, det_re ) : 1 / min( det_re, -IVAS_DBL_EPS ); +#else det = det_re > 0 ? 1 / max( IVAS_DBL_EPS, det_re ) : min( det_re, -IVAS_DBL_EPS ); +#endif for ( i = 0; i < dim; i++ ) { diff --git a/lib_com/options.h b/lib_com/options.h index 6e0851258a6a7a8daa4790c1094257c42cc2166a..f4bcf0a2b181f95bcf97eccc58cd78993de87a7b 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -168,6 +168,8 @@ #define FIX_903_ZERO_OUT_IMDCT_BUFFERS_FOR_MCT_IGNORE /* FhG: zero out all relevant imdct buffers in MCT decoding of channels with mct_chan_mode == MCT_CHAN_MODE_IGNORE */ #define FIX_853_DECODE_MASA_ISM_AZIMUTH_PREC_FP /* Nokia: Fixes ivas_decode_masaism_metadata decision logic change due to precision difference; this is the fix in floating point */ #define NONBE_FIX_1205_TD_STEREO_MOD_CT /* VA: fix mismatch of coder_type (mod_ct) btw. TD stereo encoder and decoder */ +#define NONBE_FIX_1213_SBA_DET_MAT_INV_3BY3 /*Dolby: issue 1213: fix for inverse of det < 0*/ + /* #################### End FIXES switches ############################ */ #define BASOP_NOGLOB /* Disable global symbols in BASOPs, Overflow/Carry in BASOPs disabled, additional BASOPs in case of Overflow */