28 #define ALIAS_HEADER_SIZE 10
50 if (width > 65535 || height > 65535 ||
76 bytestream_put_be16(&buf, width);
77 bytestream_put_be16(&buf, height);
78 bytestream_put_be32(&buf, 0);
79 bytestream_put_be16(&buf, bits_pixel);
81 for (j = 0; j <
height; j++) {
83 for (i = 0; i <
width; ) {
89 while (count < 255 && count + i < width && pixel == *in_buf) {
93 bytestream_put_byte(&buf, count);
94 bytestream_put_byte(&buf, pixel);
97 while (count < 255 && count + i < width &&
102 bytestream_put_byte(&buf, count);
103 bytestream_put_be24(&buf, pixel);
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
This structure describes decoded (raw) audio or video data.
void av_shrink_packet(AVPacket *pkt, int size)
Reduce packet size, correctly zeroing padding.
AVFrame * coded_frame
the picture in the bitstream
static av_cold int encode_close(AVCodecContext *avctx)
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
#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. ...
#define ALIAS_HEADER_SIZE
const char * name
Name of the codec implementation.
Libavcodec external API header.
int flags
A combination of AV_PKT_FLAG values.
enum AVPictureType pict_type
Picture type of the frame.
int width
picture width / height.
int ff_alloc_packet(AVPacket *avpkt, int size)
packed RGB 8:8:8, 24bpp, BGRBGR...
AVCodec ff_alias_pix_encoder
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_WB32 unsigned int_TMPL AV_RB24
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
main external API structure.
BYTE int const BYTE int int int height
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
common internal api header.
int key_frame
1 -> keyframe, 0-> not
static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
AVPixelFormat
Pixel format.
This structure stores compressed data.
static av_cold int encode_init(AVCodecContext *avctx)