Lines Matching refs:hTp
347 HANDLE_FDK_BITSTREAM transportEnc_GetBitstream(HANDLE_TRANSPORTENC hTp) { in transportEnc_GetBitstream() argument
348 return &hTp->bitStream; in transportEnc_GetBitstream()
380 TRANSPORTENC_ERROR transportEnc_WriteAccessUnit(HANDLE_TRANSPORTENC hTp, in transportEnc_WriteAccessUnit() argument
385 if (!hTp) { in transportEnc_WriteAccessUnit()
388 HANDLE_FDK_BITSTREAM hBs = &hTp->bitStream; in transportEnc_WriteAccessUnit()
391 if (hTp->pceFrameCounter >= hTp->config.headerPeriod) { in transportEnc_WriteAccessUnit()
393 hTp->config.channelMode, hTp->config.matrixMixdownA, in transportEnc_WriteAccessUnit()
397 switch (hTp->transportFmt) { in transportEnc_WriteAccessUnit()
399 FDKinitBitStream(&hTp->bitStream, hTp->bsBuffer, hTp->bsBufferSize, 0, in transportEnc_WriteAccessUnit()
401 if (0 != adifWrite_EncodeHeader(&hTp->writer.adif, hBs, bufferFullness)) { in transportEnc_WriteAccessUnit()
409 adtsWrite_EncodeHeader(&hTp->writer.adts, &hTp->bitStream, bufferFullness, in transportEnc_WriteAccessUnit()
418 transportEnc_LatmWrite(&hTp->writer.latm, hBs, frameUsedBits, in transportEnc_WriteAccessUnit()
419 bufferFullness, &hTp->callbacks); in transportEnc_WriteAccessUnit()
422 if (hTp->writer.raw.curSubFrame >= hTp->writer.raw.nSubFrames) { in transportEnc_WriteAccessUnit()
423 hTp->writer.raw.curSubFrame = 0; in transportEnc_WriteAccessUnit()
424 FDKinitBitStream(&hTp->bitStream, hTp->bsBuffer, hTp->bsBufferSize, 0, in transportEnc_WriteAccessUnit()
427 hTp->writer.raw.prevBits = FDKgetValidBits(hBs); in transportEnc_WriteAccessUnit()
435 if (hTp->pceFrameCounter >= hTp->config.headerPeriod) { in transportEnc_WriteAccessUnit()
438 UINT alignAnchor = FDKgetValidBits(&hTp->bitStream); in transportEnc_WriteAccessUnit()
441 FDKwriteBits(&hTp->bitStream, ID_PCE, 3); in transportEnc_WriteAccessUnit()
443 if ((hTp->transportFmt == TT_MP4_ADTS) && in transportEnc_WriteAccessUnit()
444 !hTp->writer.adts.protection_absent) { in transportEnc_WriteAccessUnit()
445 crcIndex = adtsWrite_CrcStartReg(&hTp->writer.adts, &hTp->bitStream, 0); in transportEnc_WriteAccessUnit()
450 &hTp->bitStream, hTp->config.channelMode, hTp->config.samplingRate, 0, in transportEnc_WriteAccessUnit()
451 1, hTp->config.matrixMixdownA, in transportEnc_WriteAccessUnit()
452 (hTp->config.flags & CC_PSEUDO_SURROUND) ? 1 : 0, alignAnchor); in transportEnc_WriteAccessUnit()
454 if ((hTp->transportFmt == TT_MP4_ADTS) && in transportEnc_WriteAccessUnit()
455 !hTp->writer.adts.protection_absent) { in transportEnc_WriteAccessUnit()
456 adtsWrite_CrcEndReg(&hTp->writer.adts, &hTp->bitStream, crcIndex); in transportEnc_WriteAccessUnit()
458 hTp->pceFrameCounter = 0; /* reset pce frame counter */ in transportEnc_WriteAccessUnit()
461 if (hTp->pceFrameCounter != -1) { in transportEnc_WriteAccessUnit()
462 hTp->pceFrameCounter++; /* Update pceFrameCounter only if PCE writing is in transportEnc_WriteAccessUnit()
469 TRANSPORTENC_ERROR transportEnc_EndAccessUnit(HANDLE_TRANSPORTENC hTp, in transportEnc_EndAccessUnit() argument
471 switch (hTp->transportFmt) { in transportEnc_EndAccessUnit()
475 transportEnc_LatmAdjustSubframeBits(&hTp->writer.latm, bits); in transportEnc_EndAccessUnit()
478 adtsWrite_EndRawDataBlock(&hTp->writer.adts, &hTp->bitStream, bits); in transportEnc_EndAccessUnit()
482 *bits -= adifWrite_GetHeaderBits(&hTp->writer.adif); in transportEnc_EndAccessUnit()
483 hTp->writer.adif.headerWritten = 1; in transportEnc_EndAccessUnit()
486 *bits -= hTp->writer.raw.prevBits; in transportEnc_EndAccessUnit()
532 INT transportEnc_GetStaticBits(HANDLE_TRANSPORTENC hTp, int auBits) { in transportEnc_GetStaticBits() argument
536 if (hTp->pceFrameCounter >= hTp->config.headerPeriod) { in transportEnc_GetStaticBits()
538 hTp->config.channelMode, hTp->config.matrixMixdownA, in transportEnc_GetStaticBits()
545 switch (hTp->transportFmt) { in transportEnc_GetStaticBits()
551 nbits = adtsWrite_GetHeaderBits(&hTp->writer.adts); in transportEnc_GetStaticBits()
557 transportEnc_LatmCountTotalBitDemandHeader(&hTp->writer.latm, auBits); in transportEnc_GetStaticBits()