Miloch Posted September 5, 2009 Posted September 5, 2009 As stated here: 0x0008 4 (dword) bits 30-0: Offset to frame databit 31: 0=Compressed, 1=Uncompressed (RLE) Shouldn't that be:bit 31: 0=Uncompressed, 1=Compressed (RLE) Or am I not reading the data right? How does this bit manifest itself within a 4-byte field? The data I'm looking at is all uncompressed I think, and either points to the correct hex or is offset by a byte or so.
Mike1072 Posted September 5, 2009 Posted September 5, 2009 As stated here:0x0008 4 (dword) bits 30-0: Offset to frame databit 31: 0=Compressed, 1=Uncompressed (RLE) Shouldn't that be:bit 31: 0=Uncompressed, 1=Compressed (RLE) Or am I not reading the data right? How does this bit manifest itself within a 4-byte field? The data I'm looking at is all uncompressed I think, and either points to the correct hex or is offset by a byte or so. I think the labels are right, just the (RLE) should be attached to the compressed value like "bit 31: 0=Compressed (RLE), 1=Uncompressed". I used some nasty code like this that seemed to work: FOR (i = 0; i < num_frames; i += 1) BEGIN //... READ_LONG (frames_off + 0x0c*i + 0x08) frame_data_off SET is_uncompressed = (frame_data_off & 0b10000000000000000000000000000000) >> 31 SET frame_data_off = (frame_data_off & 0b01111111111111111111111111111111) PATCH_IF (is_uncompressed == 0) BEGIN // compressed frame //... END //... END
Miloch Posted September 8, 2009 Author Posted September 8, 2009 I think the labels are right, just the (RLE) should be attached to the compressed value like "bit 31: 0=Compressed (RLE), 1=Uncompressed".You are right. For once . I pinched your code too (the nasty binary stuff anyway).
Recommended Posts
Archived
This topic is now archived and is closed to further replies.