Go to the documentation of this file.
29 #define ANSI_MIN_READLINE 509
32 const AVFrame *p,
int *got_packet)
34 int i, j, l, commas,
ret,
size, linesize, lineout, rowsout;
38 linesize = lineout = (avctx->
width + 7) / 8;
39 commas = avctx->
height * linesize;
45 rowsout = (commas + lineout - 1) / lineout;
48 size = rowsout * (lineout * 6 + 1) + 106;
55 buf +=
snprintf(buf, 32,
"#define image_width %u\n", avctx->
width);
56 buf +=
snprintf(buf, 33,
"#define image_height %u\n", avctx->
height);
57 buf +=
snprintf(buf, 39,
"static unsigned char image_bits[] = {\n");
58 for (
i = 0, l = lineout;
i < avctx->
height;
i++) {
59 for (j = 0; j < linesize; j++) {
AVPixelFormat
Pixel format.
This structure describes decoded (raw) audio or video data.
#define ANSI_MIN_READLINE
const uint8_t ff_reverse[256]
@ AV_PIX_FMT_MONOWHITE
Y , 1bpp, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
AVCodec p
The public AVCodec.
#define FF_CODEC_ENCODE_CB(func)
#define AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE
This encoder can reorder user opaque values from input AVFrames and return them with corresponding ou...
#define CODEC_LONG_NAME(str)
static int xbm_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *p, int *got_packet)
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
const FFCodec ff_xbm_encoder
#define i(width, name, range_min, range_max)
const char * name
Name of the codec implementation.
main external API structure.
This structure stores compressed data.
int width
picture width / height.
int linesize[AV_NUM_DATA_POINTERS]
For video, a positive or negative value, which is typically indicating the size in bytes of each pict...
int ff_alloc_packet(AVCodecContext *avctx, AVPacket *avpkt, int64_t size)
Check AVPacket size and allocate data.