FFmpeg
Data Structures | Macros | Enumerations | Functions | Variables
xface.h File Reference
#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. More...
 
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. More...
 
void ff_big_mul (BigInt *b, uint8_t a)
 Multiply a by b storing the result in b. More...
 
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

◆ XFACE_WIDTH

#define XFACE_WIDTH   48

Definition at line 33 of file xface.h.

◆ XFACE_HEIGHT

#define XFACE_HEIGHT   48

Definition at line 34 of file xface.h.

◆ XFACE_PIXELS

#define XFACE_PIXELS   (XFACE_WIDTH * XFACE_HEIGHT)

Definition at line 35 of file xface.h.

◆ XFACE_FIRST_PRINT

#define XFACE_FIRST_PRINT   '!'

Definition at line 40 of file xface.h.

◆ XFACE_LAST_PRINT

#define XFACE_LAST_PRINT   '~'

Definition at line 41 of file xface.h.

◆ XFACE_PRINTS

#define XFACE_PRINTS   (XFACE_LAST_PRINT - XFACE_FIRST_PRINT + 1)

Definition at line 42 of file xface.h.

◆ XFACE_MAX_DIGITS

#define XFACE_MAX_DIGITS   666

Definition at line 50 of file xface.h.

◆ XFACE_BITSPERWORD

#define XFACE_BITSPERWORD   8

Definition at line 52 of file xface.h.

◆ XFACE_WORDCARRY

#define XFACE_WORDCARRY   (1 << XFACE_BITSPERWORD)

Definition at line 53 of file xface.h.

◆ XFACE_WORDMASK

#define XFACE_WORDMASK   (XFACE_WORDCARRY - 1)

Definition at line 54 of file xface.h.

◆ XFACE_MAX_WORDS

#define XFACE_MAX_WORDS   546

Definition at line 57 of file xface.h.

Enumeration Type Documentation

◆ XFaceColor

enum XFaceColor
Enumerator
XFACE_COLOR_BLACK 
XFACE_COLOR_GREY 
XFACE_COLOR_WHITE 

Definition at line 85 of file xface.h.

Function Documentation

◆ ff_big_add()

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().

◆ ff_big_div()

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().

◆ ff_big_mul()

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().

◆ ff_xface_generate_face()

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

◆ ff_xface_probranges_per_level

const ProbRange ff_xface_probranges_per_level[4][3]

Definition at line 129 of file xface.c.

Referenced by decode_block(), and encode_block().

◆ ff_xface_probranges_2x2

const ProbRange ff_xface_probranges_2x2[16]

Definition at line 137 of file xface.c.

Referenced by pop_greys(), and push_greys().