• Home
  • Raw
  • Download

Lines Matching refs:hOnset

141   HANDLE_ONSET_DETECT hOnset = NULL;  in fdk_sacenc_onsetDetect_Open()  local
147 FDK_ALLOCATE_MEMORY_1D(hOnset, 1, struct ONSET_DETECT); in fdk_sacenc_onsetDetect_Open()
148 FDK_ALLOCATE_MEMORY_1D(hOnset->pEnergyHist__FDK, 16 + maxTimeSlots, in fdk_sacenc_onsetDetect_Open()
150 FDK_ALLOCATE_MEMORY_1D(hOnset->pEnergyHistScale, 16 + maxTimeSlots, SCHAR); in fdk_sacenc_onsetDetect_Open()
152 hOnset->maxTimeSlots = maxTimeSlots; in fdk_sacenc_onsetDetect_Open()
153 hOnset->minTransientDistance = in fdk_sacenc_onsetDetect_Open()
155 hOnset->avgEnergyDistance = 16; /* average energy distance */ in fdk_sacenc_onsetDetect_Open()
157 hOnset->avgEnergyDistanceScale = 4; in fdk_sacenc_onsetDetect_Open()
158 *phOnset = hOnset; in fdk_sacenc_onsetDetect_Open()
163 fdk_sacenc_onsetDetect_Close(&hOnset); in fdk_sacenc_onsetDetect_Open()
168 HANDLE_ONSET_DETECT hOnset, in fdk_sacenc_onsetDetect_Init() argument
172 if ((NULL == hOnset) || (pOnsetDetectConfig == NULL)) { in fdk_sacenc_onsetDetect_Init()
175 if ((pOnsetDetectConfig->maxTimeSlots > hOnset->maxTimeSlots) || in fdk_sacenc_onsetDetect_Init()
177 hOnset->lowerBoundOnsetDetection)) { in fdk_sacenc_onsetDetect_Init()
182 hOnset->maxTimeSlots = pOnsetDetectConfig->maxTimeSlots; in fdk_sacenc_onsetDetect_Init()
183 hOnset->lowerBoundOnsetDetection = in fdk_sacenc_onsetDetect_Init()
185 hOnset->upperBoundOnsetDetection = in fdk_sacenc_onsetDetect_Init()
188 hOnset->minTransientDistance = in fdk_sacenc_onsetDetect_Init()
190 hOnset->avgEnergyDistance = 16; /* average energy distance */ in fdk_sacenc_onsetDetect_Init()
192 hOnset->avgEnergyDistanceScale = 4; in fdk_sacenc_onsetDetect_Init()
197 for (i = 0; i < hOnset->avgEnergyDistance + hOnset->maxTimeSlots; i++) in fdk_sacenc_onsetDetect_Init()
198 hOnset->pEnergyHistScale[i] = -(DFRACT_BITS - 3); in fdk_sacenc_onsetDetect_Init()
201 hOnset->pEnergyHist__FDK, in fdk_sacenc_onsetDetect_Init()
203 hOnset->avgEnergyDistance + hOnset->maxTimeSlots); in fdk_sacenc_onsetDetect_Init()
234 FDK_SACENC_ERROR fdk_sacenc_onsetDetect_Update(HANDLE_ONSET_DETECT hOnset, in fdk_sacenc_onsetDetect_Update() argument
238 if (NULL == hOnset) { in fdk_sacenc_onsetDetect_Update()
241 if (timeSlots > hOnset->maxTimeSlots) { in fdk_sacenc_onsetDetect_Update()
246 for (i = 0; i < hOnset->avgEnergyDistance; i++) { in fdk_sacenc_onsetDetect_Update()
247 hOnset->pEnergyHist__FDK[i] = hOnset->pEnergyHist__FDK[i + timeSlots]; in fdk_sacenc_onsetDetect_Update()
248 hOnset->pEnergyHistScale[i] = hOnset->pEnergyHistScale[i + timeSlots]; in fdk_sacenc_onsetDetect_Update()
252 FDKmemset_flex(&hOnset->pEnergyHist__FDK[hOnset->avgEnergyDistance], in fdk_sacenc_onsetDetect_Update()
262 HANDLE_ONSET_DETECT hOnset, const INT nTimeSlots, const INT nHybridBands, in fdk_sacenc_onsetDetect_Apply() argument
270 if ((hOnset == NULL) || (pTransientPos == NULL) || in fdk_sacenc_onsetDetect_Apply()
276 if ((nTimeSlots < 0) || (nTimeSlots > hOnset->maxTimeSlots) || in fdk_sacenc_onsetDetect_Apply()
277 (hOnset->lowerBoundOnsetDetection < -1) || in fdk_sacenc_onsetDetect_Apply()
278 (hOnset->upperBoundOnsetDetection > nHybridBands)) { in fdk_sacenc_onsetDetect_Apply()
283 const int lowerBoundOnsetDetection = hOnset->lowerBoundOnsetDetection; in fdk_sacenc_onsetDetect_Apply()
284 const int upperBoundOnsetDetection = hOnset->upperBoundOnsetDetection; in fdk_sacenc_onsetDetect_Apply()
285 const int M = hOnset->avgEnergyDistance; in fdk_sacenc_onsetDetect_Apply()
288 SCHAR *envScale = hOnset->pEnergyHistScale; in fdk_sacenc_onsetDetect_Apply()
289 FIXP_DBL *env = hOnset->pEnergyHist__FDK; in fdk_sacenc_onsetDetect_Apply()
300 prevPos - nTimeSlots + hOnset->minTransientDistance); in fdk_sacenc_onsetDetect_Apply()
350 (int)hOnset->avgEnergyDistanceScale); in fdk_sacenc_onsetDetect_Apply()
352 (int)hOnset->avgEnergyDistanceScale); in fdk_sacenc_onsetDetect_Apply()
358 (int)hOnset->avgEnergyDistanceScale); in fdk_sacenc_onsetDetect_Apply()
367 currPos += hOnset->minTransientDistance; in fdk_sacenc_onsetDetect_Apply()