Changes between Version 30 and Version 31 of SV8Specification


Ignore:
Timestamp:
02/15/07 12:32:13 (17 years ago)
Author:
r2d
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SV8Specification

    v30 v31  
    2626All unused bits in a packet MUST be null.[[BR]]
    2727
    28 || '''Field''' || '''Size (bits)''' || '''Payload''' ||
     28|| '''Field''' || '''Size (bits)''' || '''Value''' ||
    2929|| Key || 16 || "EX" ||
    3030|| Size || n*8; 0 < n < 10 || 0x1A ||
     
    3434== Summary of reserved packet keys ==
    3535
     36Allowed chars in key are [A-Z] (65 <= value <= 90), so 676 keys are valid out of 65536 possible.
     37
    3638|| '''Packet Name''' || '''Key''' || '''Mandatory''' ||
    3739|| Stream Header || SH || yes ||
    3840|| Replaygain || RG || yes ||
    3941|| Encoder Info || EI || no ||
    40 || Edition || ED || no ||
    4142|| Seek Table Offset || SO || no ||
    4243|| Audio Packet || AP || yes ||
     
    4647== Stream Header Packet ==
    4748
    48 This packet key is "SI".[[BR]]
     49This packet key is "SH".[[BR]]
    4950It contains the informations needed to decode the stream. This block is mandatory and must be written before the first audio packet.[[BR]]
    5051
    51 || '''Field''' || '''Size (bits)''' || '''Payload''' || '''Comment''' ||
     52|| '''Field''' || '''Size (bits)''' || '''Value''' || '''Comment''' ||
    5253|| CRC || 32 ||  || CRC 32 of the block (this field excluded). 0 = invalid ||
    5354|| Stream version || 8 || 8 || Bitstream version ||
    5455|| Sample count || n*8; 0 < n < 10 ||  || Number of samples in the stream. 0 = unknown ||
     56|| Beginning silence || n*8; 0 < n < 10 ||  || Number of samples to skip at the beginning of the stream ||
     57|| End silence || n*8; 0 < n < 10 ||  || Number of samples to skip at the end of the stream ||
    5558|| Sample frequency || 3 || 0..7 || See table below ||
    5659|| Channel count || 4 || 1..16 || Number of channels in the stream ||
    5760|| Max used bands || 5 || 1..32 || Maximum number of bands used in the file ||
    5861|| MS used || 1 ||  || True if Mid Side Stereo is enabled ||
    59 || Audio block frames || 3 || 0..7 || Number of frames per audio packet (4^value=(1..16384)) ||
     62|| Audio block frames || 3 || 0..7 || Number of frames per audio packet (4^value^=(1..16384)) ||
    6063
    6164Do we need to specify the channel position ? Is there standard positions / order of the channels ?
     65
     66The SV8 stream allow only to start decoding on first packet frame, so cutting the stream require to cut on packet boundaries. Beginning / End silence fields provides more precise cutting possibilities.[[BR]]
    6267
    6368Frequency table
     
    7580It contains the necessary data needed to apply replaygain on the current stream. This packet is mandatory and must be written before the first audio packet.[[BR]]
    7681
    77 || '''Field''' || '''Size (bits)''' || '''Payload''' || '''Comment''' ||
    78 || ReplayGain version || 8 ||  || The replay gain version - must be aligned on a byte - ||
     82|| '''Field''' || '''Size (bits)''' || '''Value''' || '''Comment''' ||
     83|| ReplayGain version || 8 || 1 || The replay gain version ||
    7984|| Title gain || 16 ||  || The loudness calculated for the title, ''and not the gain that the player must apply'' ||
    8085|| Title peak || 16 ||  ||  ||
     
    8287|| Album peak || 16 ||  ||  ||
    8388
    84 The 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]]
     89The replay gain values are stored in dB in Q8.8 format.[[BR]]
     90The 0 value means that this field has not been computed (no gain must be applied in this case.[[BR]]
     91exemples :[[BR]]
     92 * Replay gain finds that this title as a loudness of 78.56 dB, it will be encoded as 78.56 * 256 ~ 20111 = 0x4E8F
     93 * For 16 bits output (range [-32767 32768]), the max is 68813 (out of range). it will be encoded as 20 * log10(68813) * 256 ~ 24769 = 0x60C1
     94 * For float output (range [-1 1]), the max is 0.96. it will be encoded as 20 * log10(0.96 * 2^15^) * 256 ~ 23029 = 0x59F5 (for peak values it is suggested to round to nearest higher integer)
    8595
    8696== Encoder Info Packet ==
     
    8898This packet key is "EI".[[BR]]
    8999
    90 || '''Field''' || '''Size (bits)''' || '''Payload''' || '''Comment''' ||
     100|| '''Field''' || '''Size (bits)''' || '''Value''' || '''Comment''' ||
    91101|| Profile || 7 || 0..15.875 || quality in 4.3 format ||
    92102|| PNS tool || 1 || True if enabled ||  ||
     
    96106
    97107
    98 == Edition Packet ==
    99 
    100 This packet key is "ED"[[BR]]
    101 The SV8 stream allow only to start decoding on first packet frame, so cutting the stream require to cut on packet boundaries. This packet
    102 provides more precise cutting possibilities.[[BR]]
    103 This packet must be written before the first audio packet.
    104 
    105 || '''Field''' || '''Size (bits)''' || '''Payload''' || '''Comment''' ||
    106 || Beginning silence || n*8; 0 < n < 10 ||  || Number of samples to skip at the beginning of the stream ||
    107 || End silence || n*8; 0 < n < 10 ||  || Number of samples to skip at the end of the stream ||
    108 
    109 
    110108== Seek Table Offset Packet ==
    111109
    112110This packet key is "SO".[[BR]]
    113 It contains an offset to the seek table packet.
     111It contains an offset to the seek table packet.[[BR]]
     112This packet must be written before the first audio packet. This packet must be present if the "ST" packet is present and is written after the first audio packet.
    114113
    115 || '''Field''' || '''Size (bits)''' || '''Payload''' || '''Comment''' ||
     114|| '''Field''' || '''Size (bits)''' || '''Value''' || '''Comment''' ||
    116115|| Offset || n*8; 0 < n < 10 ||  || Offset from this packet to the seek table packet ||
    117116
     
    122121It contains audio frames. The first frame is a key frame.[[BR]]
    123122
    124 || '''Field''' || '''Size (bits)''' || '''Payload''' || '''Comment''' ||
    125 || Audio Frames || ? ||  || n (or less if last packet) frames of audio as defined in SH packet ||
     123|| '''Field''' || '''Size (bits)''' || '''Comment''' ||
     124|| Audio Frames || ? || n (or less if last packet) frames of audio as defined in SH packet ||
    126125
    127126
     
    130129This packet key is "ST".[[BR]]
    131130
    132 || '''Field''' || '''Size (bits)''' || '''Payload''' || '''Comment''' ||
     131|| '''Field''' || '''Size (bits)''' || '''Value''' || '''Comment''' ||
    133132|| Seek Count || n*8; 0 < n < 10 ||  || Number of seek elements in this table ||
    134133|| Seek Distance || 4 || 0..15 || Distance between referenced blocks = 2^Value^ ||
     
    137136Format of seek data :[[BR]]
    138137
    139 - Reference offset for seeking is the musepack magic number[[BR]]
    140 - First 2 values are stored using the same code as the packet size code.[[BR]]
    141 - Next values are coded as :[[BR]]
     138 * Reference offset for seeking is the musepack magic number
     139 * First 2 values are stored using the same code as the packet size code.
     140 * Next values are coded as :
    142141{{{
    143142code = value(n) - 2*value(n-1) + value(n-2)