Lines Matching refs:hBitStream
130 HANDLE_FDK_BITSTREAM hBitStream) { in FDKaacEnc_encodeSpectralData() argument
132 INT dbgVal = FDKgetValidBits(hBitStream); in FDKaacEnc_encodeSpectralData()
142 sectionData->huffsection[i].codeBook, hBitStream); in FDKaacEnc_encodeSpectralData()
146 return (FDKgetValidBits(hBitStream) - dbgVal); in FDKaacEnc_encodeSpectralData()
159 HANDLE_FDK_BITSTREAM hBitStream, in FDKaacEnc_encodeGlobalGain() argument
161 if (hBitStream != NULL) { in FDKaacEnc_encodeGlobalGain()
162 FDKwriteBits(hBitStream, in FDKaacEnc_encodeGlobalGain()
182 HANDLE_FDK_BITSTREAM hBitStream, in FDKaacEnc_encodeIcsInfo() argument
196 if (hBitStream != NULL) { in FDKaacEnc_encodeIcsInfo()
198 FDKwriteBits(hBitStream, icsReservedBit, 1); in FDKaacEnc_encodeIcsInfo()
199 FDKwriteBits(hBitStream, blockType, 2); in FDKaacEnc_encodeIcsInfo()
200 FDKwriteBits(hBitStream, in FDKaacEnc_encodeIcsInfo()
208 FDKwriteBits(hBitStream, maxSfbPerGroup, 6); in FDKaacEnc_encodeIcsInfo()
213 FDKwriteBits(hBitStream, 0, 1); in FDKaacEnc_encodeIcsInfo()
218 FDKwriteBits(hBitStream, maxSfbPerGroup, 4); in FDKaacEnc_encodeIcsInfo()
221 FDKwriteBits(hBitStream, groupingMask, TRANS_FAC - 1); in FDKaacEnc_encodeIcsInfo()
240 HANDLE_FDK_BITSTREAM hBitStream, in FDKaacEnc_encodeSectionData() argument
242 if (hBitStream != NULL) { in FDKaacEnc_encodeSectionData()
246 INT dbgVal = FDKgetValidBits(hBitStream); in FDKaacEnc_encodeSectionData()
266 FDKwriteBits(hBitStream, codeBook, sectCbBits); in FDKaacEnc_encodeSectionData()
272 FDKwriteBits(hBitStream, sectEscapeVal, sectLenBits); in FDKaacEnc_encodeSectionData()
275 FDKwriteBits(hBitStream, sectLen, sectLenBits); in FDKaacEnc_encodeSectionData()
278 return (FDKgetValidBits(hBitStream) - dbgVal); in FDKaacEnc_encodeSectionData()
295 HANDLE_FDK_BITSTREAM hBitStream, in FDKaacEnc_encodeScaleFactorData() argument
298 if (hBitStream != NULL) { in FDKaacEnc_encodeScaleFactorData()
305 INT dbgVal = FDKgetValidBits(hBitStream); in FDKaacEnc_encodeScaleFactorData()
323 if (FDKaacEnc_codeScalefactorDelta(deltaIs, hBitStream)) { in FDKaacEnc_encodeScaleFactorData()
335 FDKwriteBits(hBitStream, deltaPns + (1 << (PNS_PCM_BITS - 1)), in FDKaacEnc_encodeScaleFactorData()
339 if (FDKaacEnc_codeScalefactorDelta(deltaPns, hBitStream)) { in FDKaacEnc_encodeScaleFactorData()
357 if (FDKaacEnc_codeScalefactorDelta(deltaScf, hBitStream)) { in FDKaacEnc_encodeScaleFactorData()
365 return (FDKgetValidBits(hBitStream) - dbgVal); in FDKaacEnc_encodeScaleFactorData()
382 HANDLE_FDK_BITSTREAM hBitStream) { in FDKaacEnc_encodeMSInfo() argument
385 if (hBitStream != NULL) { in FDKaacEnc_encodeMSInfo()
388 FDKwriteBits(hBitStream, SI_MS_MASK_NONE, 2); in FDKaacEnc_encodeMSInfo()
393 FDKwriteBits(hBitStream, SI_MS_MASK_ALL, 2); in FDKaacEnc_encodeMSInfo()
398 FDKwriteBits(hBitStream, SI_MS_MASK_SOME, 2); in FDKaacEnc_encodeMSInfo()
403 FDKwriteBits(hBitStream, 1, 1); in FDKaacEnc_encodeMSInfo()
405 FDKwriteBits(hBitStream, 0, 1); in FDKaacEnc_encodeMSInfo()
435 HANDLE_FDK_BITSTREAM hBitStream) { in FDKaacEnc_encodeTnsDataPresent() argument
436 if ((hBitStream != NULL) && (tnsInfo != NULL)) { in FDKaacEnc_encodeTnsDataPresent()
448 FDKwriteBits(hBitStream, 0, 1); in FDKaacEnc_encodeTnsDataPresent()
450 FDKwriteBits(hBitStream, 1, 1); in FDKaacEnc_encodeTnsDataPresent()
466 HANDLE_FDK_BITSTREAM hBitStream) { in FDKaacEnc_encodeTnsData() argument
481 if (hBitStream != NULL) { in FDKaacEnc_encodeTnsData()
484 FDKwriteBits(hBitStream, tnsInfo->numOfFilters[i], in FDKaacEnc_encodeTnsData()
488 FDKwriteBits(hBitStream, (tnsInfo->coefRes[i] == 4 ? 1 : 0), 1); in FDKaacEnc_encodeTnsData()
492 FDKwriteBits(hBitStream, tnsInfo->length[i][j], in FDKaacEnc_encodeTnsData()
496 FDKwriteBits(hBitStream, tnsInfo->order[i][j], in FDKaacEnc_encodeTnsData()
500 FDKwriteBits(hBitStream, tnsInfo->direction[i][j], 1); in FDKaacEnc_encodeTnsData()
521 FDKwriteBits(hBitStream, -(coefBits - tnsInfo->coefRes[i]), in FDKaacEnc_encodeTnsData()
526 FDKwriteBits(hBitStream, in FDKaacEnc_encodeTnsData()
589 static INT FDKaacEnc_encodeGainControlData(HANDLE_FDK_BITSTREAM hBitStream) { in FDKaacEnc_encodeGainControlData() argument
590 if (hBitStream != NULL) { in FDKaacEnc_encodeGainControlData()
591 FDKwriteBits(hBitStream, 0, 1); in FDKaacEnc_encodeGainControlData()
605 static INT FDKaacEnc_encodePulseData(HANDLE_FDK_BITSTREAM hBitStream) { in FDKaacEnc_encodePulseData() argument
606 if (hBitStream != NULL) { in FDKaacEnc_encodePulseData()
607 FDKwriteBits(hBitStream, 0, 1); in FDKaacEnc_encodePulseData()
621 static INT FDKaacEnc_writeExtensionPayload(HANDLE_FDK_BITSTREAM hBitStream, in FDKaacEnc_writeExtensionPayload() argument
634 if (hBitStream != NULL) { in FDKaacEnc_writeExtensionPayload()
635 FDKwriteBits(hBitStream, extPayloadType, EXT_TYPE_BITS); in FDKaacEnc_writeExtensionPayload()
642 if (hBitStream != NULL) { in FDKaacEnc_writeExtensionPayload()
643 FDKwriteBits(hBitStream, *extPayloadData++, 4); /* nibble */ in FDKaacEnc_writeExtensionPayload()
650 if (hBitStream != NULL) { in FDKaacEnc_writeExtensionPayload()
653 FDKwriteBits(hBitStream, *extPayloadData++, 8); in FDKaacEnc_writeExtensionPayload()
657 FDKwriteBits(hBitStream, (*extPayloadData) >> (8 - writeBits), in FDKaacEnc_writeExtensionPayload()
674 if (hBitStream != NULL) { in FDKaacEnc_writeExtensionPayload()
677 hBitStream, 0x00, in FDKaacEnc_writeExtensionPayload()
681 FDKwriteBits(hBitStream, 255, 8); in FDKaacEnc_writeExtensionPayload()
683 FDKwriteBits(hBitStream, dataElementLength, 8); in FDKaacEnc_writeExtensionPayload()
686 FDKwriteBits(hBitStream, extPayloadData[i], 8); in FDKaacEnc_writeExtensionPayload()
697 if (hBitStream != NULL) { in FDKaacEnc_writeExtensionPayload()
699 FDKwriteBits(hBitStream, 0x00, FILL_NIBBLE_BITS); in FDKaacEnc_writeExtensionPayload()
703 FDKwriteBits(hBitStream, fillByte, 8); in FDKaacEnc_writeExtensionPayload()
763 HANDLE_FDK_BITSTREAM hBitStream = transportEnc_GetBitstream(hTpEnc); in FDKaacEnc_writeDataStreamElement() local
766 FDKwriteBits(hBitStream, ID_DSE, EL_ID_BITS); in FDKaacEnc_writeDataStreamElement()
770 FDKwriteBits(hBitStream, elementInstanceTag, EL_INSTANCE_TAG_BITS); in FDKaacEnc_writeDataStreamElement()
771 FDKwriteBits(hBitStream, DATA_BYTE_ALIGN_FLAG, DATA_BYTE_ALIGN_FLAG_BITS); in FDKaacEnc_writeDataStreamElement()
775 FDKwriteBits(hBitStream, 255, DATA_LEN_COUNT_BITS); in FDKaacEnc_writeDataStreamElement()
776 FDKwriteBits(hBitStream, esc_count, DATA_LEN_ESC_COUNT_BITS); in FDKaacEnc_writeDataStreamElement()
778 FDKwriteBits(hBitStream, cnt, DATA_LEN_COUNT_BITS); in FDKaacEnc_writeDataStreamElement()
782 INT tmp = (INT)FDKgetValidBits(hBitStream); in FDKaacEnc_writeDataStreamElement()
783 FDKbyteAlign(hBitStream, alignAnchor); in FDKaacEnc_writeDataStreamElement()
786 (INT)FDKgetValidBits(hBitStream) - tmp - MAX_DATA_ALIGN_BITS; in FDKaacEnc_writeDataStreamElement()
791 FDKwriteBits(hBitStream, dataBuffer[i], 8); in FDKaacEnc_writeDataStreamElement()
819 HANDLE_FDK_BITSTREAM hBitStream = NULL; in FDKaacEnc_writeExtensionData() local
824 hBitStream = transportEnc_GetBitstream(hTpEnc); in FDKaacEnc_writeExtensionData()
831 if (hBitStream != NULL) { in FDKaacEnc_writeExtensionData()
836 FDKwriteBits(hBitStream, extPayloadData[i], 8); in FDKaacEnc_writeExtensionData()
840 FDKwriteBits(hBitStream, extPayloadData[i] >> (8 - writeBits), in FDKaacEnc_writeExtensionData()
848 hBitStream, pExtension->type, pExtension->pPayload, payloadBits); in FDKaacEnc_writeExtensionData()
879 if (hBitStream != NULL) { in FDKaacEnc_writeExtensionData()
881 FDKwriteBits(hBitStream, ID_FIL, EL_ID_BITS); in FDKaacEnc_writeExtensionData()
883 FDKwriteBits(hBitStream, 15, FILL_EL_COUNT_BITS); in FDKaacEnc_writeExtensionData()
884 FDKwriteBits(hBitStream, esc_count, FILL_EL_ESC_COUNT_BITS); in FDKaacEnc_writeExtensionData()
886 FDKwriteBits(hBitStream, cnt, FILL_EL_COUNT_BITS); in FDKaacEnc_writeExtensionData()
895 hBitStream, pExtension->type, pExtension->pPayload, cnt); in FDKaacEnc_writeExtensionData()
913 static void FDKaacEnc_ByteAlignment(HANDLE_FDK_BITSTREAM hBitStream, in FDKaacEnc_ByteAlignment() argument
915 FDKwriteBits(hBitStream, 0, alignBits); in FDKaacEnc_ByteAlignment()
924 HANDLE_FDK_BITSTREAM hBitStream = NULL; in FDKaacEnc_ChannelElementWrite() local
933 hBitStream = transportEnc_GetBitstream(hTpEnc); in FDKaacEnc_ChannelElementWrite()
950 if (hBitStream != NULL) { in FDKaacEnc_ChannelElementWrite()
951 FDKwriteBits(hBitStream, pElInfo->elType, EL_ID_BITS); in FDKaacEnc_ChannelElementWrite()
1000 if (hBitStream != NULL) { in FDKaacEnc_ChannelElementWrite()
1001 FDKwriteBits(hBitStream, pElInfo->instanceTag, 4); in FDKaacEnc_ChannelElementWrite()
1009 if (hBitStream != NULL) { in FDKaacEnc_ChannelElementWrite()
1010 FDKwriteBits(hBitStream, psyOutElement->commonWindow, 1); in FDKaacEnc_ChannelElementWrite()
1020 chMaxSfbPerGrp, hBitStream, syntaxFlags); in FDKaacEnc_ChannelElementWrite()
1025 if (hBitStream != NULL) { in FDKaacEnc_ChannelElementWrite()
1026 FDKwriteBits(hBitStream, 0, 1); in FDKaacEnc_ChannelElementWrite()
1041 psyOutElement->toolsInfo.msMask, hBitStream); in FDKaacEnc_ChannelElementWrite()
1046 chGlobalGain, chFirstScf, hBitStream, psyOutChannel[ch]->mdctScale); in FDKaacEnc_ChannelElementWrite()
1051 pChSectionData, hBitStream, (syntaxFlags & AC_ER_VCB11) ? 1 : 0); in FDKaacEnc_ChannelElementWrite()
1052 if (hBitStream != NULL) { in FDKaacEnc_ChannelElementWrite()
1062 pChMaxValueInSfb, pChSectionData, pChScf, hBitStream, in FDKaacEnc_ChannelElementWrite()
1065 if ((hBitStream != NULL) && in FDKaacEnc_ChannelElementWrite()
1082 bitDemand += FDKaacEnc_encodePulseData(hBitStream); in FDKaacEnc_ChannelElementWrite()
1088 FDKaacEnc_encodeTnsDataPresent(pTnsInfo, chBlockType, hBitStream); in FDKaacEnc_ChannelElementWrite()
1092 bitDemand += FDKaacEnc_encodeTnsData(pTnsInfo, chBlockType, hBitStream); in FDKaacEnc_ChannelElementWrite()
1100 bitDemand += FDKaacEnc_encodeGainControlData(hBitStream); in FDKaacEnc_ChannelElementWrite()
1110 if (hBitStream != NULL) { in FDKaacEnc_ChannelElementWrite()
1115 qcOutChannel[ch]->quantSpec, hBitStream); in FDKaacEnc_ChannelElementWrite()