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

X-Face common data and utilities definition. More...

#include "xface.h"

Go to the source code of this file.

Macros

#define GEN(table)   dst[h] ^= (table[k>>3]>>(7-(k&7)))&1
 

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]
 
static const uint8_t g_00 []
 
static const uint8_t g_01 []
 
static const uint8_t g_02 []
 
static const uint8_t g_10 []
 
static const uint8_t g_20 []
 
static const uint8_t g_30 []
 
static const uint8_t g_40 []
 
static const uint8_t g_11 []
 
static const uint8_t g_21 []
 
static const uint8_t g_31 []
 
static const uint8_t g_41 []
 
static const uint8_t g_12 []
 
static const uint8_t g_22 []
 
static const uint8_t g_32 []
 
static const uint8_t g_42 []
 

Detailed Description

X-Face common data and utilities definition.

Definition in file xface.c.

Macro Definition Documentation

#define GEN (   table)    dst[h] ^= (table[k>>3]>>(7-(k&7)))&1

Referenced by ff_xface_generate_face().

Function Documentation

void ff_big_add ( BigInt b,
uint8_t  a 
)

Add a to b storing the result in b.

Definition at line 29 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 51 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 90 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 281 of file xface.c.

Referenced by xface_decode_frame(), and xface_encode_frame().

Variable Documentation

const ProbRange ff_xface_probranges_per_level[4][3]
Initial value:
= {
{ { 1, 255}, {251, 0}, { 4, 251} },
{ { 1, 255}, {200, 0}, { 55, 200} },
{ { 33, 223}, {159, 0}, { 64, 159} },
{ {131, 0}, { 0, 0}, {125, 131} },
}

Definition at line 124 of file xface.c.

Referenced by decode_block(), and encode_block().

const ProbRange ff_xface_probranges_2x2[16]
Initial value:
= {
{ 0, 0}, {38, 0}, {38, 38}, {13, 152},
{38, 76}, {13, 165}, {13, 178}, { 6, 230},
{38, 114}, {13, 191}, {13, 204}, { 6, 236},
{13, 217}, { 6, 242}, { 5, 248}, { 3, 253},
}

Definition at line 132 of file xface.c.

Referenced by pop_greys(), and push_greys().

const uint8_t g_00[]
static

Definition at line 148 of file xface.c.

Referenced by ff_xface_generate_face().

const uint8_t g_01[]
static
Initial value:
= {
0x37, 0x73, 0x00, 0x19, 0x57, 0x7f, 0xf5, 0xfb, 0x70, 0x33,
0xf0, 0xf9, 0x7f, 0xff, 0xff, 0xff,
}

Definition at line 203 of file xface.c.

Referenced by ff_xface_generate_face().

const uint8_t g_02[]
static
Initial value:
= {
0x50,
}

Definition at line 208 of file xface.c.

Referenced by ff_xface_generate_face().

const uint8_t g_10[]
static
Initial value:
= {
0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0xf3, 0x5f, 0x84, 0x04,
0x17, 0x9f, 0x04, 0x23, 0x05, 0xff, 0x00, 0x00, 0x00, 0x02,
0x03, 0x03, 0x33, 0xd7, 0x05, 0x03, 0x5f, 0x3f, 0x17, 0x33,
0xff, 0xff, 0x00, 0x80, 0x02, 0x04, 0x12, 0x00, 0x11, 0x57,
0x05, 0x25, 0x05, 0x03, 0x35, 0xbf, 0x9f, 0xff, 0x07, 0x6f,
0x20, 0x40, 0x17, 0x06, 0xfa, 0xe8, 0x01, 0x07, 0x1f, 0x9f,
0x1f, 0xff, 0xff, 0xff,
}

Definition at line 212 of file xface.c.

Referenced by ff_xface_generate_face().

const uint8_t g_20[]
static
Initial value:
= {
0x04, 0x00, 0x01, 0x01, 0x43, 0x2e, 0xff, 0x3f,
}

