void qmfInverseFilteringDetector (HANDLE_SBR_INV_FILT_EST hInvFilt, float ** quotaMatrix, float *nrgVector, char* indexVector, int startIndex, int stopIndex, int transientFlag, INVF_MODE* infVec ) { int band; COUNT_sub_start("qmfInverseFilteringDetector"); PTR_INIT(6); /* hInvFilt->freqBandTableInvFilt[band] hInvFilt->detectorValues[band] hInvFilt->prevInvfMode[band] hInvFilt->prevRegionSbr[band] hInvFilt->prevRegionOrig[band] infVec[band] */ INDIRECT(1); LOOP(1); for(band = 0 ; band < hInvFilt->noDetectorBands; band++){ int startChannel = hInvFilt->freqBandTableInvFilt[band]; int stopChannel = hInvFilt->freqBandTableInvFilt[band+1]; MOVE(2); /* counting previous operations */ INDIRECT(1); PTR_INIT(1); FUNC(9); calculateDetectorValues(quotaMatrix, indexVector, nrgVector, &hInvFilt->detectorValues[band], startChannel, stopChannel, startIndex, stopIndex ); INDIRECT(1); PTR_INIT(2); FUNC(6); STORE(1); infVec[band]= decisionAlgorithm(hInvFilt->detectorParams, hInvFilt->detectorValues[band], transientFlag, hInvFilt->prevInvfMode[band], &hInvFilt->prevRegionSbr[band], &hInvFilt->prevRegionOrig[band]); } COUNT_sub_end(); }
void qmfInverseFilteringDetector (HANDLE_SBR_INV_FILT_EST hInvFilt, float ** quotaMatrix, float *nrgVector, char* indexVector, int startIndex, int stopIndex, int transientFlag, INVF_MODE* infVec ) { int band; /* hInvFilt->freqBandTableInvFilt[band] hInvFilt->detectorValues[band] hInvFilt->prevInvfMode[band] hInvFilt->prevRegionSbr[band] hInvFilt->prevRegionOrig[band] infVec[band] */ for(band = 0 ; band < hInvFilt->noDetectorBands; band++) { int startChannel = hInvFilt->freqBandTableInvFilt[band]; int stopChannel = hInvFilt->freqBandTableInvFilt[band+1]; /* counting previous operations */ calculateDetectorValues(quotaMatrix, indexVector, nrgVector, &hInvFilt->detectorValues[band], startChannel, stopChannel, startIndex, stopIndex ); infVec[band]= decisionAlgorithm(hInvFilt->detectorParams, hInvFilt->detectorValues[band], transientFlag, hInvFilt->prevInvfMode[band], &hInvFilt->prevRegionSbr[band], &hInvFilt->prevRegionOrig[band]); } }
void FDKsbrEnc_qmfInverseFilteringDetector(HANDLE_SBR_INV_FILT_EST hInvFilt, /*!< Handle to the SBR_INV_FILT_EST struct. */ FIXP_DBL **quotaMatrix, /*!< The matrix holding the tonality values of the original. */ FIXP_DBL *nrgVector, /*!< The energy vector. */ SCHAR *indexVector, /*!< Index vector to obtain the patched data. */ INT startIndex, /*!< Start index. */ INT stopIndex, /*!< Stop index. */ INT transientFlag, /*!< Flag indicating if a transient is present or not.*/ INVF_MODE* infVec /*!< Vector holding the inverse filtering levels. */ ) { INT band; /* * Do the inverse filtering level estimation. *****************************************************/ for(band = 0 ; band < hInvFilt->noDetectorBands; band++){ INT startChannel = hInvFilt->freqBandTableInvFilt[band]; INT stopChannel = hInvFilt->freqBandTableInvFilt[band+1]; calculateDetectorValues( quotaMatrix, indexVector, nrgVector, &hInvFilt->detectorValues[band], startChannel, stopChannel, startIndex, stopIndex, hInvFilt->numberOfStrongest); infVec[band]= decisionAlgorithm( hInvFilt->detectorParams, &hInvFilt->detectorValues[band], transientFlag, &hInvFilt->prevRegionSbr[band], &hInvFilt->prevRegionOrig[band]); } }