• Home
  • Raw
  • Download

Lines Matching refs:hAacEncoder

740 AACENC_ERROR FDKaacEnc_AdjustEncSettings(HANDLE_AACENCODER hAacEncoder,  in FDKaacEnc_AdjustEncSettings()  argument
746 HANDLE_AACENC_CONFIG hAacConfig = &hAacEncoder->aacConfig; in FDKaacEnc_AdjustEncSettings()
962 if ( (hAacConfig->nChannels > hAacEncoder->nMaxAacChannels) in FDKaacEnc_AdjustEncSettings()
963 …c_GetChannelModeConfiguration(hAacConfig->channelMode)->nChannelsEff > hAacEncoder->nMaxSbrChannel… in FDKaacEnc_AdjustEncSettings()
977 hAacEncoder->metaDataAllowed = 1; in FDKaacEnc_AdjustEncSettings()
984 hAacEncoder->metaDataAllowed = 0; in FDKaacEnc_AdjustEncSettings()
1002 HANDLE_AACENCODER hAacEncoder = (HANDLE_AACENCODER)self; in aacenc_SbrCallback() local
1004 sbrEncoder_GetHeader(hAacEncoder->hEnvEnc, hBs, elementIndex, 0); in aacenc_SbrCallback()
1009 static AACENC_ERROR aacEncInit(HANDLE_AACENCODER hAacEncoder, in aacEncInit() argument
1016 HANDLE_SBR_ENCODER *hSbrEncoder = &hAacEncoder->hEnvEnc; in aacEncInit()
1017 HANDLE_AACENC_CONFIG hAacConfig = &hAacEncoder->aacConfig; in aacEncInit()
1019 hAacEncoder->nZerosAppended = 0; /* count appended zeros */ in aacEncInit()
1028 if ( (err=FDKaacEnc_AdjustEncSettings(hAacEncoder, config)) != AACENC_OK ) { in aacEncInit()
1041 …FDKmemclear(hAacEncoder->inputBuffer, sizeof(INT_PCM)*hAacEncoder->nMaxAacChannels*INPUTBUFFER_SIZ… in aacEncInit()
1048 hAacEncoder->nDelay = DELAY_AACELD(hAacConfig->framelength); in aacEncInit()
1051 hAacEncoder->nDelay = DELAY_AAC(hAacConfig->framelength); /* AAC encoder delay */ in aacEncInit()
1085 hAacEncoder->inputBuffer, in aacEncInit()
1093 &hAacEncoder->nDelay, in aacEncInit()
1127 &hAacEncoder->coderConfig, in aacEncInit()
1137 FDKmemclear(hAacEncoder->outBuffer, hAacEncoder->outBufferInBytes*sizeof(UCHAR)); in aacEncInit()
1140 …f ( transportEnc_Init(hAacEncoder->hTpEnc, hAacEncoder->outBuffer, hAacEncoder->outBufferInBytes, … in aacEncInit()
1153 err = FDKaacEnc_Initialize(hAacEncoder->hAacEnc, in aacEncInit()
1155 hAacEncoder->hTpEnc, in aacEncInit()
1167 if ( hAacEncoder->hMetadataEnc && (hAacEncoder->metaDataAllowed!=0) && in aacEncInit()
1176 if ( FDK_MetadataEnc_Init(hAacEncoder->hMetadataEnc, in aacEncInit()
1189 hAacEncoder->nDelay += FDK_MetadataEnc_GetDelay(hAacEncoder->hMetadataEnc); in aacEncInit()
1197 hAacEncoder->inputBufferOffset = aacBufferOffset; in aacEncInit()
1199 hAacEncoder->nSamplesToRead = frameLength * config->nChannels; in aacEncInit()
1202 hAacEncoder->nDelay *= config->nChannels; in aacEncInit()
1217 HANDLE_AACENCODER hAacEncoder = NULL; in aacEncOpen() local
1225 hAacEncoder = Get_AacEncoder(); in aacEncOpen()
1227 if (hAacEncoder == NULL) { in aacEncOpen()
1232 FDKmemclear(hAacEncoder, sizeof(AACENCODER)); in aacEncOpen()
1236 hAacEncoder->encoder_modis = ENC_MODE_FLAG_AAC; in aacEncOpen()
1237 hAacEncoder->encoder_modis |= ENC_MODE_FLAG_SBR; in aacEncOpen()
1238 hAacEncoder->encoder_modis |= ENC_MODE_FLAG_PS; in aacEncOpen()
1239 hAacEncoder->encoder_modis |= ENC_MODE_FLAG_META; in aacEncOpen()
1243 hAacEncoder->encoder_modis = encModules; in aacEncOpen()
1248 hAacEncoder->nMaxAacChannels = (8); in aacEncOpen()
1249 hAacEncoder->nMaxSbrChannels = (8); in aacEncOpen()
1252 hAacEncoder->nMaxAacChannels = (maxChannels&0x00FF); in aacEncOpen()
1253 if ( (hAacEncoder->encoder_modis&ENC_MODE_FLAG_SBR) ) { in aacEncOpen()
1254hAacEncoder->nMaxSbrChannels = (maxChannels&0xFF00) ? (maxChannels>>8) : hAacEncoder->nMaxAacChann… in aacEncOpen()
1257 if ( (hAacEncoder->nMaxAacChannels>(8)) || (hAacEncoder->nMaxSbrChannels>(8)) ) { in aacEncOpen()
1264 hAacEncoder->nMaxAacElements = fixMin((8), hAacEncoder->nMaxAacChannels); in aacEncOpen()
1265 hAacEncoder->nMaxSbrElements = fixMin((8), hAacEncoder->nMaxSbrChannels); in aacEncOpen()
1266 hAacEncoder->nMaxSubFrames = (1); in aacEncOpen()
1271hAacEncoder->inputBuffer = (INT_PCM*)FDKcalloc(hAacEncoder->nMaxAacChannels*INPUTBUFFER_SIZE, size… in aacEncOpen()
1274 if (hAacEncoder->encoder_modis&ENC_MODE_FLAG_SBR) { in aacEncOpen()
1275 if ( sbrEncoder_Open(&hAacEncoder->hEnvEnc, in aacEncOpen()
1276 hAacEncoder->nMaxSbrElements, in aacEncOpen()
1277 hAacEncoder->nMaxSbrChannels, in aacEncOpen()
1278 (hAacEncoder->encoder_modis&ENC_MODE_FLAG_PS) ? 1 : 0 ) ) in aacEncOpen()
1287 if ( FDKaacEnc_Open(&hAacEncoder->hAacEnc, in aacEncOpen()
1288 hAacEncoder->nMaxAacElements, in aacEncOpen()
1289 hAacEncoder->nMaxAacChannels, in aacEncOpen()
1298 …for (ld_M=1; (UINT)(1<<ld_M) < (hAacEncoder->nMaxSubFrames*hAacEncoder->nMaxAacChannels*6144)>>3; … in aacEncOpen()
1299 hAacEncoder->outBufferInBytes = (1<<ld_M); /* buffer has to be 2^n */ in aacEncOpen()
1301 hAacEncoder->outBuffer = GetRam_bsOutbuffer(); in aacEncOpen()
1302 if (OUTPUTBUFFER_SIZE < hAacEncoder->outBufferInBytes ) { in aacEncOpen()
1308 if (hAacEncoder->encoder_modis&ENC_MODE_FLAG_META) { in aacEncOpen()
1309 if ( FDK_MetadataEnc_Open(&hAacEncoder->hMetadataEnc) ) in aacEncOpen()
1317 if ( transportEnc_Open(&hAacEncoder->hTpEnc) != 0 ) in aacEncOpen()
1329 hAacEncoder->CAPF_tpEnc = FDKlibInfo_getCapabilities( pLibInfo, FDK_TPENC); in aacEncOpen()
1333 …if ( transportEnc_RegisterSbrCallback(hAacEncoder->hTpEnc, aacenc_SbrCallback, hAacEncoder) != 0 )… in aacEncOpen()
1339 aacEncDefaultConfig(&hAacEncoder->aacConfig, &hAacEncoder->extParam); in aacEncOpen()
1342 hAacEncoder->coderConfig.headerPeriod = hAacEncoder->extParam.userTpHeaderPeriod; in aacEncOpen()
1345 hAacEncoder->InitFlags = AACENC_INIT_ALL; in aacEncOpen()
1348 *phAacEncoder = hAacEncoder; in aacEncOpen()
1353 aacEncClose(&hAacEncoder); in aacEncOpen()
1370 HANDLE_AACENCODER hAacEncoder = *phAacEncoder; in aacEncClose() local
1373 if (hAacEncoder->inputBuffer!=NULL) { in aacEncClose()
1374 FDKfree(hAacEncoder->inputBuffer); in aacEncClose()
1375 hAacEncoder->inputBuffer = NULL; in aacEncClose()
1378 if (hAacEncoder->outBuffer) { in aacEncClose()
1379 FreeRam_bsOutbuffer(&hAacEncoder->outBuffer); in aacEncClose()
1382 if (hAacEncoder->hEnvEnc) { in aacEncClose()
1383 sbrEncoder_Close (&hAacEncoder->hEnvEnc); in aacEncClose()
1385 if (hAacEncoder->hAacEnc) { in aacEncClose()
1386 FDKaacEnc_Close (&hAacEncoder->hAacEnc); in aacEncClose()
1389 transportEnc_Close(&hAacEncoder->hTpEnc); in aacEncClose()
1391 if (hAacEncoder->hMetadataEnc) { in aacEncClose()
1392 FDK_MetadataEnc_Close (&hAacEncoder->hMetadataEnc); in aacEncClose()
1403 const HANDLE_AACENCODER hAacEncoder, in aacEncEncode() argument
1417 if (hAacEncoder==NULL) { in aacEncEncode()
1426 if (hAacEncoder->InitFlags!=0) { in aacEncEncode()
1428 err = aacEncInit(hAacEncoder, in aacEncEncode()
1429 hAacEncoder->InitFlags, in aacEncEncode()
1430 &hAacEncoder->extParam); in aacEncEncode()
1436 hAacEncoder->InitFlags = AACENC_INIT_NONE; in aacEncEncode()
1454 …if ( (hAacEncoder!=NULL) & (inBufDesc==NULL) && (outBufDesc==NULL) && (inargs==NULL) && (outargs==… in aacEncEncode()
1459 FDKmemclear(outBytes, hAacEncoder->aacConfig.nSubFrames*sizeof(INT)); in aacEncEncode()
1468 …INT newSamples = fixMax(0,fixMin(inargs->numInSamples, hAacEncoder->nSamplesToRead-hAacEncoder->nS… in aacEncEncode()
1469 … INT_PCM *pIn = hAacEncoder->inputBuffer+hAacEncoder->inputBufferOffset+hAacEncoder->nSamplesRead; in aacEncEncode()
1485 hAacEncoder->nSamplesRead += newSamples; in aacEncEncode()
1492 if (hAacEncoder->nSamplesRead < hAacEncoder->nSamplesToRead) in aacEncEncode()
1498 if ( (hAacEncoder->nZerosAppended < hAacEncoder->nDelay) in aacEncEncode()
1501 int nZeros = hAacEncoder->nSamplesToRead - hAacEncoder->nSamplesRead; in aacEncEncode()
1507 …FDKmemclear(hAacEncoder->inputBuffer+hAacEncoder->inputBufferOffset+hAacEncoder->nSamplesRead, siz… in aacEncEncode()
1508 hAacEncoder->nZerosAppended += nZeros; in aacEncEncode()
1509 hAacEncoder->nSamplesRead = hAacEncoder->nSamplesToRead; in aacEncEncode()
1523 FDKmemclear(hAacEncoder->extPayload, sizeof(AACENC_EXT_PAYLOAD) * MAX_TOTAL_EXT_PAYLOADS); in aacEncEncode()
1525 hAacEncoder->extPayload[i].associatedChElement = -1; in aacEncEncode()
1527 FDKmemclear(hAacEncoder->extPayloadData, sizeof(hAacEncoder->extPayloadData)); in aacEncEncode()
1528 FDKmemclear(hAacEncoder->extPayloadSize, sizeof(hAacEncoder->extPayloadSize)); in aacEncEncode()
1534 if ( (hAacEncoder->hMetadataEnc!=NULL) && (hAacEncoder->metaDataAllowed!=0) ) { in aacEncEncode()
1546 FDK_MetadataEnc_Process(hAacEncoder->hMetadataEnc, in aacEncEncode()
1547 hAacEncoder->inputBuffer+hAacEncoder->inputBufferOffset, in aacEncEncode()
1548 hAacEncoder->nSamplesRead, in aacEncEncode()
1556 hAacEncoder->extPayload[nExtensions++] = pMetaDataExtPayload[i]; in aacEncEncode()
1560 …&& ((hAacEncoder->extParam.userChannelMode==MODE_1_2_2)||(hAacEncoder->extParam.userChannelMode==M… in aacEncEncode()
1564 if (hAacEncoder->extParam.userPceAdditions != pceValue) { in aacEncEncode()
1565 hAacEncoder->extParam.userPceAdditions = pceValue; in aacEncEncode()
1566 hAacEncoder->InitFlags |= AACENC_INIT_TRANSPORT; in aacEncEncode()
1572 if ( isSbrActive(&hAacEncoder->aacConfig) ) { in aacEncEncode()
1579 if (sbrEncoder_EncodeFrame(hAacEncoder->hEnvEnc, in aacEncEncode()
1580 hAacEncoder->inputBuffer, in aacEncEncode()
1581 hAacEncoder->extParam.nChannels, in aacEncEncode()
1582 hAacEncoder->extPayloadSize[nPayload], in aacEncEncode()
1583 hAacEncoder->extPayloadData[nPayload] in aacEncEncode()
1585 ,hAacEncoder->hAacEnc->clearOutput in aacEncEncode()
1595 if (hAacEncoder->extPayloadSize[nPayload][i] > 0) { in aacEncEncode()
1596hAacEncoder->extPayload[nExtensions].pData = hAacEncoder->extPayloadData[nPayload][i]; in aacEncEncode()
1598hAacEncoder->extPayload[nExtensions].dataSize = hAacEncoder->extPayloadSize[nPayload][i]; in aacEncEncode()
1599 hAacEncoder->extPayload[nExtensions].associatedChElement = i; in aacEncEncode()
1601hAacEncoder->extPayload[nExtensions].dataType = EXT_SBR_DATA; /* Once SBR Encoder supports SBR CR… in aacEncEncode()
1612 hAacEncoder->extPayload[nExtensions].dataSize = inargs->numAncBytes * 8; in aacEncEncode()
1613 hAacEncoder->extPayload[nExtensions].pData = (UCHAR*)inBufDesc->bufs[idx]; in aacEncEncode()
1614 hAacEncoder->extPayload[nExtensions].dataType = EXT_DATA_ELEMENT; in aacEncEncode()
1615 hAacEncoder->extPayload[nExtensions].associatedChElement = -1; in aacEncEncode()
1623 if ( FDKaacEnc_EncodeFrame( hAacEncoder->hAacEnc, in aacEncEncode()
1624 hAacEncoder->hTpEnc, in aacEncEncode()
1625 hAacEncoder->inputBuffer, in aacEncEncode()
1627 hAacEncoder->extPayload in aacEncEncode()
1635 … outargs->numAncBytes = inargs->numAncBytes - (hAacEncoder->extPayload[ancDataExtIdx].dataSize>>3); in aacEncEncode()
1639 hAacEncoder->nSamplesRead -= hAacEncoder->nSamplesToRead; in aacEncEncode()
1644 if (isSbrActive(&hAacEncoder->aacConfig)) { in aacEncEncode()
1645 sbrEncoder_UpdateBuffers(hAacEncoder->hEnvEnc, hAacEncoder->inputBuffer); in aacEncEncode()
1656 for (i=0,nBsBytes=0; i<hAacEncoder->aacConfig.nSubFrames; i++) { in aacEncEncode()
1665 FDKmemcpy(outBufDesc->bufs[bsIdx], hAacEncoder->outBuffer, sizeof(UCHAR)*nBsBytes); in aacEncEncode()
1678 hAacEncoder->InitFlags = AACENC_INIT_ALL; in aacEncEncode()
1685 AAC_ENCODER_ERROR aacEncGetConf(HANDLE_AACENCODER hAacEncoder, in aacEncGetConf() argument
1698 err = transportEnc_GetConf(hAacEncoder->hTpEnc, &hAacEncoder->coderConfig, &tmpConf, &confType); in aacEncGetConf()
1757 const HANDLE_AACENCODER hAacEncoder, in aacEncoder_SetParam() argument
1763 USER_PARAM *settings = &hAacEncoder->extParam; in aacEncoder_SetParam()
1766 if (hAacEncoder == NULL) { in aacEncoder_SetParam()
1779 if (!(hAacEncoder->encoder_modis & (ENC_MODE_FLAG_PS))) { in aacEncoder_SetParam()
1784 if (!(hAacEncoder->encoder_modis & (ENC_MODE_FLAG_SBR))) { in aacEncoder_SetParam()
1791 if (!(hAacEncoder->encoder_modis & (ENC_MODE_FLAG_AAC))) { in aacEncoder_SetParam()
1801hAacEncoder->InitFlags |= AACENC_INIT_CONFIG | AACENC_INIT_STATES | AACENC_INIT_TRANSPORT; in aacEncoder_SetParam()
1807 hAacEncoder->InitFlags |= AACENC_INIT_CONFIG | AACENC_INIT_TRANSPORT; in aacEncoder_SetParam()
1817 hAacEncoder->InitFlags |= AACENC_INIT_CONFIG | AACENC_INIT_TRANSPORT; in aacEncoder_SetParam()
1834 hAacEncoder->nSamplesRead = 0; /* reset internal inputbuffer */ in aacEncoder_SetParam()
1835hAacEncoder->InitFlags |= AACENC_INIT_CONFIG | AACENC_INIT_STATES | AACENC_INIT_TRANSPORT; in aacEncoder_SetParam()
1845 if ( (pConfig->nElements > hAacEncoder->nMaxAacElements) in aacEncoder_SetParam()
1846 || (pConfig->nChannelsEff > hAacEncoder->nMaxAacChannels) in aacEncoder_SetParam()
1856 hAacEncoder->nSamplesRead = 0; /* reset internal inputbuffer */ in aacEncoder_SetParam()
1857 hAacEncoder->InitFlags |= AACENC_INIT_CONFIG | AACENC_INIT_TRANSPORT; in aacEncoder_SetParam()
1863 hAacEncoder->InitFlags |= AACENC_INIT_CONFIG; in aacEncoder_SetParam()
1867 if (hAacEncoder->aacConfig.channelOrder != (CHANNEL_ORDER)value) { in aacEncoder_SetParam()
1872 hAacEncoder->aacConfig.channelOrder = (CHANNEL_ORDER)value; in aacEncoder_SetParam()
1873 hAacEncoder->nSamplesRead = 0; /* reset internal inputbuffer */ in aacEncoder_SetParam()
1874hAacEncoder->InitFlags |= AACENC_INIT_CONFIG | AACENC_INIT_STATES | AACENC_INIT_TRANSPORT; in aacEncoder_SetParam()
1884 hAacEncoder->InitFlags |= AACENC_INIT_CONFIG; in aacEncoder_SetParam()
1894 hAacEncoder->InitFlags |= AACENC_INIT_CONFIG | AACENC_INIT_TRANSPORT; in aacEncoder_SetParam()
1909hAacEncoder->InitFlags |= AACENC_INIT_CONFIG | AACENC_INIT_STATES | AACENC_INIT_TRANSPORT; in aacEncoder_SetParam()
1915hAacEncoder->InitFlags |= AACENC_INIT_CONFIG | AACENC_INIT_STATES | AACENC_INIT_TRANSPORT; in aacEncoder_SetParam()
1922 UINT flags = hAacEncoder->CAPF_tpEnc; in aacEncoder_SetParam()
1936 hAacEncoder->InitFlags |= AACENC_INIT_TRANSPORT; in aacEncoder_SetParam()
1946 hAacEncoder->InitFlags |= AACENC_INIT_TRANSPORT; in aacEncoder_SetParam()
1956 hAacEncoder->InitFlags |= AACENC_INIT_TRANSPORT; in aacEncoder_SetParam()
1962 hAacEncoder->InitFlags |= AACENC_INIT_TRANSPORT; in aacEncoder_SetParam()
1972 hAacEncoder->InitFlags |= AACENC_INIT_TRANSPORT; in aacEncoder_SetParam()
1982 hAacEncoder->InitFlags |= AACENC_INIT_TRANSPORT; in aacEncoder_SetParam()
1991 if (hAacEncoder->InitFlags != value) { in aacEncoder_SetParam()
1993 hAacEncoder->nSamplesRead = 0; in aacEncoder_SetParam()
1995 hAacEncoder->InitFlags = value; in aacEncoder_SetParam()
2005 hAacEncoder->InitFlags |= AACENC_INIT_CONFIG; in aacEncoder_SetParam()
2011 hAacEncoder->InitFlags |= AACENC_INIT_CONFIG | AACENC_INIT_TRANSPORT; in aacEncoder_SetParam()
2024 const HANDLE_AACENCODER hAacEncoder, in aacEncoder_GetParam() argument
2029 USER_PARAM *settings = &hAacEncoder->extParam; in aacEncoder_GetParam()
2032 if (hAacEncoder == NULL) { in aacEncoder_GetParam()
2040 value = (UINT)hAacEncoder->aacConfig.audioObjectType; in aacEncoder_GetParam()
2043 …value = (UINT)((hAacEncoder->aacConfig.bitrateMode==AACENC_BR_MODE_CBR) ? hAacEncoder->aacConfig.b… in aacEncoder_GetParam()
2046 value = (UINT)hAacEncoder->aacConfig.bitrateMode; in aacEncoder_GetParam()
2049 value = (UINT)hAacEncoder->coderConfig.extSamplingRate; in aacEncoder_GetParam()
2052 value = (UINT)hAacEncoder->aacConfig.channelMode; in aacEncoder_GetParam()
2055 value = (UINT)hAacEncoder->aacConfig.bandWidth; in aacEncoder_GetParam()
2058 value = (UINT)hAacEncoder->aacConfig.channelOrder; in aacEncoder_GetParam()
2061 value = (UINT)hAacEncoder->aacConfig.useRequant; in aacEncoder_GetParam()
2064 value = (UINT)hAacEncoder->aacConfig.framelength; in aacEncoder_GetParam()
2067 value = isSbrActive(&hAacEncoder->aacConfig) ? hAacEncoder->aacConfig.sbrRatio : 0; in aacEncoder_GetParam()
2070 value = (UINT) (hAacEncoder->aacConfig.syntaxFlags & AC_SBR_PRESENT) ? 1 : 0; in aacEncoder_GetParam()
2076 …(UINT)getSbrSignalingMode(hAacEncoder->aacConfig.audioObjectType, settings->userTpType, settings->… in aacEncoder_GetParam()
2082 value = (UINT)hAacEncoder->coderConfig.headerPeriod; in aacEncoder_GetParam()
2085 value = (UINT)hAacEncoder->aacConfig.audioMuxVersion; in aacEncoder_GetParam()
2091 value = (UINT)hAacEncoder->aacConfig.anc_Rate; in aacEncoder_GetParam()
2094 value = (UINT)hAacEncoder->InitFlags; in aacEncoder_GetParam()
2097 value = (hAacEncoder->metaDataAllowed==0) ? 0 : (UINT)settings->userMetaDataMode; in aacEncoder_GetParam()
2101 if ( ((INT)hAacEncoder->extParam.userPeakBitrate!=-1) ) { in aacEncoder_GetParam()
2102 …value = (UINT)(fMax((INT)hAacEncoder->extParam.userPeakBitrate, hAacEncoder->aacConfig.bitRate)); … in aacEncoder_GetParam()
2115 const HANDLE_AACENCODER hAacEncoder, in aacEncInfo() argument
2124 pInfo->maxOutBufBytes = ((hAacEncoder->nMaxAacChannels*6144)+7)>>3; in aacEncInfo()
2125 pInfo->maxAncBytes = hAacEncoder->aacConfig.maxAncBytesPerAU; in aacEncInfo()
2126 pInfo->inBufFillLevel = hAacEncoder->nSamplesRead/hAacEncoder->extParam.nChannels; in aacEncInfo()
2127 pInfo->inputChannels = hAacEncoder->extParam.nChannels; in aacEncInfo()
2128 pInfo->frameLength = hAacEncoder->nSamplesToRead/hAacEncoder->extParam.nChannels; in aacEncInfo()
2129 pInfo->encoderDelay = hAacEncoder->nDelay/hAacEncoder->extParam.nChannels; in aacEncInfo()
2132 if ( aacEncGetConf(hAacEncoder, &pInfo->confSize, &pInfo->confBuf[0]) != AAC_ENC_OK) { in aacEncInfo()