Go to the documentation of this file.
55 int buf_size,
void *logctx)
72 g->found_end &&
g->found_sig) {
94 g->gct_flag = !!(buf[
index] & 0x80);
95 g->gct_size = 3 * (1 << ((buf[
index] & 0x07) + 1));
97 if (
g->index >= 12 +
g->gct_flag *
g->gct_size) {
106 if (
g->found_start &&
g->found_end &&
g->found_sig) {
120 g->block_size = buf[
index];
128 g->block_size = buf[
index];
129 if (
g->index >=
g->block_size) {
131 if (!
g->block_size) {
142 if (
g->index >= 1 &&
g->index <= 2) {
143 g->delay |= buf[
index] << (8 * (
g->index - 1));
146 if (
g->index >=
g->block_size) {
147 g->block_size = buf[
index];
156 g->gct_flag = !!(buf[
index] & 0x80);
157 g->gct_size = 3 * (1 << ((buf[
index] & 0x07) + 1));
159 if (
g->index >= 10 +
g->gct_flag *
g->gct_size) {
174 const uint8_t **poutbuf,
int *poutbuf_size,
175 const uint8_t *buf,
int buf_size)
194 s->duration =
g->delay ?
g->delay : 10;
195 s->key_frame =
g->keyframe;
200 *poutbuf_size = buf_size;
static int gif_find_frame_end(GIFParseContext *g, const uint8_t *buf, int buf_size, void *logctx)
av_cold void ff_parse_close(AVCodecParserContext *s)
static int gif_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
#define GIF_GCE_EXT_LABEL
static const attribute_nonstring uint8_t gif89a_sig[6]
static av_cold void close(AVCodecParserContext *s)
const FFCodecParser ff_gif_parser
#define GIF_IMAGE_SEPARATOR
@ AV_PICTURE_TYPE_I
Intra.
static int parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
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 GIF_EXTENSION_INTRODUCER
#define PARSER_CODEC_LIST(...)
main external API structure.
@ AV_PICTURE_TYPE_P
Predicted.
static const attribute_nonstring uint8_t gif87a_sig[6]