Lines Matching refs:hMdct
109 void mdct_init(H_MDCT hMdct, FIXP_DBL *overlap, INT overlapBufferSize) { in mdct_init() argument
110 hMdct->overlap.freq = overlap; in mdct_init()
112 hMdct->prev_fr = 0; in mdct_init()
113 hMdct->prev_nr = 0; in mdct_init()
114 hMdct->prev_tl = 0; in mdct_init()
115 hMdct->ov_size = overlapBufferSize; in mdct_init()
116 hMdct->prevAliasSymmetry = 0; in mdct_init()
117 hMdct->prevPrevAliasSymmetry = 0; in mdct_init()
118 hMdct->pFacZir = NULL; in mdct_init()
119 hMdct->pAsymOvlp = NULL; in mdct_init()
135 INT mdct_block(H_MDCT hMdct, const INT_PCM *RESTRICT timeData, in mdct_block() argument
152 if (hMdct->prev_fr == in mdct_block()
154 hMdct->prev_fr = fr; in mdct_block()
155 hMdct->prev_wrs = wrs; in mdct_block()
156 hMdct->prev_tl = tl; in mdct_block()
175 wls = hMdct->prev_wrs; in mdct_block()
176 fl = hMdct->prev_fr; in mdct_block()
264 hMdct->prev_wrs = wrs; in mdct_block()
265 hMdct->prev_fr = fr; in mdct_block()
266 hMdct->prev_tl = tl; in mdct_block()
327 INT imdct_drain(H_MDCT hMdct, FIXP_DBL *output, INT nrSamplesRoom) { in imdct_drain() argument
331 buffered_samples = hMdct->ov_offset; in imdct_drain()
336 FDKmemcpy(output, hMdct->overlap.time, in imdct_drain()
338 hMdct->ov_offset = 0; in imdct_drain()
344 INT imdct_copy_ov_and_nr(H_MDCT hMdct, FIXP_DBL *pTimeData, INT nrSamples) { in imdct_copy_ov_and_nr() argument
348 nt = fMin(hMdct->ov_offset, nrSamples); in imdct_copy_ov_and_nr()
350 nf = fMin(hMdct->prev_nr, nrSamples); in imdct_copy_ov_and_nr()
351 FDKmemcpy(pTimeData, hMdct->overlap.time, nt * sizeof(FIXP_DBL)); in imdct_copy_ov_and_nr()
354 pOvl = hMdct->overlap.freq + hMdct->ov_size - 1; in imdct_copy_ov_and_nr()
355 if (hMdct->prevPrevAliasSymmetry == 0) { in imdct_copy_ov_and_nr()
372 void imdct_adapt_parameters(H_MDCT hMdct, int *pfl, int *pnl, int tl, in imdct_adapt_parameters() argument
376 if (hMdct->prev_tl == 0) { in imdct_adapt_parameters()
377 hMdct->prev_wrs = wls; in imdct_adapt_parameters()
378 hMdct->prev_fr = fl; in imdct_adapt_parameters()
379 hMdct->prev_nr = (noOutSamples - fl) >> 1; in imdct_adapt_parameters()
380 hMdct->prev_tl = noOutSamples; in imdct_adapt_parameters()
381 hMdct->ov_offset = 0; in imdct_adapt_parameters()
385 window_diff = (hMdct->prev_fr - fl) >> 1; in imdct_adapt_parameters()
389 if (hMdct->prev_nr + window_diff > 0) { in imdct_adapt_parameters()
400 if (fl < hMdct->prev_fr) { in imdct_adapt_parameters()
409 hMdct->prev_nr += window_diff; in imdct_adapt_parameters()
410 hMdct->prev_fr = fl; in imdct_adapt_parameters()
411 hMdct->prev_wrs = wls; in imdct_adapt_parameters()
414 fl = hMdct->prev_fr; in imdct_adapt_parameters()
465 INT imlt_block(H_MDCT hMdct, FIXP_DBL *output, FIXP_DBL *spectrum, in imlt_block() argument
484 if (hMdct->prev_fr != fl) { in imlt_block()
485 imdct_adapt_parameters(hMdct, &fl, &nl, tl, wls, noOutSamples); in imlt_block()
488 pOvl = hMdct->overlap.freq + hMdct->ov_size - 1; in imlt_block()
492 for (i = 0; i < hMdct->ov_offset; i++) { in imlt_block()
493 *pOut0 = hMdct->overlap.time[i]; in imlt_block()
496 nrSamples = hMdct->ov_offset; in imlt_block()
497 hMdct->ov_offset = 0; in imlt_block()
505 if (hMdct->prev_fr != fl) { in imlt_block()
506 imdct_adapt_parameters(hMdct, &fl, &nl, tl, wls, noOutSamples); in imlt_block()
512 pWindow = hMdct->prev_wrs; in imlt_block()
519 if (hMdct->prevAliasSymmetry == 0) { in imlt_block()
529 if (hMdct->prevAliasSymmetry == 0) { in imlt_block()
559 pOut0 = hMdct->overlap.time + hMdct->ov_offset; in imlt_block()
560 hMdct->ov_offset += hMdct->prev_nr + fl / 2; in imlt_block()
563 nrSamples += hMdct->prev_nr + fl / 2; in imlt_block()
567 if ((hMdct->pFacZir != 0) && (hMdct->prev_nr == fl / 2)) { in imlt_block()
570 for (i = 0; i < hMdct->prev_nr; i++) { in imlt_block()
572 *pOut0 = IMDCT_SCALE_DBL(x + hMdct->pFacZir[i]); in imlt_block()
575 hMdct->pFacZir = NULL; in imlt_block()
582 if (hMdct->prevPrevAliasSymmetry == 0) { in imlt_block()
583 for (i = 0; i < hMdct->prev_nr; i++) { in imlt_block()
589 for (i = 0; i < hMdct->prev_nr; i++) { in imlt_block()
600 pOut1 = hMdct->overlap.time + hMdct->ov_offset + fl / 2 - 1; in imlt_block()
601 hMdct->ov_offset += fl / 2 + nl; in imlt_block()
617 if (hMdct->prevPrevAliasSymmetry == 0) { in imlt_block()
618 if (hMdct->prevAliasSymmetry == 0) { in imlt_block()
619 if (!hMdct->pAsymOvlp) { in imlt_block()
629 FIXP_DBL *pAsymOvl = hMdct->pAsymOvlp + fl / 2 - 1; in imlt_block()
642 hMdct->pAsymOvlp = NULL; in imlt_block()
655 if (hMdct->prevAliasSymmetry == 0) { in imlt_block()
676 if (hMdct->pFacZir != 0) { in imlt_block()
681 pOut[i] += IMDCT_SCALE_DBL(hMdct->pFacZir[i]); in imlt_block()
683 hMdct->pFacZir = NULL; in imlt_block()
695 if (hMdct->prevAliasSymmetry == 0) { in imlt_block()
711 hMdct->prev_nr = nr; in imlt_block()
712 hMdct->prev_fr = fr; in imlt_block()
713 hMdct->prev_tl = tl; in imlt_block()
714 hMdct->prev_wrs = wrs; in imlt_block()
717 hMdct->prevPrevAliasSymmetry = hMdct->prevAliasSymmetry; in imlt_block()
718 hMdct->prevAliasSymmetry = currAliasSymmetry; in imlt_block()
723 pOvl = hMdct->overlap.freq + hMdct->ov_size - tl / 2; in imlt_block()