Home | History | Annotate | Download | only in src

Lines Matching defs:bitstream

24 /*  Purpose  : Sniff NAL type from the bitstream                            */
29 OSCL_EXPORT_REF AVCEnc_Status PVAVCEncGetNALType(unsigned char *bitstream, int size,
35 forbidden_zero_bit = bitstream[0] >> 7;
38 *nal_ref_idc = (bitstream[0] & 0x60) >> 5;
39 *nal_type = bitstream[0] & 0x1F;
95 /* allocate bitstream structure */
96 encvid->bitstream = (AVCEncBitstream*) avcHandle->CBAVC_Malloc(userData, sizeof(AVCEncBitstream), DEFAULT_ATTR);
97 if (encvid->bitstream == NULL)
101 encvid->bitstream->encvid = encvid; /* to point back for reallocation */
380 AVCEncBitstream *bitstream = encvid->bitstream;
394 BitstreamEncInit(bitstream, buffer, *buf_nal_size, NULL, 0);
395 BitstreamWriteBits(bitstream, 8, (1 << 5) | AVC_NALTYPE_SPS);
398 status = EncodeSPS(encvid, bitstream);
405 status = BitstreamTrailingBits(bitstream, buf_nal_size);
412 *buf_nal_size = bitstream->write_pos;
417 BitstreamEncInit(bitstream, buffer, *buf_nal_size, NULL, 0);
418 BitstreamWriteBits(bitstream, 8, (1 << 5) | AVC_NALTYPE_PPS);
421 status = EncodePPS(encvid, bitstream);
428 status = BitstreamTrailingBits(bitstream, buf_nal_size);
441 *buf_nal_size = bitstream->write_pos;
447 BitstreamEncInit(bitstream, buffer, *buf_nal_size, encvid->overrunBuffer, encvid->oBSize);
448 BitstreamWriteBits(bitstream, 8, (video->nal_ref_idc << 5) | (video->nal_unit_type));
462 status = EncodeSliceHeader(encvid, bitstream);
473 BitstreamTrailingBits(bitstream, buf_nal_size);
475 *buf_nal_size = bitstream->write_pos;
532 AVCEncBitstream *bitstream = encvid->bitstream;
534 if (bitstream->overrunBuffer == bitstream->bitstreamBuffer) /* OB is used */
674 if (encvid->bitstream != NULL)
676 avcHandle->CBAVC_Free(userData, (int)encvid->bitstream);