Open main menu

Difference between revisions of "Cine/Specifications"

154 bytes added ,  17:28, 16 June 2008
Added subheadings to the "Bit sequences in the compressed stream" section.
m (Fixed heading levels.)
(Added subheadings to the "Bit sequences in the compressed stream" section.)
Line 143: Line 143:
depleted of bits then another chunk is read in etc. Each chunk's least significant
depleted of bits then another chunk is read in etc. Each chunk's least significant
bit is the first bit read from it, the most significant bit is the last bit read from it etc.
bit is the first bit read from it, the most significant bit is the last bit read from it etc.
=====First 32-bit chunk=====


Because of the way the Delphine's decompressor routine handled the bit stream the first
Because of the way the Delphine's decompressor routine handled the bit stream the first
Line 158: Line 160:
So all the less significant bits than the first chunk's highest set bit are valid source stream
So all the less significant bits than the first chunk's highest set bit are valid source stream
bits (That means the highest set bit in the first chunk is always discarded).  
bits (That means the highest set bit in the first chunk is always discarded).  
=====Command length=====


First bit of a command always tells how many bits the whole command takes.
First bit of a command always tells how many bits the whole command takes.
If the first bit of a command is zero, then the whole command (Including the
If the first bit of a command is zero, then the whole command (Including the
first bit) takes two bits total, otherwise it takes three bits (i.e. the first bit is one).
first bit) takes two bits total, otherwise it takes three bits (i.e. the first bit is one).
=====Command types=====


There are two possible types of commands:
There are two possible types of commands:
Line 171: Line 177:
Commands may have predefined values or a restricted value range for some of their parameters.
Commands may have predefined values or a restricted value range for some of their parameters.
If a command's parameter isn't a predefined value then it is read from the source stream.
If a command's parameter isn't a predefined value then it is read from the source stream.
=====All possible commands=====


Here are all the possible commands (Including their first bit that tells the command's length):
Here are all the possible commands (Including their first bit that tells the command's length):
Line 183: Line 191:
1 1 0 => copyRelocatedBytes(12 bits, 8 bits + 1) i.e. copyRelocatedBytes(0..4095, 1..256)
1 1 0 => copyRelocatedBytes(12 bits, 8 bits + 1) i.e. copyRelocatedBytes(0..4095, 1..256)
</pre>
</pre>
=====Examples of parsing commands=====


Some examples of parsing the commands:
Some examples of parsing the commands:
417

edits