atrac3p:serialized_envelope_x_coordinates
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
atrac3p:serialized_envelope_x_coordinates [2010/07/21 16:33] – replace copy/pasted Y mode 1/slave by real X mode 1/slave megadiscman | atrac3p:serialized_envelope_x_coordinates [2010/10/25 11:32] (current) – Mode 3/master has bit count - 1 megadiscman | ||
---|---|---|---|
Line 15: | Line 15: | ||
=== 2 (on master channel): Variable length encoding using difference between envelopes === | === 2 (on master channel): Variable length encoding using difference between envelopes === | ||
- | The first envelope is stored as in mode 0. The X coordinates of the later envelopes are stored as difference to the X coordinate of the corresponding point (with the same index) of the directly preceding envelope. In case that point is not present, it is assumed as zero for the first point in the envelope or as the previously read X value of the current envelope for later points. | + | The envelope |
=== 2 (on slave channel): Either VLC with difference between points or clone from master === | === 2 (on slave channel): Either VLC with difference between points or clone from master === | ||
Line 29: | Line 29: | ||
==== Envelope X Coordinates ==== | ==== Envelope X Coordinates ==== | ||
* 2 bits encoding mode | * 2 bits encoding mode | ||
- | ...yada yada yada... | + | === Encoding mode 0: nearly direct encoding === |
+ | * for each envelope with at least one point: | ||
+ | * 5 bits first X coordinate | ||
+ | * for each additional X coordinate: | ||
+ | * if previous X coordinate < 15: | ||
+ | * 5 bits for that X coordinate | ||
+ | * if previous X coordinate < 23: | ||
+ | * 4 bits: current X coordinate - previous X coordinate - 1 | ||
+ | * if previous X coordinate < 27: | ||
+ | * 3 bits: current X coordinate - previous X coordinate - 1 | ||
+ | * if previous X coordinate < 29: | ||
+ | * 2 bits: current X coordinate - previous X coordinate - 1 | ||
+ | * if previous X coordinate == 29: | ||
+ | * 1 bits: current X coordinate - previous X coordinate - 1 | ||
+ | * if previous X coordinate == 30: | ||
+ | * 0 bits, next X coordinate must be 31 | ||
+ | === Encoding mode 1 on master channel: variable length encoding; delta between points === | ||
+ | * for each envelope with at least one point: | ||
+ | * 5 bits first X coordinate | ||
+ | * for each additional X coordinate: | ||
+ | * if the associated Y coordinate is lower than the previous Y coordinate | ||
+ | * one code from the [[envelope x trees#delta x for decreasing y tree]] | ||
+ | * otherwise, i.e. if the associated Y coordinate is higher than the previous Y coordinate | ||
+ | * one code from the [[envelope x trees#delta x for increasing y tree]] | ||
+ | === Encoding mode 1 on slave channel: variable length encoding; difference to master === | ||
+ | * for each envelope with at least one point: | ||
+ | * one code from [[envelope x trees#delta x to master tree]] | ||
+ | * for each further point that has an associated master point | ||
+ | * if the associated Y coordinate is lower than the pevious Y coordinate | ||
+ | * one code from [[envelope x trees#delta x to master tree]] | ||
+ | * otherwise, i.e. if the associated Y coordinate is higher than the previous Y coordinate | ||
+ | * one bit chosing | ||
+ | * if that bit is 0: just copy the associated X coordinate | ||
+ | * if that bit is 1: One X coordinate encoded as in mode 0 | ||
+ | * for each remaining point (in excess of master points) (this is like mode1/ | ||
+ | * if the associated Y coordinate is lower than the previous Y coordinate | ||
+ | * one code from the [[envelope x trees#delta x for decreasing y tree]] | ||
+ | * otherwise, i.e. if the associated Y coordinate is higher than the previous Y coordinate | ||
+ | * one code from the [[envelope x trees#delta x for increasing y tree]] | ||
+ | === Encoding mode 2 on master channel: variable length encoding; delta between envelopes === | ||
+ | * First envelope as in mode 0 | ||
+ | * For each remaining envelope with at least one point | ||
+ | * one code from [[envelope x trees#delta x to previous band for decreasing y tree]] | ||
+ | * for each further point that has an associated point in the previous band | ||
+ | * if the associated Y coordinate is lower than the pevious Y coordinate | ||
+ | * one code from [[envelope x trees#delta x to previous band for decreasing y tree]] | ||
+ | * otherwise, i.e. if the associated Y coordinate is higher than the previous Y coordinate | ||
+ | * one code from [[envelope x trees#delta x to previous band for increasing y tree]] | ||
+ | * for each remaining point (in excess of master points) (this is like mode1/ | ||
+ | * if the associated Y coordinate is lower than the previous Y coordinate | ||
+ | * one code from the [[envelope x trees#delta x for decreasing y tree]] | ||
+ | * otherwise, i.e. if the associated Y coordinate is higher than the previous Y coordinate | ||
+ | * one code from the [[envelope x trees#delta x for increasing y tree]] | ||
+ | === Encoding mode 2 on slave channel: choose master/1 or slave/3 === | ||
+ | * For each envelope with points: | ||
+ | * If it does not have more points than the corresponding master envelope: | ||
+ | * 1 bit. If set it indicates that this channel should not be cloned. | ||
+ | * Otherwise the envelope is not cloned. | ||
+ | * In cloning mode: // | ||
+ | * In non-cloning mode: envelope info as in master/1: | ||
+ | * 5 bits first X coordinate | ||
+ | * for each additional X coordinate: | ||
+ | * if the associated Y coordinate is lower than the previous Y coordinate | ||
+ | * one code from the [[envelope x trees#delta x for decreasing y tree]] | ||
+ | * otherwise, i.e. if the associated Y coordinate is higher than the previous Y coordinate | ||
+ | * one code from the [[envelope x trees#delta x for increasing y tree]] | ||
+ | === Encoding mode 3 on master channel: base/ | ||
+ | * 2 bits: diffence bit count - 1 (call it //n-1//) | ||
+ | * 5 bits: base X position | ||
+ | * for each point in each envelope | ||
+ | * //n// bits: difference between desired X coordinate and (base X coordinate + current point number in the envelope) |
atrac3p/serialized_envelope_x_coordinates.1279730039.txt.gz · Last modified: 2010/07/21 16:33 by megadiscman