Decompile jpegutils.c (#75)

* Decompile jpegutils.c

jpegutils.c : OK

* Fix a typo

* Fixes in PR #75

- Fix a type in JpegWork
- Remove clang-format off/on in z_quake.c
- Move the jpegutils rule at the end of makefile
This commit is contained in:
Random
2020-04-16 20:08:23 +02:00
committed by GitHub
parent 045a92d7c3
commit 9ac1f8130d
10 changed files with 210 additions and 418 deletions
+8 -7
View File
@@ -2318,13 +2318,14 @@ void Sleep_Nsec(u32 nsec);
void Sleep_Usec(u32 usec);
void Sleep_Msec(u32 ms);
void Sleep_Sec(u32 sec);
void func_800FF540(u8* dqt, JpegQuantizationTable* qtPtr, u8 count);
// ? func_800FF5A8(?);
// ? func_800FF62C(?);
// ? func_800FF698(?);
// ? func_800FF740(?);
u32 func_800FF7FC(u8* data, JpegHuffmanTable* htPtr, void*, void*, u8 count);
// ? func_800FF8D4(?);
void JpegUtils_ProcessQuantizationTable(u8* dqt, JpegQuantizationTable* qt, u8 count);
s32 JpegUtils_ParseHuffmancodesLengths(u8* ptr, u8* codesLengths);
s32 JpegUtils_GetHuffmanCodes(u8* codesLengths, u16* codes);
s32 JpegUtils_SetHuffmanTable(u8* data, JpegHuffmanTable* ht, u16* codes);
u32 JpegUtils_ProcessHuffmanTableImpl(u8* data, JpegHuffmanTable* ht, u8* codesLengths, u16* codes, u8 isAc);
u32 JpegUtils_ProcessHuffmanTable(u8* dht, JpegHuffmanTable* ht, u8* codesLengths, u16* codes, u8 count);
void JpegUtils_SetHuffmanTableOld(u8* data, JpegHuffmanTableOld* ht, u8* codesLengths, u16* codes, s16 count, u8 isAc);
u32 JpegUtils_ProcessHuffmanTableImplOld(u8* dht, JpegHuffmanTableOld* ht, u8* codesLengths, u16* codes);
u32 func_800FFA50(JpegDecoder* decoder, u16*, u32, u8, u32*);
// ? func_800FFC78(?);
// ? func_800FFE14(?);
+8 -1
View File
@@ -1480,6 +1480,13 @@ typedef struct {
/* 0x50 */ u8* symbols;
} JpegHuffmanTable; // size = 0x54
// this struct might be unaccurate but it's not used outside jpegutils.c anyways
typedef struct {
/* 0x000 */ u8 codeOffs[16];
/* 0x010 */ u16 dcCodes[120];
/* 0x100 */ u16 acCodes[256];
} JpegHuffmanTableOld; // size = 0x300
typedef struct {
/* 0x00 */ u32 unk_00;
/* 0x04 */ u32 unk_04;
@@ -1492,7 +1499,7 @@ typedef struct {
/* 0x000 */ JpegTaskData taskData;
/* 0x020 */ char yieldData[0x200];
/* 0x220 */ JpegQuantizationTable qTables[3];
/* 0x3A0 */ u8 codesLenghts[0x110];
/* 0x3A0 */ u8 codesLengths[0x110];
/* 0x4B0 */ u16 codes[0x108];
/* 0x6C0 */ u16 unk_6C0[4][0x180];
} JpegWork; // size = 0x12C0