FFmpeg
Data Structures | Functions | Variables
xfacedec.c File Reference
#include "avcodec.h"
#include "codec_internal.h"
#include "decode.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 32 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 50 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 68 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 92 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 110 of file xfacedec.c.

Variable Documentation

◆ ff_xface_decoder

const FFCodec ff_xface_decoder
Initial value:
= {
.p.name = "xface",
CODEC_LONG_NAME("X-face image"),
.p.type = AVMEDIA_TYPE_VIDEO,
.p.capabilities = AV_CODEC_CAP_DR1,
.priv_data_size = sizeof(XFaceContext),
}

Definition at line 176 of file xfacedec.c.

AV_CODEC_ID_XFACE
@ AV_CODEC_ID_XFACE
Definition: codec_id.h:262
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:287
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:272
XFaceContext
Definition: xfacedec.c:88
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:365
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
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:92
xface_decode_frame
static int xface_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
Definition: xfacedec.c:110