SSBM Decomp
Toggle main menu visibility
Loading...
Searching...
No Matches
thp.h
Go to the documentation of this file.
1
#ifndef THP_H
2
#define THP_H
3
4
#include <
dolphin/os.h
>
5
6
#ifdef __cplusplus
7
extern
"C"
{
8
#endif
9
10
typedef
u8
THPSample
;
11
typedef
s16
THPCoeff
;
12
typedef
f32
THPQuantTab
[64];
13
14
typedef
struct
_THPHuffmanTab {
15
u8
quick
[32];
16
u8
increment
[32];
17
u8
*
Vij
;
18
s32
maxCode
[18];
19
s32
valPtr
[18];
20
u8
Vij1
;
21
u8
*
bits
;
22
u32
pad3
;
23
u32
*
codetab
;
24
u32
pad2
[2];
25
}
THPHuffmanTab
;
26
27
typedef
struct
_THPComponent {
28
THPCoeff
predDC
;
29
u8
pad
;
30
u8
quantizationTableSelector
;
31
u8
DCTableSelector
;
32
u8
ACTableSelector
;
33
u32
pad2
[9];
34
}
THPComponent
;
35
36
typedef
struct
_THPFileInfo {
37
u8
*
file
;
38
u32
currByte
;
39
u32
cnt
;
40
u8
*
x0C
;
41
THPCoeff
*
mcuBuffer
[6];
42
u8
pad
[0x78 - 0x28];
43
u8
validHuffmanTabs
;
44
u8
x78
;
45
u8
pad3
[0xb];
46
THPHuffmanTab
huffmanTabs
[4];
47
THPQuantTab
quantTabs
[3];
48
u16
xPixelSize
;
49
u16
yPixelSize
;
50
u16
MCUsPerRow
;
51
u16
decompressedY
;
52
u8
RST
;
53
u16
nMCU
;
54
u16
currMCU
;
55
u8
*
dLC
[3];
56
u32
pad2
[(0x83d - 0x756) / 4];
57
THPComponent
components
[3];
58
}
THPFileInfo
;
59
60
typedef
struct
{
61
s32
val0
;
62
u16
val1
;
63
u16
_pad
;
64
u8
val2
;
65
}
THPDec_8032FD40_Data
;
66
67
68
static
u8
__THPReadFrameHeader
(
THPFileInfo
*);
69
static
u8
__THPReadScaneHeader
(
THPFileInfo
*);
70
static
u8
__THPReadQuantizationTable
(
THPFileInfo
*);
71
static
u8
__THPReadHuffmanTableSpecification
(
THPFileInfo
*);
72
static
u8
__THPReadScaneHeader
(
THPFileInfo
*);
73
static
u8
__THPHuffGenerateSizeTable
(
THPFileInfo
*,
u8
,
int
);
74
static
u8
__THPHuffGenerateCodeTable
(
THPFileInfo
*,
u8
tab_index);
75
static
int
__THPHuffGenerateDecoderTables
(
THPFileInfo
*,
u8
tab_index);
76
static
u8
__THPRestartDefinition
(
THPFileInfo
*);
77
static
void
__THPPrepBitStream
(
THPFileInfo
*);
78
static
void
__THPDecompressiMCURow640x480
(
THPFileInfo
*);
79
static
void
__THPDecompressiMCURowNxN
(
THPFileInfo
*,
u32
);
80
static
void
__THPInverseDCTNoYPos
(
THPCoeff
*,
u32
);
81
static
void
__THPHuffDecodeDCTCompY
(
THPFileInfo
*,
THPCoeff
*);
82
static
void
__THPHuffDecodeDCTCompU
(
THPFileInfo
*,
THPCoeff
*);
83
static
void
__THPHuffDecodeDCTCompV
(
THPFileInfo
*,
THPCoeff
*);
84
85
s32
THPVideoDecode
(
void
* file,
void
* tileY,
void
* tileU,
void
* tileV,
void
* work);
86
s32
THPDec_803302EC
(
u8
** data);
87
s32
THPDec_8032FD40
(
THPDec_8032FD40_Data
* arg0,
u16
arg1);
88
s32
THPDec_8032F8D4
(
u8
* data,
THPDec_8032FD40_Data
* out);
89
u8
THPDec_80330158
(
THPFileInfo
* info);
90
void
THPDec_80331340
(
s32
,
void
*,
void
*,
void
*);
91
void
THPDec_803313D0
(
s32
,
void
*,
void
*,
void
*,
u32
);
92
void
THPDec_803300E0
(
u32
* data);
93
void
THPInit
(
void
);
94
95
#ifdef __cplusplus
96
}
97
#endif
98
99
#endif
// THP_H
u32
unsigned long u32
Definition
types.h:9
s16
signed short int s16
Definition
types.h:6
f32
float f32
Definition
types.h:13
u16
unsigned short int u16
Definition
types.h:7
s32
signed long s32
Definition
types.h:8
u8
unsigned char u8
Definition
types.h:5
os.h
THPComponent
Definition
thp.h:27
THPComponent::ACTableSelector
u8 ACTableSelector
Definition
thp.h:32
THPComponent::DCTableSelector
u8 DCTableSelector
Definition
thp.h:31
THPComponent::pad2
u32 pad2[9]
Definition
thp.h:33
THPComponent::pad
u8 pad
Definition
thp.h:29
THPComponent::predDC
THPCoeff predDC
Definition
thp.h:28
THPComponent::quantizationTableSelector
u8 quantizationTableSelector
Definition
thp.h:30
THPDec_8032FD40_Data
Definition
thp.h:60
THPDec_8032FD40_Data::val1
u16 val1
Definition
thp.h:62
THPDec_8032FD40_Data::val2
u8 val2
Definition
thp.h:64
THPDec_8032FD40_Data::val0
s32 val0
Definition
thp.h:61
THPDec_8032FD40_Data::_pad
u16 _pad
Definition
thp.h:63
THPFileInfo
Definition
thp.h:36
THPFileInfo::mcuBuffer
THPCoeff * mcuBuffer[6]
Definition
thp.h:41
THPFileInfo::pad3
u8 pad3[0xb]
Definition
thp.h:45
THPFileInfo::nMCU
u16 nMCU
Definition
thp.h:53
THPFileInfo::pad
u8 pad[0x78 - 0x28]
Definition
thp.h:42
THPFileInfo::validHuffmanTabs
u8 validHuffmanTabs
Definition
thp.h:43
THPFileInfo::huffmanTabs
THPHuffmanTab huffmanTabs[4]
Definition
thp.h:46
THPFileInfo::quantTabs
THPQuantTab quantTabs[3]
Definition
thp.h:47
THPFileInfo::currMCU
u16 currMCU
Definition
thp.h:54
THPFileInfo::RST
u8 RST
Definition
thp.h:52
THPFileInfo::x0C
u8 * x0C
Definition
thp.h:40
THPFileInfo::x78
u8 x78
Definition
thp.h:44
THPFileInfo::xPixelSize
u16 xPixelSize
Definition
thp.h:48
THPFileInfo::yPixelSize
u16 yPixelSize
Definition
thp.h:49
THPFileInfo::pad2
u32 pad2[(0x83d - 0x756)/4]
Definition
thp.h:56
THPFileInfo::file
u8 * file
Definition
thp.h:37
THPFileInfo::currByte
u32 currByte
Definition
thp.h:38
THPFileInfo::decompressedY
u16 decompressedY
Definition
thp.h:51
THPFileInfo::dLC
u8 * dLC[3]
Definition
thp.h:55
THPFileInfo::components
THPComponent components[3]
Definition
thp.h:57
THPFileInfo::cnt
u32 cnt
Definition
thp.h:39
THPFileInfo::MCUsPerRow
u16 MCUsPerRow
Definition
thp.h:50
THPHuffmanTab
Definition
thp.h:14
THPHuffmanTab::quick
u8 quick[32]
Definition
thp.h:15
THPHuffmanTab::valPtr
s32 valPtr[18]
Definition
thp.h:19
THPHuffmanTab::increment
u8 increment[32]
Definition
thp.h:16
THPHuffmanTab::pad2
u32 pad2[2]
Definition
thp.h:24
THPHuffmanTab::bits
u8 * bits
Definition
thp.h:21
THPHuffmanTab::codetab
u32 * codetab
Definition
thp.h:23
THPHuffmanTab::maxCode
s32 maxCode[18]
Definition
thp.h:18
THPHuffmanTab::Vij
u8 * Vij
Definition
thp.h:17
THPHuffmanTab::pad3
u32 pad3
Definition
thp.h:22
THPHuffmanTab::Vij1
u8 Vij1
Definition
thp.h:20
__THPHuffDecodeDCTCompY
static void __THPHuffDecodeDCTCompY(THPFileInfo *, THPCoeff *)
__THPHuffGenerateCodeTable
static u8 __THPHuffGenerateCodeTable(THPFileInfo *, u8 tab_index)
__THPDecompressiMCURow640x480
static void __THPDecompressiMCURow640x480(THPFileInfo *)
__THPDecompressiMCURowNxN
static void __THPDecompressiMCURowNxN(THPFileInfo *, u32)
THPDec_80331340
void THPDec_80331340(s32, void *, void *, void *)
THPDec_8032FD40
s32 THPDec_8032FD40(THPDec_8032FD40_Data *arg0, u16 arg1)
THPInit
void THPInit(void)
__THPReadScaneHeader
static u8 __THPReadScaneHeader(THPFileInfo *)
THPVideoDecode
s32 THPVideoDecode(void *file, void *tileY, void *tileU, void *tileV, void *work)
THPQuantTab
f32 THPQuantTab[64]
Definition
thp.h:12
THPDec_803300E0
void THPDec_803300E0(u32 *data)
THPDec_80330158
u8 THPDec_80330158(THPFileInfo *info)
__THPReadQuantizationTable
static u8 __THPReadQuantizationTable(THPFileInfo *)
THPCoeff
s16 THPCoeff
Definition
thp.h:11
__THPPrepBitStream
static void __THPPrepBitStream(THPFileInfo *)
__THPRestartDefinition
static u8 __THPRestartDefinition(THPFileInfo *)
THPSample
u8 THPSample
Definition
thp.h:10
THPDec_803302EC
s32 THPDec_803302EC(u8 **data)
__THPHuffGenerateDecoderTables
static int __THPHuffGenerateDecoderTables(THPFileInfo *, u8 tab_index)
THPDec_803313D0
void THPDec_803313D0(s32, void *, void *, void *, u32)
__THPHuffGenerateSizeTable
static u8 __THPHuffGenerateSizeTable(THPFileInfo *, u8, int)
__THPReadHuffmanTableSpecification
static u8 __THPReadHuffmanTableSpecification(THPFileInfo *)
__THPHuffDecodeDCTCompU
static void __THPHuffDecodeDCTCompU(THPFileInfo *, THPCoeff *)
THPDec_8032F8D4
s32 THPDec_8032F8D4(u8 *data, THPDec_8032FD40_Data *out)
__THPInverseDCTNoYPos
static void __THPInverseDCTNoYPos(THPCoeff *, u32)
__THPReadFrameHeader
static u8 __THPReadFrameHeader(THPFileInfo *)
__THPHuffDecodeDCTCompV
static void __THPHuffDecodeDCTCompV(THPFileInfo *, THPCoeff *)
extern
dolphin
include
dolphin
thp
thp.h
Generated by
1.17.0