Go to the documentation of this file.
67 return *bitmap || *(bitmap + 1) ||
144 int i, j, k,
ret = 0;
152 "Size value %dx%d not supported, only accepts a size of %dx%d\n",
164 for (k = 0; k < 8; k++)
165 xface->
bitmap[
i++] = (buf[j]>>(7-k))&1;
AVPixelFormat
Pixel format.
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
ProbRange prob_ranges[XFACE_PIXELS *2]
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.
This structure describes decoded (raw) audio or video data.
@ 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 xface_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
static int pq_push(ProbRangesQueue *pq, const ProbRange *p)
AVCodec p
The public AVCodec.
static double val(void *priv, double ch)
#define FF_CODEC_ENCODE_CB(func)
void ff_big_add(BigInt *b, uint8_t a)
Add a to b storing the result in b.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE
This encoder can reorder user opaque values from input AVFrames and return them with corresponding ou...
#define av_assert0(cond)
assert() equivalent, that is always enabled.
#define CODEC_LONG_NAME(str)
static int all_black(char *bitmap, int w, int h)
static int all_same(char *bitmap, int w, int h)
Describe the class of an AVClass context structure.
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
int set_header
set X-Face header in the output
#define i(width, name, range_min, range_max)
#define XFACE_FIRST_PRINT
const char * name
Name of the codec implementation.
int max_line_len
max line length for compressed data
const FFCodec ff_xface_encoder
const ProbRange ff_xface_probranges_2x2[16]
static void encode_block(char *bitmap, int w, int h, int level, ProbRangesQueue *pq)
main external API structure.
int ff_get_encode_buffer(AVCodecContext *avctx, AVPacket *avpkt, int64_t size, int flags)
Get a buffer for a packet.
const ProbRange ff_xface_probranges_per_level[4][3]
static void push_integer(BigInt *b, const ProbRange *prange)
This structure stores compressed data.
int width
picture width / height.
uint8_t bitmap[XFACE_PIXELS]
image used internally for decoding
int linesize[AV_NUM_DATA_POINTERS]
For video, a positive or negative value, which is typically indicating the size in bytes of each pict...
void ff_xface_generate_face(uint8_t *dst, uint8_t *const src)
static int all_white(char *bitmap, int w, int h)
static void push_greys(ProbRangesQueue *pq, char *bitmap, int w, int h)
void ff_big_mul(BigInt *b, uint8_t a)
Multiply a by b storing the result in b.