Go to the documentation of this file.
31 #define TIMES256(idx) \
32 TIMES64(4 * (idx)) TIMES64(4 * (idx) + 1) TIMES64(4 * (idx) + 2) TIMES64(4 * (idx) + 3)
33 #define TIMES64(idx) \
34 TIMES16(4 * (idx)) TIMES16(4 * (idx) + 1) TIMES16(4 * (idx) + 2) TIMES16(4 * (idx) + 3)
35 #define TIMES16(idx) \
36 TIMES4(4 * (idx)) TIMES4(4 * (idx) + 1) TIMES4(4 * (idx) + 2) TIMES4(4 * (idx) + 3)
38 ENTRY(4 * (idx)) ENTRY(4 * (idx) + 1) ENTRY(4 * (idx) + 2) ENTRY(4 * (idx) + 3)
39 #define ENTRY(x) [x] = ((x) >= 'a' && (x) <= 'f') ? (x) - ('a' - 10) : \
40 ((x) >= 'A' && (x) <= 'F') ? (x) - ('A' - 10) : \
41 ((x) >= '0' && (x) <= '9') ? (x) - '0' : 255,
43 static const uint8_t lut[] = {
51 int keylen = strlen(
key);
52 const uint8_t *e = end - keylen;
55 if (!memcmp(p,
key, keylen))
65 if ((
const uint8_t *)eptr != p)
74 int ret, linesize,
i, j;
77 const uint8_t *end, *ptr = avpkt->
data;
97 next = memchr(ptr,
'{', avpkt->
size);
99 next = memchr(ptr,
'(', avpkt->
size);
104 linesize = (avctx->
width + 7) / 8;
107 for (j = 0; j < linesize; j++) {
110 while (ptr < end && *ptr !=
'x' && *ptr !=
'$')
132 "Unexpected data at %.8s.\n", ptr);
const FFCodec ff_xbm_decoder
This structure describes decoded (raw) audio or video data.
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.
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.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
static int parse_str_int(const uint8_t *p, const uint8_t *end, const uint8_t *key)
AVCodec p
The public AVCodec.
enum AVDiscard skip_frame
Skip decoding for selected frames.
static int get_nibble(uint8_t x)
static double val(void *priv, double ch)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define FF_CODEC_DECODE_CB(func)
#define CODEC_LONG_NAME(str)
@ AVDISCARD_ALL
discard all
static int xbm_decode_frame(AVCodecContext *avctx, AVFrame *p, int *got_frame, AVPacket *avpkt)
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
#define FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM
The decoder extracts and fills its parameters even if the frame is skipped due to the skip_frame sett...
#define i(width, name, range_min, range_max)
const char * name
Name of the codec implementation.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
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...
#define AVERROR_INVALIDDATA
Invalid data found when processing input.