diff --git a/lib_com/ivas_spar_com.c b/lib_com/ivas_spar_com.c index 549676882135c43141a1b9ece23ce88e0fc490da..d8ec6d0ff59ea41017c4a8b52633b74886f5daf2 100644 --- a/lib_com/ivas_spar_com.c +++ b/lib_com/ivas_spar_com.c @@ -1257,7 +1257,11 @@ 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 7474da4d75e0613235b81ac85656604b0db90e57..36a2b65aeff7ff85ef0823b4787d1a00f762d371 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -179,6 +179,9 @@ /* #################### End BE switches ################################## */ /* #################### Start NON-BE switches ############################ */ + +#define NONBE_FIX_1213_SBA_DET_MAT_INV_3BY3 /*Dolby: issue 1213: fix for inverse of det < 0*/ + /* any switch which is non-be wrt selection floating point code */ /* all switches in this category should start with "NONBE_" */