51 #define BITSTREAM_WRITER_LE
62 uint8_t **bytestream, uint32_t *palette)
69 bytestream_put_le16(bytestream, avctx->
width);
70 bytestream_put_le16(bytestream, avctx->
height);
72 bytestream_put_byte(bytestream, 0xf7);
73 bytestream_put_byte(bytestream, 0x1f);
74 bytestream_put_byte(bytestream, 0);
79 bytestream_put_be24(bytestream, v);
87 const uint8_t *buf,
int linesize)
94 bytestream_put_byte(bytestream, 0x2c);
95 bytestream_put_le16(bytestream, 0);
96 bytestream_put_le16(bytestream, 0);
97 bytestream_put_le16(bytestream, avctx->
width);
98 bytestream_put_le16(bytestream, avctx->
height);
99 bytestream_put_byte(bytestream, 0x00);
102 bytestream_put_byte(bytestream, 0x08);
117 bytestream_put_byte(bytestream, size);
118 if (end - *bytestream < size)
124 bytestream_put_byte(bytestream, 0x00);
125 bytestream_put_byte(bytestream, 0x3b);
151 const AVFrame *pict,
int *got_packet)
160 outbuf_ptr = pkt->
data;
This structure describes decoded (raw) audio or video data.
static int gif_image_write_image(AVCodecContext *avctx, uint8_t **bytestream, uint8_t *end, const uint8_t *buf, int linesize)
static int gif_encode_close(AVCodecContext *avctx)
int ff_lzw_encode(struct LZWEncodeState *s, const uint8_t *inbuf, int insize)
LZW main compress function.
void av_log(void *avcl, int level, const char *fmt,...) av_printf_format(3
Send the specified message to the log if the level is less than or equal to the current av_log_level...
packed RGB 3:3:2, 8bpp, (msb)2B 3G 3R(lsb)
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
void av_freep(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
const char * name
Name of the codec implementation.
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
int ff_lzw_encode_flush(struct LZWEncodeState *s, void(*lzw_flush_put_bits)(struct PutBitContext *))
packed RGB 1:2:1, 8bpp, (msb)1B 2G 1R(lsb)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static void put_bits(PutBitContext *s, int n, unsigned int value)
Write up to 31 bits into a bitstream.
Libavcodec external API header.
AVPixelFormat
Pixel format.
int flags
A combination of AV_PKT_FLAG values.
enum AVPictureType pict_type
Picture type of the frame.
#define FF_MIN_BUFFER_SIZE
minimum encoding buffer size Used to avoid some checks during header writing.
int width
picture width / height.
static int gif_image_write_header(AVCodecContext *avctx, uint8_t **bytestream, uint32_t *palette)
void * av_malloc(size_t size) av_malloc_attrib 1(1)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
int ff_alloc_packet(AVPacket *avpkt, int size)
Check AVPacket size and/or allocate data.
packed RGB 1:2:1, 8bpp, (msb)1R 2G 1B(lsb)
8 bit with PIX_FMT_RGB32 palette
main external API structure.
static void close(AVCodecParserContext *s)
static int gif_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet)
AVFrame * coded_frame
the picture in the bitstream
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
packed RGB 3:3:2, 8bpp, (msb)2R 3G 3B(lsb)
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))
common internal api header.
static void flush_put_bits(PutBitContext *s)
Pad the end of the output stream with zeros.
static av_cold int init(AVCodecParserContext *s)
static av_always_inline void bytestream_put_buffer(uint8_t **b, const uint8_t *src, unsigned int size)
static av_cold int gif_encode_init(AVCodecContext *avctx)
int key_frame
1 -> keyframe, 0-> not
const int ff_lzw_encode_state_size
This structure stores compressed data.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
void * av_mallocz(size_t size) av_malloc_attrib 1(1)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...