FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions | Variables
xfaceenc.c File Reference

X-Face encoder, based on libcompface, by James Ashton. More...

#include "xface.h"
#include "avcodec.h"
#include "internal.h"
#include "libavutil/avassert.h"

Go to the source code of this file.

Data Structures

struct  XFaceContext
 
struct  ProbRangesQueue
 

Functions

static int all_same (char *bitmap, int w, int h)
 
static int all_black (char *bitmap, int w, int h)
 
static int all_white (char *bitmap, int w, int h)
 
static int pq_push (ProbRangesQueue *pq, const ProbRange *p)
 
static void push_greys (ProbRangesQueue *pq, char *bitmap, int w, int h)
 
static void encode_block (char *bitmap, int w, int h, int level, ProbRangesQueue *pq)
 
static av_cold int xface_encode_init (AVCodecContext *avctx)
 
static void push_integer (BigInt *b, const ProbRange *prange)
 
static int xface_encode_frame (AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
 
static av_cold int xface_encode_close (AVCodecContext *avctx)
 

Variables

AVCodec ff_xface_encoder
 

Detailed Description

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

Definition in file xfaceenc.c.

Function Documentation

static int all_same ( char *  bitmap,
int  w,
int  h 
)
static

Definition at line 39 of file xfaceenc.c.

Referenced by all_white().

static int all_black ( char *  bitmap,
int  w,
int  h 
)
static

Definition at line 56 of file xfaceenc.c.

Referenced by encode_block().

static int all_white ( char *  bitmap,
int  w,
int  h 
)
static

Definition at line 71 of file xfaceenc.c.

Referenced by encode_block().

static int pq_push ( ProbRangesQueue pq,
const ProbRange p 
)
inlinestatic

Definition at line 81 of file xfaceenc.c.

Referenced by encode_block(), and push_greys().

static void push_greys ( ProbRangesQueue pq,
char *  bitmap,
int  w,
int  h 
)
static

Definition at line 89 of file xfaceenc.c.

Referenced by encode_block().

static void encode_block ( char *  bitmap,
int  w,
int  h,
int  level,
ProbRangesQueue pq 
)
static

Definition at line 108 of file xfaceenc.c.

Referenced by xface_encode_frame().

static av_cold int xface_encode_init ( AVCodecContext avctx)
static

Definition at line 127 of file xfaceenc.c.

static void push_integer ( BigInt b,
const ProbRange prange 
)
static

Definition at line 137 of file xfaceenc.c.

Referenced by xface_encode_frame().

static int xface_encode_frame ( AVCodecContext avctx,
AVPacket pkt,
const AVFrame frame,
int *  got_packet 
)
static

Definition at line 146 of file xfaceenc.c.

static av_cold int xface_encode_close ( AVCodecContext avctx)
static

Definition at line 224 of file xfaceenc.c.

Variable Documentation

AVCodec ff_xface_encoder
Initial value:
= {
.name = "xface",
.long_name = NULL_IF_CONFIG_SMALL("X-face image"),
.priv_data_size = sizeof(XFaceContext),
.encode2 = xface_encode_frame,
.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_MONOWHITE, AV_PIX_FMT_NONE },
}

Definition at line 231 of file xfaceenc.c.