FFmpeg
Data Structures | Functions | Variables
xfacedec.c File Reference
#include "libavutil/pixdesc.h"
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.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, AVFrame *frame, int *got_frame, AVPacket *avpkt)
 

Variables

const FFCodec 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 34 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 52 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 70 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 94 of file xfacedec.c.

◆ xface_decode_frame()

static int xface_decode_frame ( AVCodecContext avctx,
AVFrame frame,
int got_frame,
AVPacket avpkt 
)
static

Definition at line 112 of file xfacedec.c.

Variable Documentation

◆ ff_xface_decoder

const FFCodec ff_xface_decoder
Initial value:
= {
.p.name = "xface",
.p.long_name = NULL_IF_CONFIG_SMALL("X-face image"),
.p.type = AVMEDIA_TYPE_VIDEO,
.p.capabilities = AV_CODEC_CAP_DR1,
.priv_data_size = sizeof(XFaceContext),
.p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_MONOWHITE, AV_PIX_FMT_NONE },
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}

Definition at line 178 of file xfacedec.c.

AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:64
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
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:254
XFaceContext
Definition: xfacedec.c:90
AV_CODEC_CAP_DR1
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition: codec.h:52
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
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: codec_internal.h:31
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:94
xface_decode_frame
static int xface_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
Definition: xfacedec.c:112