FFmpeg
Macros | Functions | Variables
xface.c File Reference
#include "libavutil/avassert.h"
#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. 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]
 
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

◆ GEN

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

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]
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 129 of file xface.c.

Referenced by decode_block(), and encode_block().

◆ ff_xface_probranges_2x2

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 137 of file xface.c.

Referenced by pop_greys(), and push_greys().

◆ g_00

const uint8_t g_00[]
static

Definition at line 153 of file xface.c.

Referenced by ff_xface_generate_face().

◆ g_01

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 208 of file xface.c.

Referenced by ff_xface_generate_face().

◆ g_02

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

Definition at line 213 of file xface.c.

Referenced by ff_xface_generate_face().

◆ g_10

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 217 of file xface.c.

Referenced by ff_xface_generate_face().

◆ g_20

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

Definition at line 227 of file xface.c.

Referenced by ff_xface_generate_face().

◆ g_30

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 231 of file xface.c.

Referenced by ff_xface_generate_face().

◆ g_40

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 238 of file xface.c.

Referenced by ff_xface_generate_face().

◆ g_11

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

Definition at line 254 of file xface.c.

Referenced by ff_xface_generate_face().

◆ g_21

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

Definition at line 258 of file xface.c.

Referenced by ff_xface_generate_face().

◆ g_31

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

Definition at line 262 of file xface.c.

Referenced by ff_xface_generate_face().

◆ g_41

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

Definition at line 266 of file xface.c.

Referenced by ff_xface_generate_face().

◆ g_12

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

Definition at line 270 of file xface.c.

Referenced by ff_xface_generate_face().

◆ g_22

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

Definition at line 274 of file xface.c.

Referenced by ff_xface_generate_face().

◆ g_32

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

Definition at line 278 of file xface.c.

Referenced by ff_xface_generate_face().

◆ g_42

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

Definition at line 282 of file xface.c.

Referenced by ff_xface_generate_face().