Lines Matching refs:hParametricStereo
103 HANDLE_PARAMETRIC_STEREO hParametricStereo,
122 HANDLE_PARAMETRIC_STEREO hParametricStereo = NULL; in PSEnc_Create() local
124 if (NULL==(hParametricStereo = GetRam_ParamStereo())) { in PSEnc_Create()
128 FDKmemclear(hParametricStereo, sizeof(PARAMETRIC_STEREO)); in PSEnc_Create()
130 if (PSENC_OK != (error = FDKsbrEnc_CreatePSEncode(&hParametricStereo->hPsEncode))) { in PSEnc_Create()
136 &hParametricStereo->fdkHybAnaFilter[i], in PSEnc_Create()
137 hParametricStereo->__staticHybAnaStatesLF[i], in PSEnc_Create()
138 sizeof(hParametricStereo->__staticHybAnaStatesLF[i]), in PSEnc_Create()
139 hParametricStereo->__staticHybAnaStatesHF[i], in PSEnc_Create()
140 sizeof(hParametricStereo->__staticHybAnaStatesHF[i]) in PSEnc_Create()
148 *phParametricStereo = hParametricStereo; /* return allocated handle */ in PSEnc_Create()
155 HANDLE_PARAMETRIC_STEREO hParametricStereo, in PSEnc_Init() argument
164 if ( (NULL==hParametricStereo) || (NULL==hPsEncConfig) ) { in PSEnc_Init()
170 hParametricStereo->initPS = 1; in PSEnc_Init()
171 hParametricStereo->noQmfSlots = noQmfSlots; in PSEnc_Init()
172 hParametricStereo->noQmfBands = noQmfBands; in PSEnc_Init()
175 FDKmemclear(hParametricStereo->qmfDelayLines, sizeof(hParametricStereo->qmfDelayLines)); in PSEnc_Init()
177 hParametricStereo->qmfDelayScale = FRACT_BITS-1; in PSEnc_Init()
182 &hParametricStereo->fdkHybAnaFilter[ch], in PSEnc_Init()
191 &hParametricStereo->fdkHybSynFilter, in PSEnc_Init()
198 hParametricStereo->psDelay = (HYBRID_FILTER_DELAY*hParametricStereo->noQmfBands); in PSEnc_Init()
203 hParametricStereo->maxEnvelopes = hPsEncConfig->maxEnvelopes; in PSEnc_Init()
205 …if (PSENC_OK != (error = FDKsbrEnc_InitPSEncode(hParametricStereo->hPsEncode, (PS_BANDS) hPsEncCon… in PSEnc_Init()
214 hParametricStereo->pHybridData[i+HYBRID_READ_OFFSET][ch][0] = &pDynReal[i*MAX_HYBRID_BANDS]; in PSEnc_Init()
215 … hParametricStereo->pHybridData[i+HYBRID_READ_OFFSET][ch][1] = &pDynImag[i*MAX_HYBRID_BANDS];; in PSEnc_Init()
219 hParametricStereo->pHybridData[i][ch][0] = hParametricStereo->__staticHybridData[i][ch][0]; in PSEnc_Init()
220 hParametricStereo->pHybridData[i][ch][1] = hParametricStereo->__staticHybridData[i][ch][1]; in PSEnc_Init()
225 … FDKmemclear(hParametricStereo->__staticHybridData, sizeof(hParametricStereo->__staticHybridData)); in PSEnc_Init()
228 FDKmemclear(hParametricStereo->psOut, sizeof(hParametricStereo->psOut)); in PSEnc_Init()
230 hParametricStereo->psOut[0].enablePSHeader = 1; /* write ps header in first frame */ in PSEnc_Init()
233 FDKmemclear(hParametricStereo->dynBandScale, sizeof(UCHAR)*PS_MAX_BANDS); in PSEnc_Init()
234 FDKmemclear(hParametricStereo->maxBandValue, sizeof(FIXP_QMF)*PS_MAX_BANDS); in PSEnc_Init()
249 HANDLE_PARAMETRIC_STEREO hParametricStereo = *phParametricStereo; in PSEnc_Destroy() local
250 if(hParametricStereo != NULL){ in PSEnc_Destroy()
251 FDKsbrEnc_DestroyPSEncode(&hParametricStereo->hPsEncode); in PSEnc_Destroy()
260 HANDLE_PARAMETRIC_STEREO hParametricStereo, in ExtractPSParameters() argument
267 if (hParametricStereo == NULL) { in ExtractPSParameters()
272 if (hParametricStereo->initPS){ in ExtractPSParameters()
273 hParametricStereo->psOut[1] = hParametricStereo->psOut[0]; in ExtractPSParameters()
275 hParametricStereo->psOut[0] = hParametricStereo->psOut[1]; in ExtractPSParameters()
278 hParametricStereo->hPsEncode, in ExtractPSParameters()
279 &hParametricStereo->psOut[1], in ExtractPSParameters()
280 hParametricStereo->dynBandScale, in ExtractPSParameters()
281 hParametricStereo->maxEnvelopes, in ExtractPSParameters()
283 hParametricStereo->noQmfSlots, in ExtractPSParameters()
289 if (hParametricStereo->initPS) { in ExtractPSParameters()
290 hParametricStereo->psOut[0] = hParametricStereo->psOut[1]; in ExtractPSParameters()
291 hParametricStereo->initPS = 0; in ExtractPSParameters()
300 HANDLE_PARAMETRIC_STEREO hParametricStereo, in DownmixPSQmfData() argument
313 if(hParametricStereo == NULL){ in DownmixPSQmfData()
321 …int dynQmfScale = fixMax(0, hParametricStereo->dmxScale-1); /* scale one bit more for addition of … in DownmixPSQmfData()
383 &hParametricStereo->fdkHybSynFilter, in DownmixPSQmfData()
406 const INT noQmfSlots2 = hParametricStereo->noQmfSlots>>1; in DownmixPSQmfData()
407 const int noQmfBands = hParametricStereo->noQmfBands; in DownmixPSQmfData()
414 FDKmemcpy(tmp[0], hParametricStereo->qmfDelayLines[0][i], noQmfBands*sizeof(FIXP_QMF)); in DownmixPSQmfData()
415 FDKmemcpy(tmp[1], hParametricStereo->qmfDelayLines[1][i], noQmfBands*sizeof(FIXP_QMF)); in DownmixPSQmfData()
417 …FDKmemcpy(hParametricStereo->qmfDelayLines[0][i], mixRealQmfData[i+noQmfSlots2], noQmfBands*sizeof… in DownmixPSQmfData()
418 …FDKmemcpy(hParametricStereo->qmfDelayLines[1][i], mixImagQmfData[i+noQmfSlots2], noQmfBands*sizeof… in DownmixPSQmfData()
427 if (hParametricStereo->qmfDelayScale > *qmfScale) { in DownmixPSQmfData()
428 scale = hParametricStereo->qmfDelayScale - *qmfScale; in DownmixPSQmfData()
432 scale = *qmfScale - hParametricStereo->qmfDelayScale; in DownmixPSQmfData()
444 *qmfScale = FDKmin(*qmfScale, hParametricStereo->qmfDelayScale); in DownmixPSQmfData()
445 hParametricStereo->qmfDelayScale = scale; in DownmixPSQmfData()
455 HANDLE_PARAMETRIC_STEREO hParametricStereo, in FDKsbrEnc_PSEnc_WritePSData() argument
459 …return ( (hParametricStereo!=NULL) ? FDKsbrEnc_WritePSBitstream(&hParametricStereo->psOut[0], hBit… in FDKsbrEnc_PSEnc_WritePSData()
464 HANDLE_PARAMETRIC_STEREO hParametricStereo, in FDKsbrEnc_PSEnc_ParametricStereoProcessing() argument
495 &hParametricStereo->fdkHybAnaFilter[psCh], in FDKsbrEnc_PSEnc_ParametricStereoProcessing()
498 hParametricStereo->pHybridData[i+HYBRID_READ_OFFSET][psCh][0], in FDKsbrEnc_PSEnc_ParametricStereoProcessing()
499 hParametricStereo->pHybridData[i+HYBRID_READ_OFFSET][psCh][1] in FDKsbrEnc_PSEnc_ParametricStereoProcessing()
511 psFindBestScaling( hParametricStereo, in FDKsbrEnc_PSEnc_ParametricStereoProcessing()
512 &hParametricStereo->pHybridData[HYBRID_READ_OFFSET], in FDKsbrEnc_PSEnc_ParametricStereoProcessing()
513 hParametricStereo->dynBandScale, in FDKsbrEnc_PSEnc_ParametricStereoProcessing()
514 hParametricStereo->maxBandValue, in FDKsbrEnc_PSEnc_ParametricStereoProcessing()
515 &hParametricStereo->dmxScale ) ; in FDKsbrEnc_PSEnc_ParametricStereoProcessing()
519 …if(PSENC_OK != (error = ExtractPSParameters(hParametricStereo, sendHeader, &hParametricStereo->pHy… in FDKsbrEnc_PSEnc_ParametricStereoProcessing()
525 …FDKmemcpy(hParametricStereo->pHybridData[i][0][0], hParametricStereo->pHybridData[HYBRID_FRAMESIZE… in FDKsbrEnc_PSEnc_ParametricStereoProcessing()
526 …FDKmemcpy(hParametricStereo->pHybridData[i][0][1], hParametricStereo->pHybridData[HYBRID_FRAMESIZE… in FDKsbrEnc_PSEnc_ParametricStereoProcessing()
527 …FDKmemcpy(hParametricStereo->pHybridData[i][1][0], hParametricStereo->pHybridData[HYBRID_FRAMESIZE… in FDKsbrEnc_PSEnc_ParametricStereoProcessing()
528 …FDKmemcpy(hParametricStereo->pHybridData[i][1][1], hParametricStereo->pHybridData[HYBRID_FRAMESIZE… in FDKsbrEnc_PSEnc_ParametricStereoProcessing()
532 …hParametricStereo, sbrSynthQmf, downmixedRealQmfData, downmixedImagQmfData, downsampledOutSignal, … in FDKsbrEnc_PSEnc_ParametricStereoProcessing()
542 HANDLE_PARAMETRIC_STEREO hParametricStereo, in psFindBestScaling() argument
549 HANDLE_PS_ENCODE hPsEncode = hParametricStereo->hPsEncode; in psFindBestScaling()
552 const INT frameSize = hParametricStereo->noQmfSlots; in psFindBestScaling()