atrac3p:serialized_envelope_y_coordinates
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
atrac3p:serialized_envelope_y_coordinates [2010/03/24 15:31] – megadiscman | atrac3p: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< | The envelope Y coordinates are values between 0 and 15, with 0 -> 2< | ||
- | 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# | + | The first Y coordinate of each envelope is encoded using [[envelope y trees# |
=== 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/ | === 3 (on master channel): Base/ | ||
- | 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# | ||
+ | * 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# | ||
+ | === 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# | ||
+ | * For each point after the first one | ||
+ | * Code from [[envelope y trees# | ||
+ | === 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: // | ||
+ | * If that bit is one: | ||
+ | * Code from [[envelope y trees# | ||
+ | * 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/ | ||
+ | * 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