Changes between Version 5 and Version 6 of SV7Specification


Ignore:
Timestamp:
01/02/07 20:37:12 (18 years ago)
Author:
r2d
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SV7Specification

    v5 v6  
    11= stream version 7 format specification =
    22
     3The data stream is to be seen as a stream of 32 bit words, which is however decoded starting from the MSB. If you regard it as an octet stream, then the order of bits is as follows: (Counting starts from 1, MSB on the left)
    34{{{
    4 Der Datenstrom ist als Strom von 32-Bit-Worten zu sehen, der dann allerdings
    5 von MSB her dekodiert werden. Betrachtet man das ganze als Oktet-Strom, dann
    6 ist die Reihenfolge der Bits die folgende (Zählung ab 1 beginnend, MSB links):
    7 
    85v-----------------------v-----------------------v-----------------------v-----------------------v-----------------------v---
    96|25|26|27|28|29|30|31|32|17|18|19|20|21|22|23|24| 9|10|11|12|13|14|15|16| 1| 2| 3| 4| 5| 6| 7| 8|57|58|59|60|61|62|63|64|49|
    107^-----------------------^-----------------------^-----------------------^-----------------------^-----------------------^---
     8}}}
     9Because of different means of access one has to determine the stream version through another mechanism, because you can access the magic number too late (sic) through this structure. Furthermore, since there are nearly no stream versions below 7 out in the field, and even if they were out there, their quality is suboptimal, only SV7 is described here.
    1110
    12 Auf Grund unterschiedlicher Zugriffsmechanismen muß man die Streamversion
    13 über einen anderen Machanismus bestimmen, da durch diese Struktur man zu
    14 spät auf die Magic Number zugreifen kann. Da weiterhin kaum Streamversionen unterhalb
    15 von Version 7 im Feld zu finden sind, und selbst wenn sie zu finden wären,
    16 deren Klangqualität zu wünschen übrig läßt, wird im folgenden nur
    17 Streamversion 7 beschrieben.
     11This bit structure mainly causes problems on 16 bit and 64 bit CPUs because one always has to decode with 32 bit words.
    1812
    19 Diese Bitstruktur macht vor allem auch Probleme auf 16 bit und 64 bit CPUs,
    20 da immer mit 32 bit-Worten dekodiert werden muß.
    2113
    22 }}}
    2314{{{
    24 =============================== GROBSTRUKTUR ============================
     15=============================== BASIC STRUCTURE ============================
    2516
    2617Header
     
    3425 4 bit   7               Streamversion 7
    3526
    36 Signatur
    37 24 bit   0x2B504D        Signatur "MP+"
     27Signature
     2824 bit   0x2B504D        Signature "MP+"
    3829-1------------------------------------------------------------------------
    3930FrameCount
    40 32 bit   0...0xFFFFFFFF  Anzahl der Frames, jeder Frame beinhaltet 1152
    41                          Samples pro Kanal, der letzte Frame beinhaltet 1
    42                          bis 1152 Samples pro Kanal. Man beachte weiterhin
    43                          die Latenz der Analyse und Synthesefilterbank von
    44                          481 Samples. Siehe Bemerkung 2.
     3132 bit   0...0xFFFFFFFF  Number of frames, every frame contains 1152
     32                         samples per channel, the last frame contains 1
     33                         to 1152 samples per channel. Furthermore, one has to consider
     34                         the latency of the analysis and the synthesis filterbank of
     35                         481 samples. See note 2.
    4536-2-------------------------------------------------------------------------
    4637IntensityStereo
    47  1 bit   0...1           normalerweise 0, bei Intensitätsstereokodierung (IS) 1.
    48                          Derzeitig von keinem Encoder benutzt.
    49                          Siehe Bemerkung 3.
     38 1 bit   0...1           usually 0, when using intensity stereo coding (IS) 1.
     39                         Not used by any encoder right now.
     40                         See note 3.
    5041
    5142MidSideStereo
    52  1 bit   0...1           Wenn MidSideStereo verwendet wird, ist dieses Bit 1,
    53                          sonst 0.
     43 1 bit   0...1           When MidSideStereo is in use, this bit is 1,
     44                         otherwise 0.
    5445
    5546MaxBand
    56  6 bit   0...32          letztes in der gesamten Datei verwendetes Subband.
    57                          Typische Werte sind 23 bis 29.
     47 6 bit   0...32          last subband used in the whole file.
     48                         Typical values range from 23 to 29.
    5849
    5950Profile
    60  4 bit   0, 7...13       Verwendetes Profile
     51 4 bit   0, 7...13       Used profile
    6152
    62                             0: kein Profile
     53                            0: no profile
    6354                            1: Unstable/Experimental
    64                             2: ungenutzt
    65                             3: ungenutzt
    66                             4: ungenutzt
     55                            2: unused
     56                            3: unused
     57                            4: unused
    6758                            5: below Telephone (q= 0.0)
    6859                            6: below Telephone (q= 1.0)
     
    7869
    7970Link
    80  2 bit                   00: Titel startet und endet mit sehr niedrigem Pegel (keine Live- oder Klassiktitel)
    81                          01: Titel hört laut auf
    82                          10: Titel fängt laut an
    83                          11: Titel fängt laut an und hört laut auf
     71 2 bit                   00: Title starts or ends with a very low level (no live or classical genre titles)
     72                         01: Title ends loudly
     73                         10: Title starts loudly
     74                         11: Titel starts loudly and ends loudly
    8475
    8576SampleFreq
     
    9081
    9182MaxLevel
    92 16 bit   0...32768       Maximaler Pegel des kodieren PCM-Inputsignals
    93                          Siehe Bemerkung 4
     8316 bit   0...32768       Maximum level of the coded PCM input signal
     84                         See note 4.
    9485-3-------------------------------------------------------------------------
    9586TitleGain
    96 16 bit   -32768...+32767 Veränderung des Wiedergabepegels. Wert wird als
    97                          vorzeichenbehafteter 16-bit-Wert betrachtet und der
    98                          Pegel wird um so viele mB (Millibel) verändert. Somit
    99                          sind Pegeländerungen von -327.68 dB bis +327.67 dB möglich.
     8716 bit   -32768...+32767 Change in the replay level. Value is treated as
     88                         signed 16 bit value and the level
     89                         is changed by that many mB (Millibel). Thus
     90                         level changes of -327.68 dB to +327.67 dB are possible.
    10091TitlePeak
    101 16 bit   0...65535       Maximaler Pegel des dekodierten Titels
     9216 bit   0...65535       Maximum level of the decoded title
    10293                         16422: -6 dB
    10394                         32767:  0 dB
     
    10596-4-------------------------------------------------------------------------
    10697AlbumGain
    107 16 bit   -32768...32767  Veränderung des Wiedergabepegels, wenn die ganze
    108                          CD mit gleicher Pegelveränderung abgespielt werden soll.
    109                          Wert wird als
    110                          vorzeichenbehafteter 16-bit-Wert betrachtet und der
    111                          Pegel wird um so viele mB (Millibel) verändert. Somit
    112                          sind Pegeländerungen von -327.68 dB bis +327.67 dB möglich.
     9816 bit   -32768...32767  Change in the replay level if the whole cd is supposed to
     99                         be played with the same level change for all tracks.
     100                         Value is treated as signed 16 bit value
     101                         and the level is attenuated by that many mB (Millibel)
     102                         Thus, level changes of -327.68 dB to +327.67 dB are possible.
    113103AlbumPeak
    114 16 bit   0...65535       Maximaler Pegel der gesamten dekodierten CD
     10416 bit   0...65535       Maximum level of the whole decoded CD
    115105                         16422: -6 dB
    116106                         32767:  0 dB
     
    118108-5-------------------------------------------------------------------------
    119109TrueGapless
    120  1 bit                   Wird True Gapless verwendet?
    121                          0: nein
    122                          1: ja
     110 1 bit                   Is True Gapless in use?
     111                         0: no
     112                         1: yes
    123113
    124114LastFrameLength
     
    139129                        EncoderVersion %  2 == 1        Alpha (1.05a...z)
    140130}}}
    141 {{{
    142 AudioDaten (insgesamt FrameCount mal)
    143 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    144131
    145 LengthOfFrame
    146 20 bit
     132== Audio Data (in total FrameCount times) ==
    147133
    148 FrameData
    149  ? bit
     134LengthOfFrame[[br]]
     13520 bit[[br]]
     136[[br]]
     137FrameData[[br]]
     138? bit[[br]]
    150139
    151 }}}
    152 {{{
    153 Ende
    154 ~~~~
    155 LastFrameUsedSamples
    156 11 bit
    157                          Siehe weiterhin Bemerkung 2
    158140
    159 LengthOfFrame
    160 20 bit
     141== End ==
     142LastFrameUsedSamples[[br]]
     14311 bit (See furthermore note 2)[[br]]
     144[[br]]
     145LengthOfFrame[[br]]
     14620 bit[[br]]
     147[[br]]
     148FrameData[[br]]
     149? bit[[br]]
     150[[br]]
     151FillBits[[br]]
     152The last data word needs to be filled, even if only one bit of it is in use, because this bit is in the last byte of the word in this case.[[br]]
     1530...31 bit[[br]]
    161154
    162 FrameData
    163  ? bit
    164155
    165 FillBits
    166 0...31 bit              Das letzte Datenwort muß aufgefüllt werden, auch
    167                         wenn nur 1 bit davon genutzt wird, da dieses Bit
    168                         in diesem Fall im letzten Byte des Wortes liegt.
    169 }}}
     156== Note 1 (Order of bits) ==
     157The bit order can only be decoded on a 16 or 64 bit CPU with difficulties.
     158
     159== Note 2 (Effects of the filter bank delay) ==
     160448
     161
     162== Note 3 (Intensity Stereo) ==
     163Intensity Stereo, if in use, has to be used from 2.75 upwards. In every frame.
     164In SV4 to 6, one was able to choose between 5.5, 8.25 or 11 kHz, but only for the whole file.
     165Which was unflexible enough.
     166Furthermore, with higher bitrates, there is the possibility that the decoder assumes undefined
     167states, because variables on which the result of decoding heavily depends aren't initialized then.
     168
     169== Note 4 (Clipping) ==
     170Clipping Prevention right now works in a way that the biggest sample of the PCM input
     171is saved in the mpegplus file and upon replaying one assumes that the peak level
     172is no more than 18% over the level of the PCM input (differences caused by added noise or encoding
     173fluctuations of the level).[[br]]
     174This is however a very crude approximation which sometimes attenuates the level too much or not enough.[[br]]
     175The exact maximum replay level can only be determined by doing a decode.[[br]]
     176Furthermore, note the "FS+>0 dB" problem: There are
     177overdrives of DA converters up to 3 dB possible to be caused by non-clipped samples, if
     178interpolated samples between those samples become too big.[[br]]
     179  32000 32000 -32000 -32000[[br]]
     180becomes after 2x oversampling:[[br]]
     181  32000 45255 32000 0 -32000 -45255 -32000 0[[br]]
     182A second problem are level changes on live albums between the tracks, if those
     183have different peak levels. In these cases, the whole album should be attenuated
     184to the required peak level.[[br]]
     185