[ scummvm-Patches-1504492 ] DXA: New compression scheme for encode_dxa

SourceForge.net noreply at sourceforge.net
Sun Jun 11 23:28:22 CEST 2006


Patches item #1504492, was opened at 2006-06-11 21:28
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=1504492&group_id=37116

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Benjamin Haisch (john_doe)
Assigned to: Nobody/Anonymous (nobody)
Summary: DXA: New compression scheme for encode_dxa

Initial Comment:
Included is a patch that adds a new experimental
compression scheme to the Dxa encoder.

I tested it with the Dxa videos from the German 4CD
version of Feeble Files. Compared to the current
encode_dxa the total Dxa size (without audio) was about
350 MB smaller with the new scheme.
See the other item for a player.

Now a rough description how it works:

Each frame is divided into 4x4 blocks. For each block
there's a block type and some data.
The frame data is additionally compressed with zlib.

Block types:
0:	skip block
1:	diff block (full)
2:	solid color block
3:	full block
4:	motion vector block
10-15:	diff block (one byte)

skip block:
	simply skips the current block (i.e. it's unchanged
from the previous frame).

solid color block:
	fill the current block with the next byte.

full block:
	fill the current block with the next 16 bytes.

motion vector block:
	read the next byte.
	the byte has the bitformat "axxxbyyy", where xxx and
yyy are the relative offsets from
	the current block position from where the block should
be copied from.
	bits a and b are the sign bits for the x and y offsets.

diff block (full):
	read the next unsigned short (little endian).
	for each bit in the value (from most to least
significant bit), if the bit is set,
	read one pixel, otherwise go to the next pixel.

diff block (one byte):
	"one byte" is basically the same as "full" with one
difference, here
	max. 8 pixels are changed (see source for how it works :)



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=1504492&group_id=37116




More information about the Scummvm-tracker mailing list