38 const uint8_t *buf,
int buf_size)
42 const uint8_t *start, *end, *next;
50 for(start = buf, end = buf + buf_size; next < end; start = next){
54 size = next - start - 4;
57 if(size <= 0)
continue;
112 for(i=0; i<buf_size; i++){
113 state= (state<<8) | buf[i];
126 for(; i<buf_size; i++){
127 state= (state<<8) | buf[i];
142 const uint8_t **poutbuf,
int *poutbuf_size,
143 const uint8_t *buf,
int buf_size)
163 *poutbuf_size = buf_size;
168 const uint8_t *buf,
int buf_size)
174 for(i=0; i<buf_size; i++){
175 state= (state<<8) | buf[i];
int vc1_decode_entry_point(AVCodecContext *avctx, VC1Context *v, GetBitContext *gb)
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext *gb)
AV_WL32 AV_WL24 AV_WL16 AV_RB32
AVCodecParser ff_vc1_parser
static int vc1_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size)
Find the end of the current frame in the bitstream.
void ff_parse1_close(AVCodecParserContext *s)
int profile
Sequence header data for all Profiles TODO: choose between ints, uint8_ts and monobit flags...
bitstream reader API header.
static void vc1_extract_headers(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t *buf, int buf_size)
int slice_context_count
number of used thread_contexts
void av_free(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc(). ...
int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_size)
Combine the (truncated) bitstream to a complete frame.
int vc1_parse_frame_header(VC1Context *v, GetBitContext *gb)
#define IS_MARKER(state, i, buf, buf_size)
int ticks_per_frame
For some codecs, the time base is closer to the field rate than the frame rate.
static int vc1_split(AVCodecContext *avctx, const uint8_t *buf, int buf_size)
int ff_vc1_init_common(VC1Context *v)
Init VC-1 specific tables and VC1Context members.
main external API structure.
uint32_t state
contains the last few bytes in MSB order
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
#define FF_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding...
static int vc1_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
int vc1_decode_sequence_header(AVCodecContext *avctx, VC1Context *v, GetBitContext *gb)
Decode Simple/Main Profiles sequence header.
int pict_type
AV_PICTURE_TYPE_I, AV_PICTURE_TYPE_P, AV_PICTURE_TYPE_B, ...
struct AVCodecContext * avctx
#define PARSER_FLAG_COMPLETE_FRAMES
static int vc1_parse_init(AVCodecParserContext *s)
int parse_only
Context is used within parser.
static av_always_inline int vc1_unescape_buffer(const uint8_t *src, int size, uint8_t *dst)
int repeat_pict
This field is used for proper frame duration computation in lavf.
static av_always_inline const uint8_t * find_next_marker(const uint8_t *src, const uint8_t *end)
Find VC-1 marker in buffer.