36 }
else if (x >=
'a') {
39 }
else if (x >=
'A' && x <=
'F')
46 int keylen = strlen(key);
47 const uint8_t *e = end - keylen;
50 if (!memcmp(p, key, keylen))
59 int64_t
ret = strtol(p, &eptr, 10);
70 int ret, linesize,
i, j;
90 next = memchr(ptr,
'{', avpkt->
size);
92 next = memchr(ptr,
'(', avpkt->
size);
97 linesize = (avctx->
width + 7) / 8;
98 for (i = 0; i < avctx->
height; i++) {
100 for (j = 0; j < linesize; j++) {
103 while (ptr < end && *ptr !=
'x' && *ptr !=
'$')
107 if (ptr < end && (val =
get_nibble(*ptr)) <= 15) {
110 val = (val << 4) + nib;
114 if ((val =
get_nibble(*ptr)) <= 15 && j+1 < linesize) {
118 val = (val << 4) + nib;
125 "Unexpected data at %.8s.\n", ptr);
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
This structure describes decoded (raw) audio or video data.
ptrdiff_t const GLvoid * data
int ff_set_dimensions(AVCodecContext *s, int width, int height)
Check that the provided frame dimensions are valid and set them on the codec context.
const uint8_t ff_reverse[256]
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
static int xbm_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
#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. ...
const char * name
Name of the codec implementation.
enum AVPictureType pict_type
Picture type of the frame.
int width
picture width / height.
Libavcodec external API header.
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
main external API structure.
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
static int parse_str_int(const uint8_t *p, const uint8_t *end, const uint8_t *key)
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
common internal api header.
Y , 1bpp, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb...
static int get_nibble(uint8_t x)
int key_frame
1 -> keyframe, 0-> not
static double val(void *priv, double ch)
This structure stores compressed data.
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators...