44 #include "libavutil/avassert.h"
49 #include "libavutil/mem.h"
75 const AVFrame *p,
int *got_packet)
90 zret = deflateReset(&c->
zstream);
98 for(i = avctx->
height - 1; i >= 0; i--) {
101 zret = deflate(&c->
zstream, Z_NO_FLUSH);
107 zret = deflate(&c->
zstream, Z_FINISH);
108 if (zret != Z_STREAM_END) {
int ff_alloc_packet2(AVCodecContext *avctx, AVPacket *avpkt, int64_t size)
Check AVPacket size and/or allocate data.
This structure describes decoded (raw) audio or video data.
static av_cold int init(AVCodecContext *avctx)
static av_cold int encode_end(AVCodecContext *avctx)
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...
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
static av_cold int encode_init(AVCodecContext *avctx)
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
void av_freep(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
packed RGB 8:8:8, 24bpp, BGRBGR...
const char * name
Name of the codec implementation.
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
#define FF_COMPRESSION_DEFAULT
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Libavcodec external API header.
AVPixelFormat
Pixel format.
int flags
A combination of AV_PKT_FLAG values.
common internal API header
#define FF_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding...
int width
picture width / height.
int AC3_NAME() encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
main external API structure.
static void close(AVCodecParserContext *s)
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
common internal api header.
#define av_assert0(cond)
assert() equivalent, that is always enabled.
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 ...