Lines Matching refs: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;
93 /* allocate bitstream structure */
94 encvid->bitstream = (AVCEncBitstream*) avcHandle->CBAVC_Malloc(userData, sizeof(AVCEncBitstream), DEFAULT_ATTR);
95 if (encvid->bitstream == NULL)
99 encvid->bitstream->encvid = encvid; /* to point back for reallocation */
372 AVCEncBitstream *bitstream = encvid->bitstream;
386 BitstreamEncInit(bitstream, buffer, *buf_nal_size, NULL, 0);
387 BitstreamWriteBits(bitstream, 8, (1 << 5) | AVC_NALTYPE_SPS);
390 status = EncodeSPS(encvid, bitstream);
397 status = BitstreamTrailingBits(bitstream, buf_nal_size);
404 *buf_nal_size = bitstream->write_pos;
409 BitstreamEncInit(bitstream, buffer, *buf_nal_size, NULL, 0);
410 BitstreamWriteBits(bitstream, 8, (1 << 5) | AVC_NALTYPE_PPS);
413 status = EncodePPS(encvid, bitstream);
420 status = BitstreamTrailingBits(bitstream, buf_nal_size);
433 *buf_nal_size = bitstream->write_pos;
439 BitstreamEncInit(bitstream, buffer, *buf_nal_size, encvid->overrunBuffer, encvid->oBSize);
440 BitstreamWriteBits(bitstream
454 status = EncodeSliceHeader(encvid, bitstream);
465 BitstreamTrailingBits(bitstream, buf_nal_size);
467 *buf_nal_size = bitstream->write_pos;
524 AVCEncBitstream *bitstream = encvid->bitstream;
526 if (bitstream->overrunBuffer == bitstream->bitstreamBuffer) /* OB is used */
666 if (encvid->bitstream != NULL)
668 avcHandle->CBAVC_Free(userData, encvid->bitstream);