Lines Matching refs:hParametricStereo
111 HANDLE_PARAMETRIC_STEREO hParametricStereo,
118 HANDLE_PARAMETRIC_STEREO hParametricStereo = NULL; in PSEnc_Create() local
125 if (NULL == (hParametricStereo = GetRam_ParamStereo())) { in PSEnc_Create()
129 FDKmemclear(hParametricStereo, sizeof(PARAMETRIC_STEREO)); in PSEnc_Create()
132 (error = FDKsbrEnc_CreatePSEncode(&hParametricStereo->hPsEncode))) { in PSEnc_Create()
139 &hParametricStereo->fdkHybAnaFilter[i], in PSEnc_Create()
140 hParametricStereo->__staticHybAnaStatesLF[i], in PSEnc_Create()
141 sizeof(hParametricStereo->__staticHybAnaStatesLF[i]), in PSEnc_Create()
142 hParametricStereo->__staticHybAnaStatesHF[i], in PSEnc_Create()
143 sizeof(hParametricStereo->__staticHybAnaStatesHF[i])) != 0) { in PSEnc_Create()
152 *phParametricStereo = hParametricStereo; /* return allocated handle */ in PSEnc_Create()
161 FDK_PSENC_ERROR PSEnc_Init(HANDLE_PARAMETRIC_STEREO hParametricStereo, in PSEnc_Init() argument
166 if ((NULL == hParametricStereo) || (NULL == hPsEncConfig)) { in PSEnc_Init()
171 hParametricStereo->initPS = 1; in PSEnc_Init()
172 hParametricStereo->noQmfSlots = noQmfSlots; in PSEnc_Init()
173 hParametricStereo->noQmfBands = noQmfBands; in PSEnc_Init()
176 FDKmemclear(hParametricStereo->qmfDelayLines, in PSEnc_Init()
177 sizeof(hParametricStereo->qmfDelayLines)); in PSEnc_Init()
179 hParametricStereo->qmfDelayScale = FRACT_BITS - 1; in PSEnc_Init()
183 FDKhybridAnalysisInit(&hParametricStereo->fdkHybAnaFilter[ch], in PSEnc_Init()
187 FDKhybridSynthesisInit(&hParametricStereo->fdkHybSynFilter, THREE_TO_TEN, in PSEnc_Init()
191 hParametricStereo->psDelay = in PSEnc_Init()
192 (HYBRID_FILTER_DELAY * hParametricStereo->noQmfBands); in PSEnc_Init()
198 hParametricStereo->maxEnvelopes = hPsEncConfig->maxEnvelopes; in PSEnc_Init()
202 hParametricStereo->hPsEncode, (PS_BANDS)hPsEncConfig->nStereoBands, in PSEnc_Init()
212 hParametricStereo->pHybridData[i + HYBRID_READ_OFFSET][ch][0] = in PSEnc_Init()
214 hParametricStereo->pHybridData[i + HYBRID_READ_OFFSET][ch][1] = in PSEnc_Init()
220 hParametricStereo->pHybridData[i][ch][0] = in PSEnc_Init()
221 hParametricStereo->__staticHybridData[i][ch][0]; in PSEnc_Init()
222 hParametricStereo->pHybridData[i][ch][1] = in PSEnc_Init()
223 hParametricStereo->__staticHybridData[i][ch][1]; in PSEnc_Init()
228 FDKmemclear(hParametricStereo->__staticHybridData, in PSEnc_Init()
229 sizeof(hParametricStereo->__staticHybridData)); in PSEnc_Init()
232 FDKmemclear(hParametricStereo->psOut, sizeof(hParametricStereo->psOut)); in PSEnc_Init()
234 hParametricStereo->psOut[0].enablePSHeader = in PSEnc_Init()
238 FDKmemclear(hParametricStereo->dynBandScale, sizeof(UCHAR) * PS_MAX_BANDS); in PSEnc_Init()
239 FDKmemclear(hParametricStereo->maxBandValue, in PSEnc_Init()
251 HANDLE_PARAMETRIC_STEREO hParametricStereo = *phParametricStereo; in PSEnc_Destroy() local
252 if (hParametricStereo != NULL) { in PSEnc_Destroy()
253 FDKsbrEnc_DestroyPSEncode(&hParametricStereo->hPsEncode); in PSEnc_Destroy()
262 HANDLE_PARAMETRIC_STEREO hParametricStereo, const int sendHeader, in ExtractPSParameters() argument
266 if (hParametricStereo == NULL) { in ExtractPSParameters()
270 if (hParametricStereo->initPS) { in ExtractPSParameters()
271 hParametricStereo->psOut[1] = hParametricStereo->psOut[0]; in ExtractPSParameters()
273 hParametricStereo->psOut[0] = hParametricStereo->psOut[1]; in ExtractPSParameters()
277 hParametricStereo->hPsEncode, &hParametricStereo->psOut[1], in ExtractPSParameters()
278 hParametricStereo->dynBandScale, hParametricStereo->maxEnvelopes, in ExtractPSParameters()
279 hybridData, hParametricStereo->noQmfSlots, sendHeader))) { in ExtractPSParameters()
283 if (hParametricStereo->initPS) { in ExtractPSParameters()
284 hParametricStereo->psOut[0] = hParametricStereo->psOut[1]; in ExtractPSParameters()
285 hParametricStereo->initPS = 0; in ExtractPSParameters()
293 HANDLE_PARAMETRIC_STEREO hParametricStereo, in DownmixPSQmfData() argument
302 if (hParametricStereo == NULL) { in DownmixPSQmfData()
310 0, hParametricStereo->dmxScale - in DownmixPSQmfData()
382 FDKhybridSynthesisApply(&hParametricStereo->fdkHybSynFilter, tmpHybrid[0], in DownmixPSQmfData()
399 const INT noQmfSlots2 = hParametricStereo->noQmfSlots >> 1; in DownmixPSQmfData()
400 const int noQmfBands = hParametricStereo->noQmfBands; in DownmixPSQmfData()
407 FDKmemcpy(tmp[0], hParametricStereo->qmfDelayLines[0][i], in DownmixPSQmfData()
409 FDKmemcpy(tmp[1], hParametricStereo->qmfDelayLines[1][i], in DownmixPSQmfData()
412 FDKmemcpy(hParametricStereo->qmfDelayLines[0][i], in DownmixPSQmfData()
415 FDKmemcpy(hParametricStereo->qmfDelayLines[1][i], in DownmixPSQmfData()
428 if (hParametricStereo->qmfDelayScale > *qmfScale) { in DownmixPSQmfData()
429 scale = hParametricStereo->qmfDelayScale - *qmfScale; in DownmixPSQmfData()
432 scale = *qmfScale - hParametricStereo->qmfDelayScale; in DownmixPSQmfData()
444 *qmfScale = fMin(*qmfScale, hParametricStereo->qmfDelayScale); in DownmixPSQmfData()
445 hParametricStereo->qmfDelayScale = scale; in DownmixPSQmfData()
453 INT FDKsbrEnc_PSEnc_WritePSData(HANDLE_PARAMETRIC_STEREO hParametricStereo, in FDKsbrEnc_PSEnc_WritePSData() argument
456 (hParametricStereo != NULL) in FDKsbrEnc_PSEnc_WritePSData()
457 ? FDKsbrEnc_WritePSBitstream(&hParametricStereo->psOut[0], hBitstream) in FDKsbrEnc_PSEnc_WritePSData()
462 HANDLE_PARAMETRIC_STEREO hParametricStereo, INT_PCM *samples[2], in FDKsbrEnc_PSEnc_ParametricStereoProcessing() argument
482 &hParametricStereo->fdkHybAnaFilter[psCh], in FDKsbrEnc_PSEnc_ParametricStereoProcessing()
485 hParametricStereo->pHybridData[i + HYBRID_READ_OFFSET][psCh][0], in FDKsbrEnc_PSEnc_ParametricStereoProcessing()
486 hParametricStereo->pHybridData[i + HYBRID_READ_OFFSET][psCh][1]); in FDKsbrEnc_PSEnc_ParametricStereoProcessing()
498 hParametricStereo, &hParametricStereo->pHybridData[HYBRID_READ_OFFSET], in FDKsbrEnc_PSEnc_ParametricStereoProcessing()
499 hParametricStereo->dynBandScale, hParametricStereo->maxBandValue, in FDKsbrEnc_PSEnc_ParametricStereoProcessing()
500 &hParametricStereo->dmxScale); in FDKsbrEnc_PSEnc_ParametricStereoProcessing()
504 (error = ExtractPSParameters(hParametricStereo, sendHeader, in FDKsbrEnc_PSEnc_ParametricStereoProcessing()
505 &hParametricStereo->pHybridData[0]))) { in FDKsbrEnc_PSEnc_ParametricStereoProcessing()
512 hParametricStereo->pHybridData[i][0][0], in FDKsbrEnc_PSEnc_ParametricStereoProcessing()
513 hParametricStereo->pHybridData[hParametricStereo->noQmfSlots + i][0][0], in FDKsbrEnc_PSEnc_ParametricStereoProcessing()
516 hParametricStereo->pHybridData[i][0][1], in FDKsbrEnc_PSEnc_ParametricStereoProcessing()
517 hParametricStereo->pHybridData[hParametricStereo->noQmfSlots + i][0][1], in FDKsbrEnc_PSEnc_ParametricStereoProcessing()
520 hParametricStereo->pHybridData[i][1][0], in FDKsbrEnc_PSEnc_ParametricStereoProcessing()
521 hParametricStereo->pHybridData[hParametricStereo->noQmfSlots + i][1][0], in FDKsbrEnc_PSEnc_ParametricStereoProcessing()
524 hParametricStereo->pHybridData[i][1][1], in FDKsbrEnc_PSEnc_ParametricStereoProcessing()
525 hParametricStereo->pHybridData[hParametricStereo->noQmfSlots + i][1][1], in FDKsbrEnc_PSEnc_ParametricStereoProcessing()
532 hParametricStereo, sbrSynthQmf, downmixedRealQmfData, in FDKsbrEnc_PSEnc_ParametricStereoProcessing()
534 &hParametricStereo->pHybridData[HYBRID_READ_OFFSET], in FDKsbrEnc_PSEnc_ParametricStereoProcessing()
535 hParametricStereo->noQmfSlots, psQmfScale, qmfScale))) { in FDKsbrEnc_PSEnc_ParametricStereoProcessing()
545 HANDLE_PARAMETRIC_STEREO hParametricStereo, in psFindBestScaling() argument
548 HANDLE_PS_ENCODE hPsEncode = hParametricStereo->hPsEncode; in psFindBestScaling()
551 const INT frameSize = hParametricStereo->noQmfSlots; in psFindBestScaling()