MythTV  master
Functions | Variables
vbilut.cpp File Reference
#include "captions/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)
 
int hamm24 (const uint8_t *p, int *err)
 

Variables

const std::array< const std::array< const uint8_t, 16 >, 1+8+8 > lang_chars
 
const std::array< const uint8_t, 13 > chartab_original
 
const std::array< const uint16_t, 256 > hammtab
 
const std::array< const uint8_t, 256 > hamm84tab
 
const std::array< const uint8_t, 256 > unham84tab
 
const std::array< const uint8_t, 256 > vbi_bit_reverse
 
const std::array< const std::string, 8 > formats
 
const std::array< const std::string, 4 > subtitles
 
const std::array< const std::array< const uint8_t, 256 >, 3 > hamm24par
 This table generates the parity checks for hamm24/18 decoding. More...
 
const std::array< const uint8_t, 256 > hamm24val
 Table to extract the lower 4 bit from hamm24/18 encoded bytes. More...
 
const std::array< const uint16_t, 64 > hamm24err
 Mapping from parity checks made by table hamm24par to error results return by hamm24. More...
 
const std::array< const int32_t, 64 > hamm24cor
 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 326 of file vbilut.cpp.

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

◆ hamm84()

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

Definition at line 333 of file vbilut.cpp.

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

◆ hamm16()

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

Definition at line 343 of file vbilut.cpp.

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

◆ hamm24()

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

Definition at line 352 of file vbilut.cpp.

Referenced by vt_line().

Variable Documentation

◆ lang_chars

const std::array<const std::array<const uint8_t,16>,1+8+8> lang_chars

Definition at line 3 of file vbilut.cpp.

Referenced by conv2latin(), cvt_char(), and lang_init().

◆ chartab_original

const std::array<const uint8_t,13> chartab_original
Initial value:
=
{
0x23,0xa4,0x40,0x5b,0x5c,0x5d,0x5e,0x5f,0x27,0x7b,0x7c,0x7d,0x7e
}

Definition at line 45 of file vbilut.cpp.

◆ hammtab

const std::array<const uint16_t,256> hammtab

Definition at line 50 of file vbilut.cpp.

Referenced by hamm16(), and hamm8().

◆ hamm84tab

const std::array<const uint8_t,256> hamm84tab
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 86 of file vbilut.cpp.

Referenced by hamm84().

◆ unham84tab

const std::array<const uint8_t,256> unham84tab

Definition at line 116 of file vbilut.cpp.

◆ vbi_bit_reverse

const std::array<const uint8_t,256> vbi_bit_reverse

Definition at line 152 of file vbilut.cpp.

Referenced by CC608Decoder::DecodeVPS().

◆ formats

const std::array<const std::string, 8> formats
Initial value:
{
"Full format 4:3, 576 lines",
"Letterbox 14:9 centre, 504 lines",
"Letterbox 14:9 top, 504 lines",
"Letterbox 16:9 centre, 430 lines",
"Letterbox 16:9 top, 430 lines",
"Letterbox > 16:9 centre",
"Full format 14:9 centre, 576 lines",
"Anamorphic 16:9, 576 lines"
}

Definition at line 188 of file vbilut.cpp.

Referenced by CoreAudioData::ChannelsList(), CC608Decoder::DecodeWSS(), MythUIText::DrawSelf(), MythPainter::DrawTextLayout(), CoreAudioData::FindAC3Stream(), MythUIText::FormatTemplate(), ImageDb< ImageAdapterLocal >::GetDescendantCount(), V4L2util::GetFormats(), MythPainter::GetImageFromTextLayout(), AudioOutputOSS::GetOutputSettings(), MythUIFileBrowser::IsImage(), MythWindowVulkan::MythWindowVulkan(), CoreAudioData::OpenSPDIF(), MythRAOPConnection::ProcessRequest(), CoreAudioData::ResetStream(), and ImageAdapterBase::SupportedVideos().

◆ subtitles

const std::array<const std::string,4> subtitles
Initial value:
{
"none",
"in active image area",
"out of active image area",
"?"
}

Definition at line 200 of file vbilut.cpp.

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

◆ hamm24par

const std::array<const std::array<const uint8_t,256>,3> hamm24par

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 212 of file vbilut.cpp.

Referenced by chk_parity(), and hamm24().

◆ hamm24val

const std::array<const uint8_t,256> hamm24val
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 272 of file vbilut.cpp.

Referenced by hamm24().

◆ hamm24err

const std::array<const uint16_t, 64> hamm24err
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 298 of file vbilut.cpp.

Referenced by hamm24().

◆ hamm24cor

const std::array<const int32_t, 64> hamm24cor
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 314 of file vbilut.cpp.

Referenced by hamm24().