mirror of
https://github.com/pret/pokestadium.git
synced 2026-03-21 17:24:20 -05:00
JpegUtils_ProcessHuffmanTableImplOld
This commit is contained in:
parent
c536feed78
commit
cbbffad95b
|
|
@ -312,7 +312,7 @@ JpegUtils_SetHuffmanTable = 0x8000BEC8; // type:func
|
|||
JpegUtils_ProcessHuffmanTableImpl = 0x8000BF70; // type:func
|
||||
func_8000C02C = 0x8000C02C; // type:func
|
||||
JpegUtils_SetHuffmanTableOld = 0x8000C104; // type:func
|
||||
func_8000C1AC = 0x8000C1AC; // type:func
|
||||
JpegUtils_ProcessHuffmanTableImplOld = 0x8000C1AC; // type:func
|
||||
func_8000C280 = 0x8000C280; // type:func
|
||||
func_8000C4A8 = 0x8000C4A8; // type:func
|
||||
func_8000C644 = 0x8000C644; // type:func
|
||||
|
|
|
|||
30
src/C970.c
30
src/C970.c
|
|
@ -138,26 +138,22 @@ void JpegUtils_SetHuffmanTableOld(u8* data, JpegHuffmanTableOld* ht, u8* codesLe
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
s32 func_8000C1AC(u8* arg0, JpegHuffmanTableOld* arg1, u8* arg2, u16* arg3) {
|
||||
u8 sp2F;
|
||||
s16 sp2C;
|
||||
s16 temp_v0;
|
||||
u8* temp_s0;
|
||||
u32 JpegUtils_ProcessHuffmanTableImplOld(u8* dht, JpegHuffmanTableOld* ht, u8* codesLengths, u16* codes) {
|
||||
u8 isAc = *dht++ >> 4;
|
||||
s16 count2;
|
||||
s32 count;
|
||||
|
||||
temp_s0 = arg0 + 1;
|
||||
sp2F = (u8) ((s32) *arg0 >> 4);
|
||||
temp_v0 = JpegUtils_GetHuffmanCodes(temp_s0, arg2);
|
||||
if ((temp_v0 == 0) || ((sp2F != 0) && (temp_v0 >= 0x101)) || ((sp2F == 0) && (temp_v0 >= 0x11))) {
|
||||
count2 = count = JpegUtils_ParseHuffmanCodesLengths(dht, codesLengths);
|
||||
|
||||
if (count == 0 || (isAc && count > 0x100) || (!isAc && count > 0x10)) {
|
||||
return 1;
|
||||
}
|
||||
sp2C = temp_v0;
|
||||
if (JpegUtils_GetHuffmanCodes(arg2, arg3) != temp_v0) {
|
||||
|
||||
if (JpegUtils_GetHuffmanCodes(codesLengths, codes) != count2) {
|
||||
return 1;
|
||||
}
|
||||
JpegUtils_SetHuffmanTableOld((u8*)temp_s0 + 0x10, arg1, arg2, arg3, temp_v0, sp2F);
|
||||
|
||||
JpegUtils_SetHuffmanTableOld(dht + 0x10, ht, codesLengths, codes, count2, isAc);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/us/nonmatchings/C970/func_8000C1AC.s")
|
||||
#endif
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user