FFmpeg
|
libavcodec/gif.c File Reference
GIF encoder. More...
#include "libavutil/opt.h"
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "bytestream.h"
#include "internal.h"
#include "lzw.h"
#include "gif.h"
#include "put_bits.h"
Include dependency graph for libavcodec/gif.c:
Go to the source code of this file.
Data Structures | |
struct | GIFContext |
Macros | |
#define | BITSTREAM_WRITER_LE |
#define | OFFSET(x) offsetof(GIFContext, x) |
#define | FLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM |
Enumerations | |
enum | { GF_OFFSETTING = 1<<0, GF_TRANSDIFF = 1<<1 } |
Functions | |
static int | pick_palette_entry (const uint8_t *buf, int linesize, int w, int h) |
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) |
static av_cold int | gif_encode_init (AVCodecContext *avctx) |
static int | gif_encode_frame (AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet) |
static int | gif_encode_close (AVCodecContext *avctx) |
Variables | |
static const AVOption | gif_options [] |
static const AVClass | gif_class |
AVCodec | ff_gif_encoder |
Detailed Description
GIF encoder.
Definition in file libavcodec/gif.c.
Macro Definition Documentation
#define BITSTREAM_WRITER_LE |
Definition at line 39 of file libavcodec/gif.c.
#define FLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM |
Definition at line 290 of file libavcodec/gif.c.
#define OFFSET | ( | x | ) | offsetof(GIFContext, x) |
Definition at line 289 of file libavcodec/gif.c.
Enumeration Type Documentation
anonymous enum |
Enumerator | |
---|---|
GF_OFFSETTING | |
GF_TRANSDIFF |
Definition at line 53 of file libavcodec/gif.c.
Function Documentation
|
static |
Definition at line 278 of file libavcodec/gif.c.
|
static |
Definition at line 233 of file libavcodec/gif.c.
|
static |
Definition at line 211 of file libavcodec/gif.c.
|
static |
Definition at line 74 of file libavcodec/gif.c.
Referenced by gif_encode_frame().
|
static |
Definition at line 58 of file libavcodec/gif.c.
Referenced by gif_image_write_image().
Variable Documentation
AVCodec ff_gif_encoder |
Initial value:
= {
.name = "gif",
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_GIF,
.priv_data_size = sizeof(GIFContext),
.init = gif_encode_init,
.encode2 = gif_encode_frame,
},
.long_name = NULL_IF_CONFIG_SMALL("GIF (Graphics Interchange Format)"),
.priv_class = &gif_class,
}
Definition: pixfmt.h:67
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: libavutil/internal.h:123
Definition: libavcodec/gif.c:42
static int gif_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet)
Definition: libavcodec/gif.c:233
static av_cold int gif_encode_init(AVCodecContext *avctx)
Definition: libavcodec/gif.c:211
Definition: avutil.h:143
Definition: libavcodec/avcodec.h:200
Definition at line 305 of file libavcodec/gif.c.
|
static |
Initial value:
= {
.class_name = "GIF encoder",
.item_name = av_default_item_name,
.option = gif_options,
.version = LIBAVUTIL_VERSION_INT,
}
Definition at line 298 of file libavcodec/gif.c.
|
static |
Initial value:
= {
{ "gifflags", "set GIF flags", OFFSET(flags), AV_OPT_TYPE_FLAGS, {.i64 = GF_OFFSETTING|GF_TRANSDIFF}, 0, INT_MAX, FLAGS, "flags" },
{ "offsetting", "enable picture offsetting", 0, AV_OPT_TYPE_CONST, {.i64=GF_OFFSETTING}, INT_MIN, INT_MAX, FLAGS, "flags" },
{ "transdiff", "enable transparency detection between frames", 0, AV_OPT_TYPE_CONST, {.i64=GF_TRANSDIFF}, INT_MIN, INT_MAX, FLAGS, "flags" },
{ NULL }
}
Definition: libavcodec/gif.c:54
Definition: opt.h:221
Definition: opt.h:229
Definition: libavcodec/gif.c:55
Definition at line 291 of file libavcodec/gif.c.
Generated on Fri Dec 20 2024 06:56:12 for FFmpeg by 1.8.11