libpromeki 1.0.0-alpha
PROfessional MEdia toolKIt
 
Loading...
Searching...
No Matches
cea708ext.h
Go to the documentation of this file.
1
8#pragma once
9
10
11#include <promeki/config.h>
12#if PROMEKI_ENABLE_PROAV
13#include <cstdint>
14#include <promeki/namespace.h>
15
16PROMEKI_NAMESPACE_BEGIN
17
49struct Cea708Ext {
52 static constexpr uint8_t NoMapping = 0xFF;
53
58 static constexpr uint32_t NoCodepoint = 0;
59
65 static constexpr uint32_t G3CcLogo = 0xE000;
66
69 static constexpr uint8_t Ext1 = 0x10;
70
73 static constexpr uint8_t P16 = 0x18;
74
83 static uint8_t encodeG2(uint32_t cp);
84
94 static uint8_t encodeG3(uint32_t cp);
95
106 static uint32_t decodeG2(uint8_t b);
107
118 static uint32_t decodeG3(uint8_t b);
119
123 struct EncodedChar {
124 uint8_t bytes[6] = {0, 0, 0, 0, 0, 0};
125 uint8_t length = 0;
126 };
127
155 static EncodedChar encode(uint32_t cp);
156
157 Cea708Ext() = delete;
158};
159
160PROMEKI_NAMESPACE_END
161
162#endif // PROMEKI_ENABLE_PROAV