Jump to content

BAM frame entry format


Miloch

Recommended Posts

As stated here:

0x0008 4 (dword) bits 30-0: Offset to frame data

bit 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.

Link to comment
As stated here:
0x0008 4 (dword) bits 30-0: Offset to frame data

bit 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

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...