61 if (
w & 1) bitmap[0] = 1;
62 if (
w & 2) bitmap[1] = 1;
97 "Size value %dx%d not supported, only accepts a size of %dx%d\n",
123 for (
i = 0, k = 0;
i < avpkt->
size && avpkt->
data[
i];
i++) {
132 "Buffer is longer than expected, truncating at byte %d\n",
i);
155 buf =
frame->data[0];
167 buf +=
frame->linesize[0];
const FFCodec ff_xface_decoder
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
#define i(width, name, range_min, range_max)
#define FF_CODEC_DECODE_CB(func)
#define CODEC_LONG_NAME(str)
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
int(* init)(AVBSFContext *ctx)
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
#define AV_LOG_WARNING
Something somehow does not look correct.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
@ AV_PIX_FMT_MONOWHITE
Y , 1bpp, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb.
main external API structure.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
int width
picture width / height.
This structure describes decoded (raw) audio or video data.
This structure stores compressed data.
uint8_t bitmap[XFACE_PIXELS]
image used internally for decoding
void ff_xface_generate_face(uint8_t *dst, uint8_t *const src)
const ProbRange ff_xface_probranges_per_level[4][3]
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.
void ff_big_add(BigInt *b, uint8_t a)
Add a to b storing the result in b.
void ff_big_mul(BigInt *b, uint8_t a)
Multiply a by b storing the result in b.
const ProbRange ff_xface_probranges_2x2[16]
X-Face common definitions.
#define XFACE_FIRST_PRINT
static int xface_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
static void pop_greys(BigInt *b, char *bitmap, int w, int h)
static void decode_block(BigInt *b, char *bitmap, int w, int h, int level)
static int pop_integer(BigInt *b, const ProbRange *pranges)
static av_cold int xface_decode_init(AVCodecContext *avctx)