From: FrancoisGrondin Date: Wed, 29 Nov 2017 19:17:51 +0000 (-0500) Subject: Bug fixed in the GSS system X-Git-Url: http://kyz.pub/gitweb/?a=commitdiff_plain;h=c083e8aa1a5940aa0c4a44e43937218ad92ce92c;p=yn%2Fyn-odas.git Bug fixed in the GSS system --- diff --git a/src/system/steer2demixing.c b/src/system/steer2demixing.c index 2118404..b8e1a4d 100644 --- a/src/system/steer2demixing.c +++ b/src/system/steer2demixing.c @@ -1,6 +1,8 @@ #include "steer2demixing.h" + int count = 0; + steer2demixing_ds_obj * steer2demixing_ds_construct_zero(const unsigned int nSeps, const unsigned int nChannels, const unsigned int halfFrameSize, const float epsilon) { steer2demixing_ds_obj * obj; @@ -298,6 +300,8 @@ } + //freqs_printf(freqs); + if (nActiveSources > 0) { for (iBin = 0; iBin < obj->halfFrameSize; iBin++) { @@ -398,7 +402,7 @@ } } - + // // Compute Y[k] = Wn[k]X[k] // @@ -415,7 +419,7 @@ obj->Y[nActiveSources-1]); // - // Compute Ryy[k] = Y^H[k] Y[k] + // Compute Ryy[k] = Y[k] Y[k]^H // cmatrix_mul(obj->Ryy[nActiveSources-1], @@ -454,6 +458,7 @@ iSampleBC = iBin * obj->nChannels + iChannel; iSampleSC = iSep * obj->nChannels + iChannel; iSampleCA = iChannel * nActiveSources + iActiveSource; + iSampleAC = iActiveSource * obj->nChannels + iChannel; if (masks->array[iSampleSC] == 1) { @@ -463,8 +468,8 @@ obj->A[nActiveSources-1]->real[iSampleCA] = Areal; obj->A[nActiveSources-1]->imag[iSampleCA] = Aimag; - obj->AH[nActiveSources-1]->real[iSampleCA] = Areal; - obj->AH[nActiveSources-1]->imag[iSampleCA] = -1.0f * Aimag; + obj->AH[nActiveSources-1]->real[iSampleAC] = Areal; + obj->AH[nActiveSources-1]->imag[iSampleAC] = -1.0f * Aimag; } @@ -539,6 +544,11 @@ cmatrix_copy_cmatrix(obj->dJ2[nActiveSources-1], obj->dJ2_2WAmIAH[nActiveSources-1]); + + //if (iBin == 10) { + // cmatrix_printf(obj->AH[nActiveSources-1]); + //} + // // Compute ||Rxx||^2 = ||X[k]X^H[k]||^2 = (||X[k]||^2)^2 // @@ -634,6 +644,12 @@ } + // count++; + + //if (count == 1) { + // exit(EXIT_SUCCESS); + //} + } steer2demixing_mvdr_obj * steer2demixing_mvdr_construct_zero(const unsigned int nSeps, const unsigned int nChannels, const unsigned int halfFrameSize, const float alpha, const float sigma, const unsigned int deltaK) {