Commit c2587bf6 authored by ber's avatar ber
Browse files

another FIX1072_SPEEDUP_formulate2x2MixingMatrix_fx_func1 call, scaling 1

parent 02e18227
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -2151,7 +2151,7 @@ static void ivas_dirac_dec_binaural_determine_processing_matrices_fx(
    push_wmops( "IDDB_detProcMat_bigLoop1" );
    FOR( bin = 0; bin < nBins; bin++ )
    {
        Word32 tmpMtxRe_fx[BINAURAL_CHANNELS][BINAURAL_CHANNELS], tmpMtxIm_fx[BINAURAL_CHANNELS][BINAURAL_CHANNELS], resultMtxRe_fx[BINAURAL_CHANNELS][BINAURAL_CHANNELS], resultMtxIm_fx[BINAURAL_CHANNELS][BINAURAL_CHANNELS], gain_fx;
        Word32 resultMtxRe_fx[BINAURAL_CHANNELS][BINAURAL_CHANNELS], resultMtxIm_fx[BINAURAL_CHANNELS][BINAURAL_CHANNELS], gain_fx;
        Word32 CxRe_fx[BINAURAL_CHANNELS][BINAURAL_CHANNELS], CxIm_fx[BINAURAL_CHANNELS][BINAURAL_CHANNELS]; /* Input covariance matrix */
        Word32 realizedOutputEne_fx, targetOutputEne_fx, missingOutputEne_fx;
        Word32 CrEneL_fx, CrEneR_fx; /* Cr = residual decorrelated sound covariance matrix */
@@ -2159,7 +2159,11 @@ static void ivas_dirac_dec_binaural_determine_processing_matrices_fx(
        Word32 Mre_fx[BINAURAL_CHANNELS][BINAURAL_CHANNELS], Mim_fx[BINAURAL_CHANNELS][BINAURAL_CHANNELS], MdecRe_fx[BINAURAL_CHANNELS][BINAURAL_CHANNELS], MdecIm_fx[BINAURAL_CHANNELS][BINAURAL_CHANNELS]; /* M = mixing matrix; Mdec = residual decorrelated signal mixing matrix */
        Word32 prototypeMtx_fx[BINAURAL_CHANNELS][BINAURAL_CHANNELS] = { { ONE_IN_Q31, 107374182 }, { 107374182, ONE_IN_Q31 } };
        move32();
        Word16 q_M, q_Cx, q_tmp, q_res, q_CrEne, q_CrCross, q_Mdec = 0;
        Word16 q_M, q_Cx, q_res, q_CrEne, q_CrCross, q_Mdec = 0;
#ifndef FIX1072_SPEEDUP_formulate2x2MixingMatrix_fx_func1
        Word32 tmpMtxRe_fx[BINAURAL_CHANNELS][BINAURAL_CHANNELS], tmpMtxIm_fx[BINAURAL_CHANNELS][BINAURAL_CHANNELS],
        Word16 q_tmp;
#endif
        move16();
        Word32 tmp1, tmp2, res1, res2;
        Word16 q_tmp1, q_tmp2, q_realizedOutputEne, q_targetOutputEne, q_missingOutputEne, q_gain;
@@ -2286,6 +2290,10 @@ static void ivas_dirac_dec_binaural_determine_processing_matrices_fx(
        }

        /* Make matrix multiplication M*Cx*M' to determine resulting covariance matrix of processing input with M */

#if defined( FIX1072_SPEEDUP_formulate2x2MixingMatrix_fx_func1 )
        formulate2x2MixingMatrix_fx_func1( Mre_fx, Mim_fx, &q_M, 1 /*scale?*/, CxRe_fx, CxIm_fx, &q_Cx, 1 /*scale*/, Mre_fx, Mim_fx, &q_M, 0 /*scale*/, resultMtxRe_fx, resultMtxIm_fx, &q_res );
#else
        matrixMul_fx( Mre_fx, Mim_fx, &q_M, CxRe_fx, CxIm_fx, &q_Cx, tmpMtxRe_fx, tmpMtxIm_fx, &q_tmp );
        matrixTransp2Mul_fx(
            tmpMtxRe_fx, tmpMtxIm_fx, &q_tmp, Mre_fx, Mim_fx, &q_M,
@@ -2294,6 +2302,7 @@ static void ivas_dirac_dec_binaural_determine_processing_matrices_fx(
            0 /*int Bscale*/,
#endif
            resultMtxRe_fx, resultMtxIm_fx, &q_res );
#endif /*FIX1072_SPEEDUP_formulate2x2MixingMatrix_fx_func1*/

        /* When below the frequency limit where decorrelation is applied, we inject the decorrelated
         * residual (or missing) signal component. The procedure is active when there are not enough independent