FFmpeg
|
libavcodec/gif.c
Go to the documentation of this file.
242 if ((ret = ff_alloc_packet2(avctx, pkt, avctx->width*avctx->height*7/5 + FF_MIN_BUFFER_SIZE)) < 0)
292 { "gifflags", "set GIF flags", OFFSET(flags), AV_OPT_TYPE_FLAGS, {.i64 = GF_OFFSETTING|GF_TRANSDIFF}, 0, INT_MAX, FLAGS, "flags" },
293 { "offsetting", "enable picture offsetting", 0, AV_OPT_TYPE_CONST, {.i64=GF_OFFSETTING}, INT_MIN, INT_MAX, FLAGS, "flags" },
294 { "transdiff", "enable transparency detection between frames", 0, AV_OPT_TYPE_CONST, {.i64=GF_TRANSDIFF}, INT_MIN, INT_MAX, FLAGS, "flags" },
Definition: frame.h:76
Definition: pixfmt.h:67
int ff_lzw_encode(struct LZWEncodeState *s, const uint8_t *inbuf, int insize)
Definition: lzwenc.c:226
Definition: libavcodec/gif.c:54
Definition: libavcodec/avcodec.h:2854
Definition: opt.h:221
Definition: opt.h:229
Definition: libavcodec/gif.c:55
static int gif_image_write_image(AVCodecContext *avctx, uint8_t **bytestream, uint8_t *end, const uint32_t *palette, const uint8_t *buf, const int linesize, AVPacket *pkt)
Definition: libavcodec/gif.c:74
int ff_lzw_encode_flush(struct LZWEncodeState *s, void(*lzw_flush_put_bits)(struct PutBitContext *))
Definition: libavcodec/avcodec.h:918
Definition: libavcodec/gif.c:42
int avpriv_set_systematic_pal2(uint32_t pal[256], enum AVPixelFormat pix_fmt)
Definition: imgutils.c:150
Definition: lzw.h:38
static int pick_palette_entry(const uint8_t *buf, int linesize, int w, int h)
Definition: libavcodec/gif.c:58
int ff_alloc_packet2(AVCodecContext *avctx, AVPacket *avpkt, int size)
Definition: libavcodec/utils.c:1377
Definition: libavcodec/avcodec.h:1134
static int gif_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet)
Definition: libavcodec/gif.c:233
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFilterBuffer structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later.That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another.Buffer references ownership and permissions
LZW decoding routines.
void ff_lzw_encode_init(struct LZWEncodeState *s, uint8_t *outbuf, int outsize, int maxbits, enum FF_LZW_MODES mode, void(*lzw_put_bits)(struct PutBitContext *, int, unsigned int))
static av_always_inline void bytestream_put_buffer(uint8_t **b, const uint8_t *src, unsigned int size)
Definition: bytestream.h:337
static av_cold int gif_encode_init(AVCodecContext *avctx)
Definition: libavcodec/gif.c:211
Definition: avutil.h:143
Definition: libavcodec/avcodec.h:200
uint8_t * av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type, int size)
Definition: avpacket.c:264
Definition: libavcodec/avcodec.h:1028
Generated on Tue Sep 2 2025 06:55:54 for FFmpeg by
