Changes between Version 1 and Version 2 of SV8Specification


Ignore:
Timestamp:
10/23/06 19:39:15 (15 years ago)
Author:
r2d
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SV8Specification

    v1 v2  
    1010This file header allow old mpc readers to stop decoding at this point, without crashing.
    1111
     12
    1213== Block formating ==
    1314
    14 All blocks are formated using Key / Length / Value.
    15 Key is 16 bits long. It's the block type.
    16 Length is a variable size field using the same values as [http://www.matroska.org/technical/specs/index.html matroska] :
     15All blocks are formated using Key / Length / Value.[[BR]]
     16Key is 16 bits long. It's the block ID.[[BR]]
     17Length is a variable size field using the same values as [http://www.matroska.org/technical/specs/index.html matroska] :[[BR]]
     18{{{
    1719bits, big-endian
    18 1xxx xxxx                                                                              - value 0 to  2^7-2
    19 01xx xxxx  xxxx xxxx                                                                   - value 0 to 2^14-2
    20 001x xxxx  xxxx xxxx  xxxx xxxx                                                        - value 0 to 2^21-2
    21 0001 xxxx  xxxx xxxx  xxxx xxxx  xxxx xxxx                                             - value 0 to 2^28-2
     201xxx xxxx                                           - value 0 to  2^7-2
     2101xx xxxx  xxxx xxxx                                - value 0 to 2^14-2
     22001x xxxx  xxxx xxxx  xxxx xxxx                     - value 0 to 2^21-2
     230001 xxxx  xxxx xxxx  xxxx xxxx  xxxx xxxx          - value 0 to 2^28-2
    2224...
    23 The length is the size of the block in bytes, including the key and size fields. So the minimum length of a block is 3.
    24 The value is the block content. Its size can be 0.
     25}}}
     26The length is the size of the block in bytes, including the key and size fields. So the minimum length of a block is 3 bytes.[[BR]]
     27The value is the block content. Its size can be 0.[[BR]]
     28All unused bits in a block MUST be 0.[[BR]]
    2529
    2630|| '''Field''' || '''length (bits)''' || '''Value''' ||
    2731|| Key || 16 || "EX" ||
    28 || Length || n * 8, 0 < n < inf || 0x1A ||
     32|| Length || n*8; 0 < n < 9 || 0x1A ||
    2933|| Value || Lentgh * 8 || "exemple" ||
     34
     35
     36== Stream information block ==
     37
     38This block key is "SI".[[BR]]
     39This block contain the informations needed to decode the stream. This block is mandatory and must be written before the first audio block.[[BR]]
     40
     41|| '''Field''' || '''length (bits)''' || '''Value''' || '''comment''' ||
     42|| CRC || 32 ||  || CRC 32 of the block (this field excluded). 0 = invalid ||
     43|| Sample count || n*8; 0 < n < 9 ||  || number of samples in the stream. 0 = unknow ||
     44|| Max used bands || 4 ||  || maximum number of bands used in the file ||
     45|| Sample Frequency || 4 ||  || see table below ||
     46|| Channel count || 4 ||  || number of channels in the stream ||
     47|| Audio block frames || 4 || 1..16 || number of frames in an audio block is : 2^Value ||
     48|| IS used || 1 ||  || Klemm specification suggest to use the number of band always using IS ? ||
     49|| MS used || 1 ||  ||  ||
     50|| True gapless || 1 ||  || always 1 ? ||
     51|| PNS used || 1 ||  ||  ||
     52|| unused || 4 ||  || must be 0 ||
     53
     54Frequency table
     55|| '''Value''' || '''Frequency (Hz)''' ||
     56|| 0 || 44100 ||
     57|| 1 || 48000 ||
     58|| 2 || 37800 ||
     59|| 3 || 32000 ||
     60|| 4 || 96000 ||
     61
     62The CRC used in this block needs to be define.
     63
     64
     65== Replay gain block ==
     66
     67This block key is "RG".[[BR]]
     68This block contains replay gain datas. If this block exists, it must be written before the first audio block.[[BR]]
     69A log scale must be used to store the values.[[BR]]
     70
     71|| '''Field''' || '''length (bits)''' || '''Value''' || '''comment''' ||
     72|| Title gain || 16 ||  || The loudness calculated for the title, ''and not the gain that the player must apply'' ||
     73|| Title peak || 16 ||  ||  ||
     74|| Album gain || 16 ||  || The loudness calculated for the album ||
     75|| Album peak || 16 ||  ||  ||
     76|| Version || 8 ||  || The replay gain version ||
     77
     78
     79== Encoder infomations ==
     80
     81This block key is "EI".
     82
     83|| '''Field''' || '''length (bits)''' || '''Value''' || '''comment''' ||
     84|| profile used || 4 || 0..15 ||  ||
     85|| unused || 4 ||  ||  ||
     86|| encoder version || 8 ||  ||  ||
     87
     88{{{
     89 Encoder version * 100  (106 = 1.06)
     90 EncoderVersion % 10 == 0        Release (1.0)
     91 EncoderVersion %  2 == 0        Beta (1.06)
     92 EncoderVersion %  2 == 1        Alpha (1.05a...z)
     93}}}
     94
     95== Audio block ==
     96
     97This block key is "AB".[[BR]]
     98This block contain audio frames. The first frame is a key frame.[[BR]]
     99The seek elements allow to jump back or forward. The block size can be used to seek 1 block forward.[[BR]]
     100
     101Seek block nb should be ( - means offset is negative) :[[BR]]
     1022 -2 3 -3 2 -2 4 -4 2 -2 3 -3 2 -2 5 -5 2 -2 3 -3 2 -2 4 -4 2 -2 3 -3 6 -6 2 -2 ...[[BR]]
     103so 2 -> 2, 3 -> 3 ... and -2 -> -2, -3 -> -3 ...[[BR]]
     104Allow to seek back and forward in O(ln(n)) time without a seeking table.[[BR]]
     105
     106|| '''Field''' || '''length (bits)''' || '''Value''' || '''comment''' ||
     107|| seek block nb || 4 || 2..17 || the number of blocks that can be skiped is 2^Value ||
     108|| seek offset || 28 || -2^27..2^27-1 || number of bytes to jump the blocks from the beginning of this block. 0 = invalid ||
     109|| audio frames || ? ||  ||  ||
     110
     111