28 #include "libavutil/attributes.h"
52 for(start = buf, end = buf + buf_size; next <
end; start = next){
57 size = next - start - 4;
60 if(size <= 0)
continue;
123 for(i=0; i<buf_size; i++){
124 state= (state<<8) | buf[i];
137 for(; i<buf_size; i++){
138 state= (state<<8) | buf[i];
153 const uint8_t **poutbuf,
int *poutbuf_size,
174 *poutbuf_size = buf_size;
185 for(i=0; i<buf_size; i++){
186 state= (state<<8) | buf[i];
AVCodecParser ff_vc1_parser
int broadcast
TFF/RFF present.
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.
enum AVFieldOrder field_order
int first_pic_header_flag
av_cold int ff_vc1_init_common(VC1Context *v)
Init VC-1 specific tables and VC1Context members.
static av_cold int end(AVCodecContext *avctx)
int interlace
Progressive/interlaced (RPTFTM syntax element)
int profile
Sequence header data for all Profiles TODO: choose between ints, uint8_ts and monobit flags...
bitstream reader API header.
int ff_vc1_decode_sequence_header(AVCodecContext *avctx, VC1Context *v, GetBitContext *gb)
Decode Simple/Main Profiles sequence header.
int psf
Progressive Segmented Frame.
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.
#define PARSER_FLAG_COMPLETE_FRAMES
#define IS_MARKER(state, i, buf, buf_size)
static char * split(char *message, char delim)
int ff_vc1_parse_frame_header_adv(VC1Context *v, GetBitContext *gb)
void ff_parse_close(AVCodecParserContext *s)
#define FF_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding...
int ff_vc1_parse_frame_header(VC1Context *v, GetBitContext *gb)
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)
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.
static int vc1_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
int pict_type
AV_PICTURE_TYPE_I, AV_PICTURE_TYPE_P, AV_PICTURE_TYPE_B, ...
struct AVCodecContext * avctx
static av_cold int vc1_parse_init(AVCodecParserContext *s)
int ff_vc1_decode_entry_point(AVCodecContext *avctx, VC1Context *v, GetBitContext *gb)
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.
void * av_mallocz(size_t size) av_malloc_attrib 1(1)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...