Definition at line 222 of file xface.c.

Referenced by ff_xface_generate_face().

const uint8_t g_30[]
static
Initial value:
= {
0x11, 0x11, 0x11, 0x11, 0x51, 0x11, 0x13, 0x11, 0x11, 0x11,
0x13, 0x11, 0x11, 0x11, 0x33, 0x11, 0x13, 0x11, 0x13, 0x13,
0x13, 0x13, 0x31, 0x31, 0x11, 0x01, 0x11, 0x11, 0x71, 0x11,
0x11, 0x75,
}

Definition at line 226 of file xface.c.

Referenced by ff_xface_generate_face().

const uint8_t g_40[]
static
Initial value:
= {
0x00, 0x0f, 0x00, 0x09, 0x00, 0x0d, 0x00, 0x0d, 0x00, 0x0f,
0x00, 0x4e, 0xe4, 0x0d, 0x10, 0x0f, 0x00, 0x0f, 0x44, 0x4f,
0x00, 0x1e, 0x0f, 0x0f, 0xae, 0xaf, 0x45, 0x7f, 0xef, 0xff,
0x0f, 0xff, 0x00, 0x09, 0x01, 0x11, 0x00, 0x01, 0x1c, 0xdd,
0x00, 0x15, 0x00, 0xff, 0x00, 0x10, 0x00, 0xfd, 0x00, 0x0f,
0x4f, 0x5f, 0x3d, 0xff, 0xff, 0xff, 0x4f, 0xff, 0x1c, 0xff,
0xdf, 0xff, 0x8f, 0xff, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x15,
0x01, 0x07, 0x00, 0x01, 0x02, 0x1f, 0x01, 0x11, 0x05, 0x7f,
0x00, 0x1f, 0x41, 0x57, 0x1f, 0xff, 0x05, 0x77, 0x0d, 0x5f,
0x4d, 0xff, 0x4f, 0xff, 0x0f, 0xff, 0x00, 0x00, 0x02, 0x05,
0x00, 0x11, 0x05, 0x7d, 0x10, 0x15, 0x2f, 0xff, 0x40, 0x50,
0x0d, 0xfd, 0x04, 0x0f, 0x07, 0x1f, 0x07, 0x7f, 0x0f, 0xbf,
0x0d, 0x7f, 0x0f, 0xff, 0x4d, 0x7d, 0x0f, 0xff,
}

Definition at line 233 of file xface.c.

Referenced by ff_xface_generate_face().

const uint8_t g_11[]
static
Initial value:
= {
0x01, 0x13, 0x03, 0x7f,
}

Definition at line 249 of file xface.c.

Referenced by ff_xface_generate_face().

const uint8_t g_21[]
static
Initial value:
= {
0x17,
}

Definition at line 253 of file xface.c.

Referenced by ff_xface_generate_face().

const uint8_t g_31[]
static
Initial value:
= {
0x55, 0x57, 0x57, 0x7f,
}

Definition at line 257 of file xface.c.

Referenced by ff_xface_generate_face().

const uint8_t g_41[]
static
Initial value:
= {
0x01, 0x01, 0x01, 0x1f, 0x03, 0x1f, 0x3f, 0xff,
}

Definition at line 261 of file xface.c.

Referenced by ff_xface_generate_face().

const uint8_t g_12[]
static
Initial value:
= {
0x40,
}

Definition at line 265 of file xface.c.

Referenced by ff_xface_generate_face().

const uint8_t g_22[]
static
Initial value:
= {
0x00,
}

Definition at line 269 of file xface.c.

Referenced by ff_xface_generate_face().

const uint8_t g_32[]
static
Initial value:
= {
0x10,
}

Definition at line 273 of file xface.c.

Referenced by ff_xface_generate_face().

const uint8_t g_42[]
static
Initial value:
= {
0x10,
}

Definition at line 277 of file xface.c.

Referenced by ff_xface_generate_face().