Real Lossless Codec

From MultimediaWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 11:17, 10 March 2012
Kostya (Talk | contribs)

← Previous diff
Revision as of 15:35, 10 March 2012
Kostya (Talk | contribs)

Next diff →
Line 21: Line 21:
Known decoder support only 1/2 channel 16-bit audio with sampling rate up to 96 kHz. Known decoder support only 1/2 channel 16-bit audio with sampling rate up to 96 kHz.
 +
 +== Frame format ==
 +
 +Data is read MSB.
 +
 +=== Block header ===
 +
 + get frame length code
 + if (stereo)
 + decoding_mode = get_bits(2) + 1;
 + else
 + decoding_mode = 0;
 +
 +Frame length code:
 +
 + 64 - 11110
 + 128 - 11111
 + 256 - 1110
 + 512 - 110
 + 1024 - 10
 + 2048 - 0
 +
 +Decoding mode specifies table sets, bits and channel recombining:
 +
 +{| border="1" cellpadding="5" style="border-collapse: collapse; border-style: dashed; border-color: #2f6fab;"
 +|- bgcolor="#f0f0f0" |
 +! Mode !! tableset1 !! bits1 !! tableset2 !! bits2 !! Channel decoupling
 +|-
 +| align="center" | 0 || align="center" | 0 || align="center" | 16 || align="center" | n/a || align="center" | n/a || align="center" | mono
 +|-
 +| align="center" | 1 || align="center" | 0 || align="center" | 16 || align="center" | 0 || align="center" | 16 || align="center" | L, R
 +|-
 +| align="center" | 2 || align="center" | 0 || align="center" | 16 || align="center" | 2 || align="center" | 17 || align="center" | L+R, R
 +|-
 +| align="center" | 3 || align="center" | 1 || align="center" | 16 || align="center" | 2 || align="center" | 17 || align="center" | L, R-L
 +|-
 +| align="center" | 4 || align="center" | 2 || align="center" | 17 || align="center" | 2 || align="center" | 17 || align="center" | (L+R)/2, (L-R)/2
 +|}
 +
[[Category:Undiscovered Audio Codecs]] [[Category:Undiscovered Audio Codecs]]
[[Category:Lossless Audio Codecs]] [[Category:Lossless Audio Codecs]]
[[Category:Audio Codecs]] [[Category:Audio Codecs]]

Revision as of 15:35, 10 March 2012

This is RealNetworks lossless audio codec.

Audio header in rm files is different from other Real audio codecs; the interface of the binary decoder is also different.


Extradata format

Numbers are stored big-endian.

bytes  0- 3 - codec FOURCC, always "LSD:"
bytes  4- 5 - version
bytes  8- 9 - number of channels
bytes 10-11 - bits per sample
bytes 12-15 - sampling rate
bytes 16-19 - block size in samples?
bytes 20-23 - ignored?

Known decoder support only 1/2 channel 16-bit audio with sampling rate up to 96 kHz.

Frame format

Data is read MSB.

Block header

 get frame length code
 if (stereo)
   decoding_mode = get_bits(2) + 1;
 else
   decoding_mode = 0;

Frame length code:

   64 - 11110
  128 - 11111
  256 - 1110
  512 - 110
 1024 - 10
 2048 - 0

Decoding mode specifies table sets, bits and channel recombining:

Mode tableset1 bits1 tableset2 bits2 Channel decoupling
0 0 16 n/a n/a mono
1 0 16 0 16 L, R
2 0 16 2 17 L+R, R
3 1 16 2 17 L, R-L
4 2 17 2 17 (L+R)/2, (L-R)/2
Personal tools