• Home
  • Raw
  • Download

Lines Matching refs:qd

204 static int FDK_QmfDomain_FreePersistentMemory(HANDLE_FDK_QMF_DOMAIN qd) {  in C_ALLOC_MEM_OVERLAY()
209 if (qd->QmfDomainIn[ch].pAnaQmfStates) { in C_ALLOC_MEM_OVERLAY()
210 if (qd->globalConf.nBandsAnalysis == QMF_DOMAIN_ANALYSIS_QMF_BANDS_16) { in C_ALLOC_MEM_OVERLAY()
211 FreeAnaQmfStates16(&qd->QmfDomainIn[ch].pAnaQmfStates); in C_ALLOC_MEM_OVERLAY()
212 } else if (qd->globalConf.nBandsAnalysis == in C_ALLOC_MEM_OVERLAY()
214 FreeAnaQmfStates24(&qd->QmfDomainIn[ch].pAnaQmfStates); in C_ALLOC_MEM_OVERLAY()
215 } else if (qd->globalConf.nBandsAnalysis == in C_ALLOC_MEM_OVERLAY()
217 FreeAnaQmfStates32(&qd->QmfDomainIn[ch].pAnaQmfStates); in C_ALLOC_MEM_OVERLAY()
219 FreeAnaQmfStates(&qd->QmfDomainIn[ch].pAnaQmfStates); in C_ALLOC_MEM_OVERLAY()
223 if (qd->QmfDomainIn[ch].pOverlapBuffer) { in C_ALLOC_MEM_OVERLAY()
224 if (qd->globalConf.nQmfOvTimeSlots == QMF_DOMAIN_OV_TIMESLOTS_16) { in C_ALLOC_MEM_OVERLAY()
225 FreeQmfOverlapBuffer16(&qd->QmfDomainIn[ch].pOverlapBuffer); in C_ALLOC_MEM_OVERLAY()
226 } else if (qd->globalConf.nQmfOvTimeSlots == QMF_DOMAIN_OV_TIMESLOTS_32) { in C_ALLOC_MEM_OVERLAY()
227 FreeQmfOverlapBuffer32(&qd->QmfDomainIn[ch].pOverlapBuffer); in C_ALLOC_MEM_OVERLAY()
229 FreeQmfOverlapBuffer(&qd->QmfDomainIn[ch].pOverlapBuffer); in C_ALLOC_MEM_OVERLAY()
233 if (qd->QmfDomainIn[ch].hQmfSlotsReal) { in C_ALLOC_MEM_OVERLAY()
234 if (qd->globalConf.nQmfTimeSlots == QMF_DOMAIN_TIMESLOTS_16) { in C_ALLOC_MEM_OVERLAY()
235 FreeQmfSlotsReal16(&qd->QmfDomainIn[ch].hQmfSlotsReal); in C_ALLOC_MEM_OVERLAY()
236 } else if (qd->globalConf.nQmfTimeSlots == QMF_DOMAIN_TIMESLOTS_32) { in C_ALLOC_MEM_OVERLAY()
237 FreeQmfSlotsReal32(&qd->QmfDomainIn[ch].hQmfSlotsReal); in C_ALLOC_MEM_OVERLAY()
239 FreeQmfSlotsReal(&qd->QmfDomainIn[ch].hQmfSlotsReal); in C_ALLOC_MEM_OVERLAY()
243 if (qd->QmfDomainIn[ch].hQmfSlotsImag) { in C_ALLOC_MEM_OVERLAY()
244 if (qd->globalConf.nQmfTimeSlots == QMF_DOMAIN_TIMESLOTS_16) { in C_ALLOC_MEM_OVERLAY()
245 FreeQmfSlotsImag16(&qd->QmfDomainIn[ch].hQmfSlotsImag); in C_ALLOC_MEM_OVERLAY()
247 if (qd->globalConf.nQmfTimeSlots == QMF_DOMAIN_TIMESLOTS_32) { in C_ALLOC_MEM_OVERLAY()
248 FreeQmfSlotsImag32(&qd->QmfDomainIn[ch].hQmfSlotsImag); in C_ALLOC_MEM_OVERLAY()
250 FreeQmfSlotsImag(&qd->QmfDomainIn[ch].hQmfSlotsImag); in C_ALLOC_MEM_OVERLAY()
256 if (qd->QmfDomainOut[ch].pSynQmfStates) { in C_ALLOC_MEM_OVERLAY()
257 FreeSynQmfStates(&qd->QmfDomainOut[ch].pSynQmfStates); in C_ALLOC_MEM_OVERLAY()
264 static int FDK_QmfDomain_AllocatePersistentMemory(HANDLE_FDK_QMF_DOMAIN qd) { in FDK_QmfDomain_AllocatePersistentMemory() argument
267 HANDLE_FDK_QMF_DOMAIN_GC gc = &qd->globalConf; in FDK_QmfDomain_AllocatePersistentMemory()
277 if (qd->QmfDomainIn[ch].pAnaQmfStates == NULL) { in FDK_QmfDomain_AllocatePersistentMemory()
279 (qd->QmfDomainIn[ch].pAnaQmfStates = GetAnaQmfStates16(ch))) in FDK_QmfDomain_AllocatePersistentMemory()
283 if (qd->QmfDomainIn[ch].pAnaQmfStates == NULL) { in FDK_QmfDomain_AllocatePersistentMemory()
285 (qd->QmfDomainIn[ch].pAnaQmfStates = GetAnaQmfStates24(ch))) in FDK_QmfDomain_AllocatePersistentMemory()
289 if (qd->QmfDomainIn[ch].pAnaQmfStates == NULL) { in FDK_QmfDomain_AllocatePersistentMemory()
291 (qd->QmfDomainIn[ch].pAnaQmfStates = GetAnaQmfStates32(ch))) in FDK_QmfDomain_AllocatePersistentMemory()
295 if (qd->QmfDomainIn[ch].pAnaQmfStates == NULL) { in FDK_QmfDomain_AllocatePersistentMemory()
296 if (NULL == (qd->QmfDomainIn[ch].pAnaQmfStates = GetAnaQmfStates(ch))) in FDK_QmfDomain_AllocatePersistentMemory()
301 qd->QmfDomainIn[ch].pAnaQmfStates = NULL; in FDK_QmfDomain_AllocatePersistentMemory()
307 if (qd->QmfDomainIn[ch].hQmfSlotsReal == NULL) { in FDK_QmfDomain_AllocatePersistentMemory()
309 (qd->QmfDomainIn[ch].hQmfSlotsReal = GetQmfSlotsReal16(ch))) in FDK_QmfDomain_AllocatePersistentMemory()
312 if (qd->QmfDomainIn[ch].hQmfSlotsImag == NULL) { in FDK_QmfDomain_AllocatePersistentMemory()
314 (qd->QmfDomainIn[ch].hQmfSlotsImag = GetQmfSlotsImag16(ch))) in FDK_QmfDomain_AllocatePersistentMemory()
318 if (qd->QmfDomainIn[ch].hQmfSlotsReal == NULL) { in FDK_QmfDomain_AllocatePersistentMemory()
320 (qd->QmfDomainIn[ch].hQmfSlotsReal = GetQmfSlotsReal32(ch))) in FDK_QmfDomain_AllocatePersistentMemory()
323 if (qd->QmfDomainIn[ch].hQmfSlotsImag == NULL) { in FDK_QmfDomain_AllocatePersistentMemory()
325 (qd->QmfDomainIn[ch].hQmfSlotsImag = GetQmfSlotsImag32(ch))) in FDK_QmfDomain_AllocatePersistentMemory()
329 if (qd->QmfDomainIn[ch].hQmfSlotsReal == NULL) { in FDK_QmfDomain_AllocatePersistentMemory()
330 if (NULL == (qd->QmfDomainIn[ch].hQmfSlotsReal = GetQmfSlotsReal(ch))) in FDK_QmfDomain_AllocatePersistentMemory()
333 if (qd->QmfDomainIn[ch].hQmfSlotsImag == NULL) { in FDK_QmfDomain_AllocatePersistentMemory()
334 if (NULL == (qd->QmfDomainIn[ch].hQmfSlotsImag = GetQmfSlotsImag(ch))) in FDK_QmfDomain_AllocatePersistentMemory()
339 qd->QmfDomainIn[ch].hQmfSlotsReal = NULL; in FDK_QmfDomain_AllocatePersistentMemory()
340 qd->QmfDomainIn[ch].hQmfSlotsImag = NULL; in FDK_QmfDomain_AllocatePersistentMemory()
346 if (qd->QmfDomainIn[ch].pOverlapBuffer == NULL) { in FDK_QmfDomain_AllocatePersistentMemory()
348 (qd->QmfDomainIn[ch].pOverlapBuffer = GetQmfOverlapBuffer16(ch))) in FDK_QmfDomain_AllocatePersistentMemory()
352 if (qd->QmfDomainIn[ch].pOverlapBuffer == NULL) { in FDK_QmfDomain_AllocatePersistentMemory()
354 (qd->QmfDomainIn[ch].pOverlapBuffer = GetQmfOverlapBuffer32(ch))) in FDK_QmfDomain_AllocatePersistentMemory()
358 if (qd->QmfDomainIn[ch].pOverlapBuffer == NULL) { in FDK_QmfDomain_AllocatePersistentMemory()
360 (qd->QmfDomainIn[ch].pOverlapBuffer = GetQmfOverlapBuffer(ch))) in FDK_QmfDomain_AllocatePersistentMemory()
365 qd->QmfDomainIn[ch].pOverlapBuffer = NULL; in FDK_QmfDomain_AllocatePersistentMemory()
372 if (qd->QmfDomainOut[ch].pSynQmfStates == NULL) { in FDK_QmfDomain_AllocatePersistentMemory()
373 if (NULL == (qd->QmfDomainOut[ch].pSynQmfStates = GetSynQmfStates(ch))) in FDK_QmfDomain_AllocatePersistentMemory()
377 qd->QmfDomainOut[ch].pSynQmfStates = NULL; in FDK_QmfDomain_AllocatePersistentMemory()
384 FDK_QmfDomain_FreePersistentMemory(qd); in FDK_QmfDomain_AllocatePersistentMemory()
464 static int FDK_QmfDomain_FeedWorkBuffer(HANDLE_FDK_QMF_DOMAIN qd, int ch, in FDK_QmfDomain_FeedWorkBuffer() argument
471 mem_needed = qd->QmfDomainIn[ch].workBuf_nBands * in FDK_QmfDomain_FeedWorkBuffer()
472 qd->QmfDomainIn[ch].workBuf_nTimeSlots * CMPLX_MOD; in FDK_QmfDomain_FeedWorkBuffer()
476 qd->QmfDomainIn[ch].pWorkBuffer = pWorkBuffer; in FDK_QmfDomain_FeedWorkBuffer()
477 qd->QmfDomainIn[ch].workBufferOffset = workBufferOffset; in FDK_QmfDomain_FeedWorkBuffer()
478 qd->QmfDomainIn[ch].workBufferSectSize = workBufferSectSize; in FDK_QmfDomain_FeedWorkBuffer()
483 int FDK_QmfDomain_IsInitialized(const HANDLE_FDK_QMF_DOMAIN qd) { in FDK_QmfDomain_IsInitialized() argument
484 FDK_ASSERT(qd != NULL); in FDK_QmfDomain_IsInitialized()
485 return ((qd->QmfDomainIn[0].pAnaQmfStates == NULL) && in FDK_QmfDomain_IsInitialized()
486 (qd->QmfDomainOut[0].pSynQmfStates == NULL)) in FDK_QmfDomain_IsInitialized()
491 int FDK_QmfDomain_InitFilterBank(HANDLE_FDK_QMF_DOMAIN qd, UINT extra_flags) { in FDK_QmfDomain_InitFilterBank() argument
492 FDK_ASSERT(qd != NULL); in FDK_QmfDomain_InitFilterBank()
495 HANDLE_FDK_QMF_DOMAIN_GC gc = &qd->globalConf; in FDK_QmfDomain_InitFilterBank()
509 qd->QmfDomainIn[ch].pOverlapBuffer; /* persistent memory for overlap */ in FDK_QmfDomain_InitFilterBank()
517 qd->QmfDomainIn[fMin(ch, fMax((INT)gc->nQmfProcChannels - 1, 0))] in FDK_QmfDomain_InitFilterBank()
520 qd->QmfDomainIn[fMin(ch, fMax((INT)gc->nQmfProcChannels - 1, 0))] in FDK_QmfDomain_InitFilterBank()
523 qd->QmfDomainIn[fMin(ch, fMax((INT)gc->nQmfProcChannels - 1, 0))] in FDK_QmfDomain_InitFilterBank()
531 qd->QmfDomainIn[ch].pGlobalConf = gc; in FDK_QmfDomain_InitFilterBank()
533 qd->QmfDomainIn[ch].hQmfSlotsReal[ts] = ptrOv; in FDK_QmfDomain_InitFilterBank()
535 qd->QmfDomainIn[ch].hQmfSlotsImag[ts] = ptrOv; in FDK_QmfDomain_InitFilterBank()
539 qd->QmfDomainIn[ch].hQmfSlotsReal[ts] = FDK_getWorkBuffer( in FDK_QmfDomain_InitFilterBank()
542 qd->QmfDomainIn[ch].hQmfSlotsImag[ts] = FDK_getWorkBuffer( in FDK_QmfDomain_InitFilterBank()
547 &qd->QmfDomainIn[ch].fb, qd->QmfDomainIn[ch].pAnaQmfStates, noCols, in FDK_QmfDomain_InitFilterBank()
548 (qd->QmfDomainIn[ch].fb.lsb == 0) ? lsb : qd->QmfDomainIn[ch].fb.lsb, in FDK_QmfDomain_InitFilterBank()
549 (qd->QmfDomainIn[ch].fb.usb == 0) ? usb : qd->QmfDomainIn[ch].fb.usb, in FDK_QmfDomain_InitFilterBank()
554 FIXP_DBL outGain_m = qd->QmfDomainOut[ch].fb.outGain_m; in FDK_QmfDomain_InitFilterBank()
555 int outGain_e = qd->QmfDomainOut[ch].fb.outGain_e; in FDK_QmfDomain_InitFilterBank()
556 int outScale = qmfGetOutScalefactor(&qd->QmfDomainOut[ch].fb); in FDK_QmfDomain_InitFilterBank()
558 &qd->QmfDomainOut[ch].fb, qd->QmfDomainOut[ch].pSynQmfStates, noCols, in FDK_QmfDomain_InitFilterBank()
559 (qd->QmfDomainOut[ch].fb.lsb == 0) ? lsb : qd->QmfDomainOut[ch].fb.lsb, in FDK_QmfDomain_InitFilterBank()
560 (qd->QmfDomainOut[ch].fb.usb == 0) ? usb : qd->QmfDomainOut[ch].fb.usb, in FDK_QmfDomain_InitFilterBank()
563 qmfChangeOutGain(&qd->QmfDomainOut[ch].fb, outGain_m, outGain_e); in FDK_QmfDomain_InitFilterBank()
566 qmfChangeOutScalefactor(&qd->QmfDomainOut[ch].fb, outScale); in FDK_QmfDomain_InitFilterBank()