FFmpeg
Data Structures | Functions | Variables
xfacedec.c File Reference
#include "libavutil/pixdesc.h"
#include "avcodec.h"
#include "bytestream.h"
#include "internal.h"
#include "xface.h"

Go to the source code of this file.

Data Structures

struct  XFaceContext
 

Functions

static int pop_integer (BigInt *b, const ProbRange *pranges)
 
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 av_cold int xface_decode_init (AVCodecContext *avctx)
 
static int xface_decode_frame (AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
 

Variables

const AVCodec ff_xface_decoder
 

Detailed Description

X-Face decoder, based on libcompface, by James Ashton.

Definition in file xfacedec.c.

Function Documentation

◆ pop_integer()

static int pop_integer ( BigInt b,
const ProbRange pranges 
)
static

Definition at line 33 of file xfacedec.c.

Referenced by decode_block(), and pop_greys().

◆ pop_greys()

static void pop_greys ( BigInt b,
char *  bitmap,
int  w,
int  h 
)
static

Definition at line 51 of file xfacedec.c.

Referenced by decode_block().

◆ decode_block()

static void decode_block ( BigInt b,
char *  bitmap,
int  w,
int  h,
int  level 
)
static

Definition at line 69 of file xfacedec.c.

Referenced by xface_decode_frame().

◆ xface_decode_init()

static av_cold int xface_decode_init ( AVCodecContext avctx)
static

Definition at line 93 of file xfacedec.c.

◆ xface_decode_frame()

static int xface_decode_frame ( AVCodecContext avctx,
void *  data,
int got_frame,
AVPacket avpkt 
)
static

Definition at line 111 of file xfacedec.c.

Variable Documentation

◆ ff_xface_decoder

const AVCodec ff_xface_decoder
Initial value:
= {
.name = "xface",
.long_name = NULL_IF_CONFIG_SMALL("X-face image"),
.priv_data_size = sizeof(XFaceContext),
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}

Definition at line 179 of file xfacedec.c.

FF_CODEC_CAP_INIT_THREADSAFE
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
Definition: internal.h:42
AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:64
xface_decode_frame
static int xface_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: xfacedec.c:111
AV_PIX_FMT_MONOWHITE
@ AV_PIX_FMT_MONOWHITE
Y , 1bpp, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb.
Definition: pixfmt.h:75
init
static int init
Definition: av_tx.c:47
AV_CODEC_ID_XFACE
@ AV_CODEC_ID_XFACE
Definition: codec_id.h:261
decode
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:71
pix_fmts
static enum AVPixelFormat pix_fmts[]
Definition: libkvazaar.c:296
XFaceContext
Definition: xfacedec.c:89
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
AV_PIX_FMT_NONE
@ AV_PIX_FMT_NONE
Definition: pixfmt.h:65
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
xface_decode_init
static av_cold int xface_decode_init(AVCodecContext *avctx)
Definition: xfacedec.c:93