User Tools

Site Tools


atrac3p:serialized_envelope_y_coordinates

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
atrac3p:serialized_envelope_y_coordinates [2010/03/24 15:31] megadiscmanatrac3p:serialized_envelope_y_coordinates [2010/10/23 17:44] (current) – add "with at least one point" like it is in the X coordinate page megadiscman
Line 2: Line 2:
  
 The envelope Y coordinates are values between 0 and 15, with 0 -> 2<sup>-6</sup>, 6 -> 1 and 15 -> 2<sup>9</sup>. The Y coordinates can be stored in different modes. The envelope Y coordinates are values between 0 and 15, with 0 -> 2<sup>-6</sup>, 6 -> 1 and 15 -> 2<sup>9</sup>. The Y coordinates can be stored in different modes.
-A mode once chosen is used for all stored envelopes.+A mode once chosen is used for all stored envelopes. Bands with 0 envelope points don't have any envelopes and thus no data stored.
  
 ==== Encoding Modes ==== ==== Encoding Modes ====
Line 10: Line 10:
  
 === 1 (on master channel): Variable length encoding using differences between points === === 1 (on master channel): Variable length encoding using differences between points ===
-The first Y coordinate of each envelope is encoded using [[envelope y trees#envelope y tree]], the following coordinates using [[envelope y trees#delta envelope tree]], applied to the previous y value in this envelope. Difference application wraps around after 15.+The first Y coordinate of each envelope is encoded using [[envelope y trees#envelope y tree]], the following coordinates using [[envelope y trees#delta tree]], applied to the previous y value in this envelope. Difference application wraps around after 15.
  
 === 1 (on slave channel): Variable length encoding using difference to master channel === === 1 (on slave channel): Variable length encoding using difference to master channel ===
Line 22: Line 22:
  
 === 3 (on master channel): Base/difference encoding === === 3 (on master channel): Base/difference encoding ===
-One base value (stored plain binary) is used for all coordinates in all bands. Every Y coordinate is obtained by adding a second number to the base value. This second number is also stored in plain binary, but with fewer bits (but the same bit count for all Y coordinates in one channel). No wraparound happens, overflow makes the data invalid.+One base value (stored plain binary) is used for all coordinates in all bands. Every Y coordinate is obtained by adding a second number to the base value. This second number is also stored in plain binary, but with fewer bits (but the same bit count for all Y coordinates in one channel, it might even be 0 bits for constant 0). No wraparound happens, overflow makes the data invalid.
  
 === 3 (on slave channel): Clone master values === === 3 (on slave channel): Clone master values ===
 The Y values for the envelopes in the slave channel are copied from the Y-values of the master channel. If an envelope in the slave channel has more points than the corresponding envelope in the master channel, the missing values are assumed as 7. The slave channel should not have more envelopes than the master channel. The Y values for the envelopes in the slave channel are copied from the Y-values of the master channel. If an envelope in the slave channel has more points than the corresponding envelope in the master channel, the missing values are assumed as 7. The slave channel should not have more envelopes than the master channel.
 +
 +===== Encoding =====
 +==== Envelope Y Coordinates ====
 +  * 2 bits encoding mode
 +=== Encoding mode 0: direct encoding ===
 +  * For each point in each envelope: 4 bits
 +=== Encoding mode 1 on master channel: variable length encoding; delta between points ===
 +  * For each envelope with at least one point
 +    * Code from [[envelope y trees#envelope y tree]] for the first Y value
 +    * For each point after the first one
 +      * Code from [[envelope y trees#delta y tree]] difference to previous Y value
 +=== Encoding mode 1 on slave channel: variable length encoding; delta to master ===
 +  * For each point in each envelope:
 +    * Code from [[envelope y trees#delta-to-master y tree]] difference to corresponding master point
 +=== Encoding mode 2 on master channel: variable length encoding; delta between envelopes ===
 +  * For each envelope with at least one point
 +    * Code from [[envelope y trees#envelope y tree]] for the first Y value
 +    * For each point after the first one
 +      * Code from [[envelope y trees#delta-to-prev-envelope y tree]] difference to corresponding point in previous envelope
 +=== Encoding mode 2 on slave channel: choose master/1 or slave/3 ===
 +  * For each envelope with at least one point: 1 bit mode selection
 +    * If that bit is zero: //nothing//, cloning like in mode 3 on slave
 +    * If that bit is one:
 +      * Code from [[envelope y trees#envelope y tree]] for the first Y value
 +      * For each point after the first one
 +        * Code from [[envelope y trees#delta y tree]] difference to previous Y value
 +=== Encoding mode 3 on master channel: base/difference ===
 +  * 2 bits: diffence bit count (call it //n//)
 +  * 4 bits: base level
 +  * for each point in each envelope
 +    * //n// bits: difference between desired value and base level
  
atrac3p/serialized_envelope_y_coordinates.1269444688.txt.gz · Last modified: 2010/03/24 15:31 by megadiscman

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki