Changes between Version 23 and Version 24 of SV8Specification


Ignore:
Timestamp:
11/23/06 18:18:38 (18 years ago)
Author:
r2d
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SV8Specification

    v23 v24  
    3737|| '''Block name''' || '''Key''' || '''Mandatory''' ||
    3838|| Stream information || SI || yes ||
    39 || Replay gain || RG || yes ||
    4039|| Encoder information || EI || no ||
    4140|| Audio data || AD || yes ||
     
    5150|| '''Field''' || '''length (bits)''' || '''Value''' || '''comment''' ||
    5251|| CRC || 32 ||  || CRC 32 of the block (this field excluded). 0 = invalid ||
    53 || Version || 8 || 0x08 || bitstream version ||
     52|| Info length || n*8; 0 < n < 10 ||  || length (in bytes) from this field (included) to the ReplayGain version field ||
     53|| Stream version || 8 || 0x08 || bitstream version ||
    5454|| Sample count || n*8; 0 < n < 10 ||  || number of samples in the stream. 0 = unknow ||
    55 || Sample Frequency || 4 ||  || see table below ||
     55|| Sample frequency || 4 ||  || see table below ||
    5656|| Channel count || 4 || 1..16 || number of channels in the stream ||
    5757|| Max used bands || 5 || 1..32 || maximum number of bands used in the file ||
    58 || ~~IS used~~ || ~~1~~ ||  || IntensityStereo. Klemm specification suggest to use the number of band always using IS ? From the source, this flag is always set to 0 and marked as not supported anymore. Even the decoder doesn't read it and set it to 0. This flag will be removed ||
    5958|| MS used || 1 ||  || MidSideStereo ||
    60 || ~~PNS used~~ || ~~1~~ ||  || The decoder doesn't use this information -> move it to EI block ? ||
    6159|| Audio block frames || 4 || 0..15 || number of frames in an audio block is : 2^Value^ (1..32768) ||
    6260|| Unused || 6 ||  || must be 0 ||
     61|| ReplayGain version || 8 ||  || The replay gain version - must be aligned on a byte - ||
     62|| Title gain || 16 ||  || The loudness calculated for the title, ''and not the gain that the player must apply'' ||
     63|| Title peak || 16 ||  ||  ||
     64|| Album gain || 16 ||  || The loudness calculated for the album ||
     65|| Album peak || 16 ||  ||  ||
    6366
    6467Do we need to specify the channel position ? Is there standard positions / order of the channels ?
     
    7275|| 4 || 96000 ||
    7376
    74 The CRC used in this block needs to be define.
     77The CRC used is this one : [http://www.w3.org/TR/PNG/#D-CRCAppendix http://www.w3.org/TR/PNG/#D-CRCAppendix].
    7578
    76 
    77 == Replay gain block ==
    78 
    79 This block key is "RG".[[BR]]
    80 This block contains replay gain datas. This block is mandatory and must be written before the first audio block.[[BR]]
    81 Values stored in dB in Q8.8 format (maybe Q7.9 or relative to the max value for the bitdepth is better ?).[[BR]]
    82 
    83 || '''Field''' || '''length (bits)''' || '''Value''' || '''comment''' ||
    84 || Version || 8 ||  || The replay gain version ||
    85 || Title gain || 16 ||  || The loudness calculated for the title, ''and not the gain that the player must apply'' ||
    86 || Title peak || 16 ||  ||  ||
    87 || Album gain || 16 ||  || The loudness calculated for the album ||
    88 || Album peak || 16 ||  ||  ||
     79The replay gain values are stored in dB in Q8.8 format (maybe Q7.9 or relative to the max value for the bitdepth is better ?).[[BR]]
    8980
    9081
     
    132123- The first 2 values are stored using the same code as the block length code.[[BR]]
    133124- The next values are coded as :[[BR]]
    134 code = value(n) - 2*value(n-1) + value(n-2)[[BR]]
    135 1 bit is sent for code sign, and the absolute value of code is sent as golomb code with k=10. A log code, as Fibonacci or Elias may be better, but golomb is easier to implement.
    136 
     125{{{
     126code = value(n) - 2*value(n-1) + value(n-2)
     127code <<= 1;
     128if (code < 0)
     129  code = -code | 1;
     130}}}
     131code is sent as [http://en.wikipedia.org/wiki/Golomb_code golomb code] with M = 2^12^.
    137132
    138133