51 #define BITSTREAM_WRITER_LE
63 uint8_t **bytestream, uint32_t *palette)
70 bytestream_put_le16(bytestream, avctx->
width);
71 bytestream_put_le16(bytestream, avctx->
height);
73 bytestream_put_byte(bytestream, 0xf7);
74 bytestream_put_byte(bytestream, 0x1f);
75 bytestream_put_byte(bytestream, 0);
80 bytestream_put_be24(bytestream, v);
88 const uint8_t *buf,
int linesize)
95 bytestream_put_byte(bytestream, 0x2c);
96 bytestream_put_le16(bytestream, 0);
97 bytestream_put_le16(bytestream, 0);
98 bytestream_put_le16(bytestream, avctx->
width);
99 bytestream_put_le16(bytestream, avctx->
height);
100 bytestream_put_byte(bytestream, 0x00);
103 bytestream_put_byte(bytestream, 0x08);
118 bytestream_put_byte(bytestream, size);
119 if (end - *bytestream < size)
125 bytestream_put_byte(bytestream, 0x00);
126 bytestream_put_byte(bytestream, 0x3b);
146 const AVFrame *pict,
int *got_packet)
157 outbuf_ptr = pkt->
data;
void * av_malloc(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
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)
AVFrame * coded_frame
the picture in the bitstream
#define FF_MIN_BUFFER_SIZE
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_freep(void *arg)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
packed RGB 1:2:1, 8bpp, (msb)1B 2G 1R(lsb)
8 bit with PIX_FMT_RGB32 palette
static int init(AVCodecParserContext *s)
int ff_lzw_encode_flush(struct LZWEncodeState *s, void(*lzw_flush_put_bits)(struct PutBitContext *))
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
void av_log(void *avcl, int level, const char *fmt,...)
const char * name
Name of the codec implementation.
static void put_bits(PutBitContext *s, int n, unsigned int value)
Write up to 31 bits into a bitstream.
int flags
A combination of AV_PKT_FLAG values.
enum AVPictureType pict_type
Picture type of the frame, see ?_TYPE below.
packed RGB 1:2:1, 8bpp, (msb)1R 2G 1B(lsb)
int width
picture width / height.
static int gif_image_write_header(AVCodecContext *avctx, uint8_t **bytestream, uint32_t *palette)
int ff_alloc_packet(AVPacket *avpkt, int size)
Check AVPacket size and/or allocate data.
packed RGB 3:3:2, 8bpp, (msb)2B 3G 3R(lsb)
int linesize[AV_NUM_DATA_POINTERS]
Size, in bytes, of the data for each picture/channel plane.
main external API structure.
static void close(AVCodecParserContext *s)
static int gif_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet)
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
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.
packed RGB 3:3:2, 8bpp, (msb)2R 3G 3B(lsb)
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
AVPixelFormat
Pixel format.
This structure stores compressed data.
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...