Go to the documentation of this file.
37 #define UNESCAPED_THRESHOLD 37
43 #define UNESCAPED_LIMIT 144
63 const uint8_t *buf,
int buf_size)
104 s->repeat_pict = vpc->
v.
rptfrm * 2 + 1;
129 const uint8_t **poutbuf,
int *poutbuf_size,
130 const uint8_t *buf,
int buf_size)
140 int start_code_found = 0;
144 if (pic_found && buf_size == 0) {
150 while (
i < buf_size) {
152 start_code_found = 0;
155 unesc_buffer[unesc_index++] =
b;
157 search_state =
b ?
NO_MATCH : search_state + 1;
170 start_code_found = 1;
185 while (
i < buf_size) {
202 start_code_found = 1;
208 if (start_code_found) {
254 *poutbuf_size = buf_size;
VC1ParseSearchState search_state
int interlace
Progressive/interlaced (RPTFTM syntax element)
void ff_parse_close(AVCodecParserContext *s)
struct AVCodecContext * avctx
int ff_vc1_parse_frame_header(VC1Context *v, GetBitContext *gb)
@ AV_FIELD_TT
Top coded_first, top displayed first.
int pict_type
AV_PICTURE_TYPE_I, AV_PICTURE_TYPE_P, AV_PICTURE_TYPE_B, ...
const AVCodecParser ff_vc1_parser
int first_pic_header_flag
int ff_vc1_decode_sequence_header(AVCodecContext *avctx, VC1Context *v, GetBitContext *gb)
Decode Simple/Main Profiles sequence header.
static int init_get_bits8(GetBitContext *s, const uint8_t *buffer, int byte_size)
Initialize GetBitContext.
static av_cold int vc1_parse_init(AVCodecParserContext *s)
uint8_t unesc_buffer[UNESCAPED_LIMIT]
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
#define UNESCAPED_LIMIT
The maximum number of bytes of a sequence, entry point or frame header which must be valid memory (be...
static int vc1_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
int slice_context_count
number of used thread_contexts
av_cold void ff_vc1dsp_init(VC1DSPContext *dsp)
int parse_only
Context is used within parser.
int chromaformat
2 bits, 2=4:2:0, only defined
int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_size)
Combine the (truncated) bitstream to a complete frame.
int(* startcode_find_candidate)(const uint8_t *buf, int size)
Search buf from the start for up to size bytes.
#define PARSER_FLAG_COMPLETE_FRAMES
#define i(width, name, range_min, range_max)
@ AV_FIELD_BB
Bottom coded first, bottom displayed first.
int ff_vc1_decode_entry_point(AVCodecContext *avctx, VC1Context *v, GetBitContext *gb)
#define av_assert1(cond)
assert() equivalent, that does not lie in speed critical code.
int ff_vc1_parse_frame_header_adv(VC1Context *v, GetBitContext *gb)
#define UNESCAPED_THRESHOLD
The maximum number of bytes of a sequence, entry point or frame header whose values we pay any attent...
main external API structure.
@ AV_PICTURE_TYPE_B
Bi-dir predicted.
int profile
Sequence header data for all Profiles TODO: choose between ints, uint8_ts and monobit flags.
int coded_width
Bitstream width / height, may be different from width/height e.g.
int psf
Progressive Segmented Frame.
int broadcast
TFF/RFF present.
@ AV_PICTURE_TYPE_BI
BI type.
int width
picture width / height.
static void vc1_extract_header(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t *buf, int buf_size)