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

X-Face common definitions. More...

#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  BigInt
 
struct  ProbRange
 

Macros

#define XFACE_WIDTH   48
 
#define XFACE_HEIGHT   48
 
#define XFACE_PIXELS   (XFACE_WIDTH * XFACE_HEIGHT)
 
#define XFACE_FIRST_PRINT   '!'
 
#define XFACE_LAST_PRINT   '~'
 
#define XFACE_PRINTS   (XFACE_LAST_PRINT - XFACE_FIRST_PRINT + 1)
 
#define XFACE_MAX_DIGITS   666
 
#define XFACE_BITSPERWORD   8
 
#define XFACE_WORDCARRY   (1 << XFACE_BITSPERWORD)
 
#define XFACE_WORDMASK   (XFACE_WORDCARRY - 1)
 
#define XFACE_MAX_WORDS   546
 

Enumerations

enum  XFaceColor { XFACE_COLOR_BLACK = 0, XFACE_COLOR_GREY, XFACE_COLOR_WHITE }
 

Functions

void ff_big_add (BigInt *b, uint8_t a)
 Add a to b storing the result in b.
 
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.
 
void ff_big_mul (BigInt *b, uint8_t a)
 Multiply a by b storing the result in b.
 
void ff_xface_generate_face (uint8_t *dst, uint8_t *const src)
 

Variables

const ProbRange ff_xface_probranges_per_level [4][3]
 
const ProbRange ff_xface_probranges_2x2 [16]
 

Detailed Description

X-Face common definitions.

Definition in file xface.h.

Macro Definition Documentation

#define XFACE_WIDTH   48
#define XFACE_HEIGHT   48

Definition at line 31 of file xface.h.

Referenced by ff_xface_generate_face(), xface_decode_init(), and xface_encode_frame().

#define XFACE_PIXELS   (XFACE_WIDTH * XFACE_HEIGHT)

Definition at line 32 of file xface.h.

Referenced by pq_push(), xface_decode_frame(), and xface_encode_frame().

#define XFACE_FIRST_PRINT   '!'

Definition at line 37 of file xface.h.

Referenced by xface_decode_frame(), and xface_encode_frame().

#define XFACE_LAST_PRINT   '~'

Definition at line 38 of file xface.h.

Referenced by xface_decode_frame().

#define XFACE_PRINTS   (XFACE_LAST_PRINT - XFACE_FIRST_PRINT + 1)

Definition at line 39 of file xface.h.

Referenced by xface_decode_frame(), and xface_encode_frame().

#define XFACE_MAX_DIGITS   666

Definition at line 47 of file xface.h.

Referenced by xface_decode_frame(), and xface_encode_frame().

#define XFACE_BITSPERWORD   8

Definition at line 49 of file xface.h.

Referenced by ff_big_add(), ff_big_div(), and ff_big_mul().

#define XFACE_WORDCARRY   (1 << XFACE_BITSPERWORD)

Definition at line 50 of file xface.h.

#define XFACE_WORDMASK   (XFACE_WORDCARRY - 1)

Definition at line 51 of file xface.h.

Referenced by ff_big_add(), ff_big_div(), and ff_big_mul().

#define XFACE_MAX_WORDS   546

Definition at line 54 of file xface.h.

Referenced by ff_big_add(), ff_big_mul(), and xface_encode_frame().

Enumeration Type Documentation

enum XFaceColor
Enumerator:
XFACE_COLOR_BLACK 
XFACE_COLOR_GREY 
XFACE_COLOR_WHITE 

Definition at line 82 of file xface.h.

Function Documentation

void ff_big_add ( BigInt b,
uint8_t  a 
)

Add a to b storing the result in b.

Definition at line 31 of file xface.c.

Referenced by pop_integer(), push_integer(), and xface_decode_frame().

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.

Definition at line 54 of file xface.c.

Referenced by pop_integer(), push_integer(), and xface_encode_frame().

void ff_big_mul ( BigInt b,
uint8_t  a 
)

Multiply a by b storing the result in b.

Definition at line 93 of file xface.c.

Referenced by pop_integer(), push_integer(), and xface_decode_frame().

void ff_xface_generate_face ( uint8_t dst,
uint8_t *const  src 
)

Definition at line 286 of file xface.c.

Referenced by xface_decode_frame(), and xface_encode_frame().

Variable Documentation

const ProbRange ff_xface_probranges_per_level[4][3]

Definition at line 129 of file xface.c.

Referenced by decode_block(), and encode_block().

const ProbRange ff_xface_probranges_2x2[16]

Definition at line 137 of file xface.c.

Referenced by pop_greys(), and push_greys().