Go to the documentation of this file.
28 #define ANSI_MIN_READLINE 509
31 const AVFrame *p,
int *got_packet)
33 int i, j, l, commas,
ret,
size, linesize, lineout, rowsout;
36 linesize = lineout = (avctx->
width + 7) / 8;
37 commas = avctx->
height * linesize;
43 rowsout = (commas + lineout - 1) / lineout;
46 size = rowsout * (lineout * 6 + 1) + 106;
53 buf +=
snprintf(buf, 32,
"#define image_width %u\n", avctx->
width);
54 buf +=
snprintf(buf, 33,
"#define image_height %u\n", avctx->
height);
55 buf +=
snprintf(buf, 39,
"static unsigned char image_bits[] = {\n");
56 for (
i = 0, l = lineout;
i < avctx->
height;
i++) {
57 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.
static int xbm_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *p, int *got_packet)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
const AVCodec 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.