35 #define UNESCAPED_THRESHOLD 37 41 #define UNESCAPED_LIMIT 144 61 const uint8_t *buf,
int buf_size)
115 const uint8_t **poutbuf,
int *poutbuf_size,
116 const uint8_t *buf,
int buf_size)
126 int start_code_found = 0;
130 if (pic_found && buf_size == 0) {
136 while (i < buf_size) {
138 start_code_found = 0;
141 unesc_buffer[unesc_index++] =
b;
143 search_state = b ?
NO_MATCH : search_state + 1;
156 start_code_found = 1;
171 while (i < buf_size) {
188 start_code_found = 1;
194 if (start_code_found) {
236 if (next < 0 && start_code_found)
240 *poutbuf_size = buf_size;
245 const uint8_t *buf,
int buf_size)
251 for(i=0; i<buf_size; i++){
252 state= (state<<8) | buf[i];
#define UNESCAPED_LIMIT
The maximum number of bytes of a sequence, entry point or frame header which must be valid memory (be...
AVCodecParser ff_vc1_parser
int broadcast
TFF/RFF present.
enum AVFieldOrder field_order
int(* startcode_find_candidate)(const uint8_t *buf, int size)
Search buf from the start for up to size bytes.
Macro definitions for various function/variable attributes.
av_cold int ff_vc1_init_common(VC1Context *v)
Init VC-1 specific tables and VC1Context members.
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.
int slice_context_count
number of used thread_contexts
int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_size)
Combine the (truncated) bitstream to a complete frame.
#define IS_MARKER(state, i, buf, buf_size)
static char * split(char *message, char delim)
static void vc1_extract_header(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t *buf, int buf_size)
int ff_vc1_parse_frame_header_adv(VC1Context *v, GetBitContext *gb)
void ff_parse_close(AVCodecParserContext *s)
#define UNESCAPED_THRESHOLD
The maximum number of bytes of a sequence, entry point or frame header whose values we pay any attent...
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)
VC1ParseSearchState search_state
main external API structure.
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)
#define PARSER_FLAG_COMPLETE_FRAMES
int ff_vc1_decode_entry_point(AVCodecContext *avctx, VC1Context *v, GetBitContext *gb)
int parse_only
Context is used within parser.
int repeat_pict
This field is used for proper frame duration computation in lavf.
uint8_t unesc_buffer[UNESCAPED_LIMIT]