62 if (w & 1) bitmap[0] = 1;
63 if (w & 2) bitmap[1] = 1;
84 decode_block(b, bitmap + w + h * XFACE_WIDTH, w, h, level);
98 "Size value %dx%d not supported, only accepts a size of %dx%d\n",
112 void *
data,
int *got_frame,
126 for (i = 0, k = 0; avpkt->
data[i] && i < avpkt->
size; i++) {
135 "Buffer is longer than expected, truncating at byte %d\n", i);
158 buf = frame->
data[0];
159 for (i = 0, j = 0, k = 0, byte = 0; i <
XFACE_PIXELS; i++) {
static int pop_integer(BigInt *b, const ProbRange *pranges)
static av_cold int xface_decode_init(AVCodecContext *avctx)
This structure describes decoded (raw) audio or video data.
ptrdiff_t const GLvoid * data
#define AV_LOG_WARNING
Something somehow does not look correct.
static av_cold int init(AVCodecContext *avctx)
static void decode_block(BigInt *b, char *bitmap, int w, int h, int level)
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
const ProbRange ff_xface_probranges_per_level[4][3]
X-Face common definitions.
void ff_xface_generate_face(uint8_t *dst, uint8_t *const src)
void ff_big_mul(BigInt *b, uint8_t a)
Multiply a by b storing the result in b.
static int xface_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. ...
void ff_big_add(BigInt *b, uint8_t a)
Add a to b storing the result in b.
const ProbRange ff_xface_probranges_2x2[16]
const char * name
Name of the codec implementation.
static const uint8_t offset[127][2]
int width
picture width / height.
void ff_big_div(BigInt *b, uint8_t a, uint8_t *r)
Divide b by a storing the result in b and the remainder in the word pointed to by r...
uint8_t bitmap[XFACE_PIXELS]
image used internally for decoding
#define XFACE_FIRST_PRINT
Libavcodec external API header.
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_WB24 unsigned int_TMPL AV_WB16 unsigned int_TMPL byte
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 void pop_greys(BigInt *b, char *bitmap, int w, int h)
static enum AVPixelFormat pix_fmts[]
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 decode(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *pkt)
AVPixelFormat
Pixel format.
This structure stores compressed data.