MythTV  master
Functions | Variables
hamm.c File Reference
#include "vt.h"
#include "hamm.h"
Include dependency graph for hamm.c:

Go to the source code of this file.

Functions

int hamm8 (const unsigned char *p, int *err)
 
int hamm16 (const unsigned char *p, int *err)
 
int hamm24 (const unsigned char *p, int *err)
 
int chk_parity (unsigned char *p, int n)
 

Variables

static unsigned short hammtab [256]
 
static char hamm24par [3][256]
 
static char hamm24val [256]
 
static short hamm24err [64]
 
static int hamm24cor [64]
 

Function Documentation

◆ hamm8()

int hamm8 ( const unsigned char *  p,
int *  err 
)

Definition at line 199 of file hamm.c.

Referenced by TeletextReader::AddTeletextData(), and vt_line().

◆ hamm16()

int hamm16 ( const unsigned char *  p,
int *  err 
)

Definition at line 207 of file hamm.c.

Referenced by TeletextReader::AddTeletextData(), TeletextDecoder::Decode(), and vt_line().

◆ hamm24()

int hamm24 ( const unsigned char *  p,
int *  err 
)

Definition at line 217 of file hamm.c.

Referenced by vt_line().

◆ chk_parity()

int chk_parity ( unsigned char *  p,
int  n 
)

Definition at line 227 of file hamm.c.

Referenced by vt_line().

Variable Documentation

◆ hammtab

unsigned short hammtab[256]
static

Definition at line 13 of file hamm.c.

Referenced by hamm16(), and hamm8().

◆ hamm24par

char hamm24par[3][256]
static

Definition at line 81 of file hamm.c.

Referenced by chk_parity(), and hamm24().

◆ hamm24val

char hamm24val[256]
static
Initial value:
=
{
0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1,
2, 2, 2, 2, 3, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, 3,
4, 4, 4, 4, 5, 5, 5, 5, 4, 4, 4, 4, 5, 5, 5, 5,
6, 6, 6, 6, 7, 7, 7, 7, 6, 6, 6, 6, 7, 7, 7, 7,
8, 8, 8, 8, 9, 9, 9, 9, 8, 8, 8, 8, 9, 9, 9, 9,
10, 10, 10, 10, 11, 11, 11, 11, 10, 10, 10, 10, 11, 11, 11, 11,
12, 12, 12, 12, 13, 13, 13, 13, 12, 12, 12, 12, 13, 13, 13, 13,
14, 14, 14, 14, 15, 15, 15, 15, 14, 14, 14, 14, 15, 15, 15, 15,
0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1,
2, 2, 2, 2, 3, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, 3,
4, 4, 4, 4, 5, 5, 5, 5, 4, 4, 4, 4, 5, 5, 5, 5,
6, 6, 6, 6, 7, 7, 7, 7, 6, 6, 6, 6, 7, 7, 7, 7,
8, 8, 8, 8, 9, 9, 9, 9, 8, 8, 8, 8, 9, 9, 9, 9,
10, 10, 10, 10, 11, 11, 11, 11, 10, 10, 10, 10, 11, 11, 11, 11,
12, 12, 12, 12, 13, 13, 13, 13, 12, 12, 12, 12, 13, 13, 13, 13,
14, 14, 14, 14, 15, 15, 15, 15, 14, 14, 14, 14, 15, 15, 15, 15
}

Definition at line 141 of file hamm.c.

Referenced by hamm24().

◆ hamm24err

short hamm24err[64]
static
Initial value:
=
{
0x0000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100,
0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100,
0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100,
0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
}

Definition at line 167 of file hamm.c.

Referenced by hamm24().

◆ hamm24cor

int hamm24cor[64]
static
Initial value:
=
{
0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000,
0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000,
0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000,
0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000,
0x00000, 0x00000, 0x00000, 0x00001, 0x00000, 0x00002, 0x00004, 0x00008,
0x00000, 0x00010, 0x00020, 0x00040, 0x00080, 0x00100, 0x00200, 0x00400,
0x00000, 0x00800, 0x01000, 0x02000, 0x04000, 0x08000, 0x10000, 0x20000,
0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000,
}

Definition at line 184 of file hamm.c.

Referenced by hamm24().