gif.c File Reference
#include "avcodec.h"
#include "bytestream.h"
#include "lzw.h"
#include "put_bits.h"

Go to the source code of this file.

Data Structures

struct  GIFContext
 

Macros

#define BITSTREAM_WRITER_LE
 

Functions

static int gif_image_write_header (AVCodecContext *avctx, uint8_t **bytestream, uint32_t *palette)
 
static int gif_image_write_image (AVCodecContext *avctx, uint8_t **bytestream, uint8_t *end, const uint8_t *buf, int linesize)
 
static av_cold int gif_encode_init (AVCodecContext *avctx)
 
static int gif_encode_frame (AVCodecContext *avctx, unsigned char *outbuf, int buf_size, void *data)
 
static int gif_encode_close (AVCodecContext *avctx)
 

Variables

AVCodec ff_gif_encoder
 

Macro Definition Documentation

#define BITSTREAM_WRITER_LE

Definition at line 50 of file gif.c.

Function Documentation

static int gif_encode_close ( AVCodecContext avctx)
static

Definition at line 160 of file gif.c.

static int gif_encode_frame ( AVCodecContext avctx,
unsigned char *  outbuf,
int  buf_size,
void data 
)
static

Definition at line 144 of file gif.c.

static av_cold int gif_encode_init ( AVCodecContext avctx)
static

Definition at line 129 of file gif.c.

static int gif_image_write_header ( AVCodecContext avctx,
uint8_t **  bytestream,
uint32_t *  palette 
)
static

Definition at line 61 of file gif.c.

Referenced by gif_encode_frame().

static int gif_image_write_image ( AVCodecContext avctx,
uint8_t **  bytestream,
uint8_t *  end,
const uint8_t *  buf,
int  linesize 
)
static

Definition at line 85 of file gif.c.

Referenced by gif_encode_frame().

Variable Documentation

AVCodec ff_gif_encoder
Initial value:
= {
.name = "gif",
.id = CODEC_ID_GIF,
.priv_data_size = sizeof(GIFContext),
.encode = gif_encode_frame,
.long_name= NULL_IF_CONFIG_SMALL("GIF (Graphics Interchange Format)"),
}
static int gif_encode_close(AVCodecContext *avctx)
Definition: gif.c:160
packed RGB 3:3:2, 8bpp, (msb)2R 3G 3B(lsb)
Definition: pixfmt.h:86
static int init(AVCodecParserContext *s)
Definition: h264_parser.c:336
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:191
Definition: gif.c:54
static int gif_encode_frame(AVCodecContext *avctx, unsigned char *outbuf, int buf_size, void *data)
Definition: gif.c:144
packed RGB 1:2:1, 8bpp, (msb)1B 2G 1R(lsb)
Definition: pixfmt.h:85
packed RGB 1:2:1, 8bpp, (msb)1R 2G 1B(lsb)
Definition: pixfmt.h:88
static void close(AVCodecParserContext *s)
Definition: h264_parser.c:327
packed RGB 3:3:2, 8bpp, (msb)2B 3G 3R(lsb)
Definition: pixfmt.h:83
PixelFormat
Pixel format.
Definition: pixfmt.h:62
8 bit with PIX_FMT_RGB32 palette
Definition: pixfmt.h:75
static av_cold int gif_encode_init(AVCodecContext *avctx)
Definition: gif.c:129
Y , 8bpp.
Definition: pixfmt.h:72

Definition at line 169 of file gif.c.