MythTV  master
Functions | Variables
vbilut.cpp File Reference
#include <vbilut.h>
Include dependency graph for vbilut.cpp:

Go to the source code of this file.

Functions

int hamm8 (const uint8_t *p, int *err)
 
int hamm84 (const uint8_t *p, int *err)
 
int hamm16 (const uint8_t *p, int *err)
 

Variables

const unsigned char lang_chars [1+8+8][16]
 
const unsigned char chartab_original [13]
 
const unsigned short hammtab [256]
 
const uint8_t hamm84tab [256]
 
const uint8_t unham84tab [256]
 
const uint8_t vbi_bit_reverse [256]
 
const char * formats [8]
 
const char * subtitles [4]
 
const char hamm24par [3][256]
 This table generates the parity checks for hamm24/18 decoding. More...
 
const char hamm24val [256]
 Table to extract the lower 4 bit from hamm24/18 encoded bytes. More...
 
const short hamm24err [64]
 Mapping from parity checks made by table hamm24par to error results return by hamm24. More...
 
const int hamm24cor [64]
 Mapping from parity checks made by table hamm24par to faulty bit in the decoded 18 bit word. More...
 

Function Documentation

◆ hamm8()

int hamm8 ( const uint8_t *  p,
int *  err 
)

Definition at line 328 of file vbilut.cpp.

◆ hamm84()

int hamm84 ( const uint8_t *  p,
int *  err 
)

Definition at line 335 of file vbilut.cpp.

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

◆ hamm16()

int hamm16 ( const uint8_t *  p,
int *  err 
)

Definition at line 345 of file vbilut.cpp.

Variable Documentation

◆ lang_chars

const unsigned char lang_chars[1+8+8][16]

Definition at line 4 of file vbilut.cpp.

◆ chartab_original

const unsigned char chartab_original[13]
Initial value:
=
{
0x23,0xa4,0x40,0x5b,0x5c,0x5d,0x5e,0x5f,0x27,0x7b,0x7c,0x7d,0x7e
}

Definition at line 47 of file vbilut.cpp.

◆ hammtab

const unsigned short hammtab[256]

Definition at line 52 of file vbilut.cpp.

Referenced by hamm16(), and hamm8().

◆ hamm84tab

const uint8_t hamm84tab[256]
Initial value:
=
{
255,255,255,255,255,255,255,255,255, 0,
255, 8,255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255, 6,255,
14,255,255,255,255,255, 12,255, 4,255,
255,255,255,255,255,255,255,255,255, 10,
255, 2,255,255,255,255,255,255,255,255,
255,255,255,255, 1,255, 9,255,255,255,
255,255,255,255,255,255,255,255,255,255,
255,255,255,255,255, 7,255, 15,255,255,
255,255,255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,255, 13,
255, 5,255,255,255,255,255,255,255,255,
11,255, 3,255,255,255,255,255,255,255,
255,255,255, 12,255, 4,255,255,255,255,
255,255,255,255, 10,255, 2,255,255,255,
255,255,255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255, 0,255,
8,255,255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,255, 6,
255, 14,255,255,255,255,255,255,255,255,
255,255,255,255, 13,255, 5,255,255,255,
255,255,255,255,255,255,255, 11,255, 3,
255,255,255,255,255, 1,255, 9,255,255,
255,255,255,255,255,255,255,255,255,255,
255,255,255,255, 7,255, 15,255,255,255,
255,255,255,255,255,255 }

Definition at line 88 of file vbilut.cpp.

Referenced by hamm84().

◆ unham84tab

const uint8_t unham84tab[256]

Definition at line 118 of file vbilut.cpp.

◆ vbi_bit_reverse

const uint8_t vbi_bit_reverse[256]

Definition at line 154 of file vbilut.cpp.

Referenced by CC608Decoder::DecodeVPS().

◆ formats

const char* formats[8]

◆ subtitles

const char* subtitles[4]
Initial value:
=
{
"none",
"in active image area",
"out of active image area",
"?"
}

Definition at line 202 of file vbilut.cpp.

Referenced by EITHelper::AddEIT(), and CC608Decoder::DecodeWSS().

◆ hamm24par

const char hamm24par[3][256]

This table generates the parity checks for hamm24/18 decoding.

bit 0 is for test A, 1 for B, ... thanks to R. Gancarz for this fine table g

Definition at line 214 of file vbilut.cpp.

◆ hamm24val

const char hamm24val[256]
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
}

Table to extract the lower 4 bit from hamm24/18 encoded bytes.

Definition at line 274 of file vbilut.cpp.

◆ hamm24err

const short hamm24err[64]
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,
}

Mapping from parity checks made by table hamm24par to error results return by hamm24.

(0 = no error, 0x0100 = single bit error, 0x1000 = double error)

Definition at line 300 of file vbilut.cpp.

◆ hamm24cor

const int hamm24cor[64]
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,
}

Mapping from parity checks made by table hamm24par to faulty bit in the decoded 18 bit word.

Definition at line 316 of file vbilut.cpp.