User Tools

Site Tools


atrac3p:serialized_envelope_point_counts

Serialized envelope point counts

The point counts for the envelopes may be stored in four different modes, some of them different for the master and slave channel.

Encoding modes

0: Direct encoding

Plain encoding as 3-bit numbers.

1: Variable length encoding

Each envelope point count is encoded independently using a variable-length encoding.

2 (on master channel): Variable length delta encoding

The first point count is stored as in Mode 1, the later ones by encoding the difference to the previous point code using a variable length code. Delta application uses wrap-around after 7.

2 (on slave channel): Variable length delta-to-master encoding

Each envelope point count is encoded as difference to the envelope point count of the corresponding envelope of the master channel (which is zero for non-existing envelopes). Delta application wraps around after 7.

3 (on master channel): Base/delta encoding

The bit count for deltas is stored plain, as is the base value. Then for all stored envelope the delta to the base value is stored in a direct binary encoding. Delta application does not wrap around. Values > 7 are illegal, but possible.

3 (on slave channel): Copy from master

The point counts are cloned from the master channel. If the slave channel has more enveloped bands than the master channel, point counts of zero would be added which is useless.

Encoding

Serialized point counts

  • Two bits: coding mode

Coding mode 0: direct encoding

  • for each stored envelope:
    • 3 bits point count

Coding mode 1: variable length encoding

Coding mode 2 on master channel: variable length delta to previous encoding

Coding mode 2 on slave channel: variable length delta to master encoding

Coding mode 3 on master channel:

  • two bits: delta size d
  • three bits: base count b
  • for each stored envelope
    • d bits binary number giving the number of points more than b

Coding mode 3 on slave:

  • nothing
atrac3p/serialized_envelope_point_counts.txt · Last modified: 2010/03/20 15:05 by megadiscman

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki