Lines Matching refs:hAacEnc

253 static INT FDKaacEnc_EncBitresToTpBitres(const HANDLE_AAC_ENC hAacEnc) {  in FDKaacEnc_EncBitresToTpBitres()  argument
256 switch (hAacEnc->bitrateMode) { in FDKaacEnc_EncBitresToTpBitres()
259 hAacEnc->qcKernel->bitResTot; /* encoder bitreservoir level */ in FDKaacEnc_EncBitresToTpBitres()
276 if (hAacEnc->config->audioMuxVersion == 2) { in FDKaacEnc_EncBitresToTpBitres()
278 MIN_BUFSIZE_PER_EFF_CHAN * hAacEnc->channelMapping.nChannelsEff; in FDKaacEnc_EncBitresToTpBitres()
338 AAC_ENC *hAacEnc = NULL; in FDKaacEnc_Open() local
346 hAacEnc = GetRam_aacEnc_AacEncoder(); in FDKaacEnc_Open()
347 if (hAacEnc == NULL) { in FDKaacEnc_Open()
351 FDKmemclear(hAacEnc, sizeof(AAC_ENC)); in FDKaacEnc_Open()
353 if (NULL == (hAacEnc->dynamic_RAM = GetAACdynamic_RAM())) { in FDKaacEnc_Open()
357 dynamicRAM = (UCHAR *)hAacEnc->dynamic_RAM; in FDKaacEnc_Open()
361 FDKaacEnc_PsyNew(&hAacEnc->psyKernel, nElements, nChannels, dynamicRAM); in FDKaacEnc_Open()
364 ErrorStatus = FDKaacEnc_PsyOutNew(hAacEnc->psyOut, nElements, nChannels, in FDKaacEnc_Open()
369 ErrorStatus = FDKaacEnc_QCOutNew(hAacEnc->qcOut, nElements, nChannels, in FDKaacEnc_Open()
374 ErrorStatus = FDKaacEnc_QCNew(&hAacEnc->qcKernel, nElements, dynamicRAM); in FDKaacEnc_Open()
377 hAacEnc->maxChannels = nChannels; in FDKaacEnc_Open()
378 hAacEnc->maxElements = nElements; in FDKaacEnc_Open()
379 hAacEnc->maxFrames = nSubFrames; in FDKaacEnc_Open()
382 *phAacEnc = hAacEnc; in FDKaacEnc_Open()
387 HANDLE_AAC_ENC hAacEnc, in FDKaacEnc_Initialize() argument
399 const CHANNEL_MODE prevChannelMode = hAacEnc->encoderMode; in FDKaacEnc_Initialize()
478 &hAacEnc->ancillaryBitsPerFrame, config->sampleRate); in FDKaacEnc_Initialize()
483 FDKaacEnc_CalcBitrate(hAacEnc->ancillaryBitsPerFrame, in FDKaacEnc_Initialize()
495 hAacEnc->config = config; in FDKaacEnc_Initialize()
498 hAacEnc->bitrateMode = config->bitrateMode; in FDKaacEnc_Initialize()
500 hAacEnc->encoderMode = config->channelMode; in FDKaacEnc_Initialize()
503 hAacEnc->encoderMode, config->channelOrder, &hAacEnc->channelMapping); in FDKaacEnc_Initialize()
506 cm = &hAacEnc->channelMapping; in FDKaacEnc_Initialize()
510 hAacEnc->bitrateMode, config->sampleRate, config->framelength, cm, in FDKaacEnc_Initialize()
511 hAacEnc->encoderMode, &hAacEnc->config->bandWidth); in FDKaacEnc_Initialize()
514 hAacEnc->bandwidth90dB = (INT)hAacEnc->config->bandWidth; in FDKaacEnc_Initialize()
519 if ((hAacEnc->encoderMode != prevChannelMode) || (initFlags != 0)) { in FDKaacEnc_Initialize()
522 ErrorStatus = FDKaacEnc_psyInit(hAacEnc->psyKernel, hAacEnc->psyOut, in FDKaacEnc_Initialize()
523 hAacEnc->maxFrames, hAacEnc->maxChannels, in FDKaacEnc_Initialize()
529 hAacEnc->psyKernel, config->audioObjectType, cm, config->sampleRate, in FDKaacEnc_Initialize()
530 config->framelength, psyBitrate, tnsMask, hAacEnc->bandwidth90dB, in FDKaacEnc_Initialize()
535 ErrorStatus = FDKaacEnc_QCOutInit(hAacEnc->qcOut, hAacEnc->maxFrames, cm); in FDKaacEnc_Initialize()
538 qcInit.channelMapping = &hAacEnc->channelMapping; in FDKaacEnc_Initialize()
635 fDivNorm((FIXP_DBL)(10 * config->framelength * hAacEnc->bandwidth90dB), in FDKaacEnc_Initialize()
697 ErrorStatus = FDKaacEnc_QCInit(hAacEnc->qcKernel, &qcInit, initFlags); in FDKaacEnc_Initialize()
701 switch (hAacEnc->config->audioObjectType) { in FDKaacEnc_Initialize()
703 hAacEnc->aot = AOT_AAC_LC; in FDKaacEnc_Initialize()
706 hAacEnc->aot = AOT_SBR; in FDKaacEnc_Initialize()
709 hAacEnc->aot = hAacEnc->config->audioObjectType; in FDKaacEnc_Initialize()
729 HANDLE_AAC_ENC hAacEnc, /* encoder handle */ in FDKaacEnc_EncodeFrame() argument
737 CHANNEL_MAPPING *cm = &hAacEnc->channelMapping; in FDKaacEnc_EncodeFrame()
739 PSY_OUT *psyOut = hAacEnc->psyOut[c]; in FDKaacEnc_EncodeFrame()
740 QC_OUT *qcOut = hAacEnc->qcOut[c]; in FDKaacEnc_EncodeFrame()
771 elInfo.nChannelsInEl, hAacEnc->psyKernel->psyElement[el], in FDKaacEnc_EncodeFrame()
772 hAacEnc->psyKernel->psyDynamic, hAacEnc->psyKernel->psyConf, in FDKaacEnc_EncodeFrame()
780 &elInfo, hAacEnc->qcKernel->hAdjThr->adjThrStateElem[el], in FDKaacEnc_EncodeFrame()
781 psyOut->psyOutElement[el], qcOut->qcElement[el], hAacEnc->aot, in FDKaacEnc_EncodeFrame()
782 hAacEnc->config->syntaxFlags, hAacEnc->config->epConfig); in FDKaacEnc_EncodeFrame()
808 hAacEnc->config->syntaxFlags, hAacEnc->aot, in FDKaacEnc_EncodeFrame()
809 hAacEnc->config->epConfig); in FDKaacEnc_EncodeFrame()
837 if (hAacEnc->ancillaryBitsPerFrame) { in FDKaacEnc_EncodeFrame()
839 payloadBits = hAacEnc->ancillaryBitsPerFrame; in FDKaacEnc_EncodeFrame()
843 hAacEnc->config->maxAncBytesPerAU) { in FDKaacEnc_EncodeFrame()
862 NULL, &qcOut->extension[idx], 0, 0, hAacEnc->config->syntaxFlags, in FDKaacEnc_EncodeFrame()
863 hAacEnc->aot, hAacEnc->config->epConfig); in FDKaacEnc_EncodeFrame()
873 if (!(hAacEnc->config->syntaxFlags & (AC_SCALABLE | AC_ER))) { in FDKaacEnc_EncodeFrame()
889 hAacEnc->qcKernel, cm, &avgTotalBits, hAacEnc->config->bitRate, in FDKaacEnc_EncodeFrame()
890 hAacEnc->config->sampleRate, hAacEnc->config->framelength); in FDKaacEnc_EncodeFrame()
893 avgTotalBits *= hAacEnc->config->nSubFrames; in FDKaacEnc_EncodeFrame()
899 hAacEnc->qcKernel->globHdrBits = transportEnc_GetStaticBits( in FDKaacEnc_EncodeFrame()
900 hTpEnc, avgTotalBits + hAacEnc->qcKernel->bitResTot); in FDKaacEnc_EncodeFrame()
907 hAacEnc->qcKernel, hAacEnc->psyOut, hAacEnc->qcOut, avgTotalBits, cm, in FDKaacEnc_EncodeFrame()
908 hAacEnc->aot, hAacEnc->config->syntaxFlags, hAacEnc->config->epConfig); in FDKaacEnc_EncodeFrame()
915 cm, hAacEnc->qcKernel, hAacEnc->qcKernel->elementBits, hAacEnc->qcOut); in FDKaacEnc_EncodeFrame()
920 cm, hAacEnc->qcKernel, qcOut, qcOut->qcElement, hTpEnc, hAacEnc->aot, in FDKaacEnc_EncodeFrame()
921 hAacEnc->config->syntaxFlags, hAacEnc->config->epConfig); in FDKaacEnc_EncodeFrame()
927 FDKaacEnc_updateBitres(cm, hAacEnc->qcKernel, hAacEnc->qcOut); in FDKaacEnc_EncodeFrame()
935 FDKaacEnc_EncBitresToTpBitres(hAacEnc), in FDKaacEnc_EncodeFrame()
942 hTpEnc, cm, qcOut, psyOut, hAacEnc->qcKernel, hAacEnc->aot, in FDKaacEnc_EncodeFrame()
943 hAacEnc->config->syntaxFlags, hAacEnc->config->epConfig); in FDKaacEnc_EncodeFrame()
972 AAC_ENC *hAacEnc = (AAC_ENC *)*phAacEnc; in FDKaacEnc_Close() local
974 if (hAacEnc->dynamic_RAM != NULL) FreeAACdynamic_RAM(&hAacEnc->dynamic_RAM); in FDKaacEnc_Close()
976 FDKaacEnc_PsyClose(&hAacEnc->psyKernel, hAacEnc->psyOut); in FDKaacEnc_Close()
978 FDKaacEnc_QCClose(&hAacEnc->qcKernel, hAacEnc->qcOut); in FDKaacEnc_Close()