Lines Matching refs:hMpsEnc

163 static INT FDK_MpegsEnc_WriteFrameHeader(HANDLE_MPS_ENCODER hMpsEnc,
169 HANDLE_MPS_ENCODER hMpsEnc = NULL; in FDK_MpegsEnc_Open() local
177 (hMpsEnc = (HANDLE_MPS_ENCODER)FDKcalloc(1, sizeof(MPS_ENCODER)))) { in FDK_MpegsEnc_Open()
181 FDKmemclear(hMpsEnc, sizeof(MPS_ENCODER)); in FDK_MpegsEnc_Open()
183 if (SACENC_OK != FDK_sacenc_open(&hMpsEnc->hSacEncoder)) { in FDK_MpegsEnc_Open()
189 *phMpsEnc = hMpsEnc; in FDK_MpegsEnc_Open()
193 FDK_MpegsEnc_Close(&hMpsEnc); in FDK_MpegsEnc_Open()
215 MPS_ENCODER_ERROR FDK_MpegsEnc_Init(HANDLE_MPS_ENCODER hMpsEnc, in FDK_MpegsEnc_Init() argument
226 if (hMpsEnc == NULL) { in FDK_MpegsEnc_Init()
277 FDK_sacenc_setParam(hMpsEnc->hSacEncoder, SACENC_LOWDELAY, in FDK_MpegsEnc_Init()
279 (SACENC_OK != FDK_sacenc_setParam(hMpsEnc->hSacEncoder, in FDK_MpegsEnc_Init()
281 (SACENC_OK != FDK_sacenc_setParam(hMpsEnc->hSacEncoder, in FDK_MpegsEnc_Init()
283 (SACENC_OK != FDK_sacenc_setParam(hMpsEnc->hSacEncoder, in FDK_MpegsEnc_Init()
286 (SACENC_OK != FDK_sacenc_setParam(hMpsEnc->hSacEncoder, in FDK_MpegsEnc_Init()
290 FDK_sacenc_setParam(hMpsEnc->hSacEncoder, SACENC_TIME_DOM_DMX, 2)) || in FDK_MpegsEnc_Init()
292 FDK_sacenc_setParam(hMpsEnc->hSacEncoder, SACENC_COARSE_QUANT, 0)) || in FDK_MpegsEnc_Init()
293 (SACENC_OK != FDK_sacenc_setParam(hMpsEnc->hSacEncoder, in FDK_MpegsEnc_Init()
296 (SACENC_OK != FDK_sacenc_setParam(hMpsEnc->hSacEncoder, in FDK_MpegsEnc_Init()
298 (SACENC_OK != FDK_sacenc_setParam(hMpsEnc->hSacEncoder, in FDK_MpegsEnc_Init()
310 if (SACENC_OK != FDK_sacenc_init(hMpsEnc->hSacEncoder, coreCoderDelay)) { in FDK_MpegsEnc_Init()
314 hMpsEnc->audioObjectType = audioObjectType; in FDK_MpegsEnc_Init()
316 hMpsEnc->inBufDesc.ppBase = (void **)&hMpsEnc->pInBuffer; in FDK_MpegsEnc_Init()
317 hMpsEnc->inBufDesc.pBufSize = hMpsEnc->pInBufferSize; in FDK_MpegsEnc_Init()
318 hMpsEnc->inBufDesc.pEleSize = hMpsEnc->pInBufferElSize; in FDK_MpegsEnc_Init()
319 hMpsEnc->inBufDesc.pBufType = hMpsEnc->pInBufferType; in FDK_MpegsEnc_Init()
320 hMpsEnc->inBufDesc.numBufs = 1; in FDK_MpegsEnc_Init()
322 hMpsEnc->outBufDesc.ppBase = (void **)&hMpsEnc->pOutBuffer; in FDK_MpegsEnc_Init()
323 hMpsEnc->outBufDesc.pBufSize = hMpsEnc->pOutBufferSize; in FDK_MpegsEnc_Init()
324 hMpsEnc->outBufDesc.pEleSize = hMpsEnc->pOutBufferElSize; in FDK_MpegsEnc_Init()
325 hMpsEnc->outBufDesc.pBufType = hMpsEnc->pOutBufferType; in FDK_MpegsEnc_Init()
326 hMpsEnc->outBufDesc.numBufs = 2; in FDK_MpegsEnc_Init()
328 hMpsEnc->pInBuffer[0] = NULL; in FDK_MpegsEnc_Init()
329 hMpsEnc->pInBufferSize[0] = 0; in FDK_MpegsEnc_Init()
330 hMpsEnc->pInBufferElSize[0] = sizeof(INT_PCM); in FDK_MpegsEnc_Init()
331 hMpsEnc->pInBufferType[0] = (FDK_BUF_TYPE_INPUT | FDK_BUF_TYPE_PCM_DATA); in FDK_MpegsEnc_Init()
333 hMpsEnc->pOutBuffer[0] = NULL; in FDK_MpegsEnc_Init()
334 hMpsEnc->pOutBufferSize[0] = 0; in FDK_MpegsEnc_Init()
335 hMpsEnc->pOutBufferElSize[0] = sizeof(INT_PCM); in FDK_MpegsEnc_Init()
336 hMpsEnc->pOutBufferType[0] = (FDK_BUF_TYPE_OUTPUT | FDK_BUF_TYPE_PCM_DATA); in FDK_MpegsEnc_Init()
338 hMpsEnc->pOutBuffer[1] = NULL; in FDK_MpegsEnc_Init()
339 hMpsEnc->pOutBufferSize[1] = 0; in FDK_MpegsEnc_Init()
340 hMpsEnc->pOutBufferElSize[1] = sizeof(UCHAR); in FDK_MpegsEnc_Init()
341 hMpsEnc->pOutBufferType[1] = (FDK_BUF_TYPE_OUTPUT | FDK_BUF_TYPE_BS_DATA); in FDK_MpegsEnc_Init()
343 hMpsEnc->inargs.isInputInterleaved = 0; in FDK_MpegsEnc_Init()
344 hMpsEnc->inargs.inputBufferSizePerChannel = inputBufferSizePerChannel; in FDK_MpegsEnc_Init()
350 MPS_ENCODER_ERROR FDK_MpegsEnc_Process(HANDLE_MPS_ENCODER hMpsEnc, in FDK_MpegsEnc_Process() argument
356 if (hMpsEnc == NULL) { in FDK_MpegsEnc_Process()
363 if (hMpsEnc->audioObjectType == AOT_ER_AAC_ELD) { in FDK_MpegsEnc_Process()
368 hMpsEnc->sacOutBuffer[0] = (sacHeaderFlag == 0) ? 0x3 : 0x7; in FDK_MpegsEnc_Process()
373 hMpsEnc, &hMpsEnc->sacOutBuffer[sacOutBufferOffset], in FDK_MpegsEnc_Process()
374 sizeof(hMpsEnc->sacOutBuffer) - sacOutBufferOffset); in FDK_MpegsEnc_Process()
378 hMpsEnc->pInBuffer[0] = (void *)pAudioSamples; in FDK_MpegsEnc_Process()
379 hMpsEnc->inargs.nInputSamples = nAudioSamples; in FDK_MpegsEnc_Process()
381 hMpsEnc->pOutBuffer[0] = (void *)pAudioSamples; in FDK_MpegsEnc_Process()
382 hMpsEnc->pOutBufferSize[0] = sizeof(INT_PCM) * nAudioSamples / 2; in FDK_MpegsEnc_Process()
384 hMpsEnc->pOutBuffer[1] = (void *)&hMpsEnc->sacOutBuffer[sacOutBufferOffset]; in FDK_MpegsEnc_Process()
385 hMpsEnc->pOutBufferSize[1] = in FDK_MpegsEnc_Process()
386 sizeof(hMpsEnc->sacOutBuffer) - sacOutBufferOffset; in FDK_MpegsEnc_Process()
389 if (SACENC_OK != FDK_sacenc_encode(hMpsEnc->hSacEncoder, in FDK_MpegsEnc_Process()
390 &hMpsEnc->inBufDesc, in FDK_MpegsEnc_Process()
391 &hMpsEnc->outBufDesc, &hMpsEnc->inargs, in FDK_MpegsEnc_Process()
392 &hMpsEnc->outargs)) { in FDK_MpegsEnc_Process()
398 pMpsExtPayload->pData = (UCHAR *)hMpsEnc->sacOutBuffer; in FDK_MpegsEnc_Process()
400 hMpsEnc->outargs.nOutputBits + 8 * (sacOutBufferOffset - 1); in FDK_MpegsEnc_Process()
409 INT FDK_MpegsEnc_WriteSpatialSpecificConfig(HANDLE_MPS_ENCODER hMpsEnc, in FDK_MpegsEnc_WriteSpatialSpecificConfig() argument
413 if (NULL != hMpsEnc) { in FDK_MpegsEnc_WriteSpatialSpecificConfig()
415 FDK_sacenc_getInfo(hMpsEnc->hSacEncoder, &mp4SpaceEncoderInfo); in FDK_MpegsEnc_WriteSpatialSpecificConfig()
435 static INT FDK_MpegsEnc_WriteFrameHeader(HANDLE_MPS_ENCODER hMpsEnc, in FDK_MpegsEnc_WriteFrameHeader() argument
443 if ((NULL != hMpsEnc) && (NULL != pOutputBuffer)) { in FDK_MpegsEnc_WriteFrameHeader()
449 cnt = (FDK_MpegsEnc_WriteSpatialSpecificConfig(hMpsEnc, NULL) + 7) >> 3; in FDK_MpegsEnc_WriteFrameHeader()
462 FDK_MpegsEnc_WriteSpatialSpecificConfig(hMpsEnc, &Bs); in FDK_MpegsEnc_WriteFrameHeader()
495 INT FDK_MpegsEnc_GetDelay(HANDLE_MPS_ENCODER hMpsEnc) { in FDK_MpegsEnc_GetDelay() argument
498 if (NULL != hMpsEnc) { in FDK_MpegsEnc_GetDelay()
500 FDK_sacenc_getInfo(hMpsEnc->hSacEncoder, &mp4SpaceEncoderInfo); in FDK_MpegsEnc_GetDelay()
507 INT FDK_MpegsEnc_GetDecDelay(HANDLE_MPS_ENCODER hMpsEnc) { in FDK_MpegsEnc_GetDecDelay() argument
510 if (NULL != hMpsEnc) { in FDK_MpegsEnc_GetDecDelay()
512 FDK_sacenc_getInfo(hMpsEnc->hSacEncoder, &mp4SpaceEncoderInfo); in FDK_MpegsEnc_GetDecDelay()