Commit c0727907 authored by bayers's avatar bayers
Browse files

Merge branch '220-sanitizer-errors-in-parammc-svd-function' into 'main'

#220: fixed another SVD NaN problem, this time from rounding errors in calculation Cproto_diag

See merge request !315
parents cc6048c3 95310557
Loading
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -1614,6 +1614,17 @@ static void ivas_param_mc_get_mixing_matrices(

        matrix_product_diag( mat_mult_buffer1, nY_band, nX, 0, proto_matrix_ptr, nY_band, nX, 1, Cproto_diag );

#ifdef FIX_I220_PARAMMC_CPROTO
        /* make sure we have no negative entries in Cproto_diag due to rounding errors */
        for ( ch_idx1 = 0; ch_idx1 < nY_band; ch_idx1++ )
        {
            if ( Cproto_diag[ch_idx1] < 0.0f )
            {
                Cproto_diag[ch_idx1] = 0.0f;
            }
        }
#endif

        /* Computing the mixing matrices */

        /* bands with decorr */