Changes between Version 5 and Version 6 of SV7Specification
- Timestamp:
- 01/02/07 20:37:12 (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
SV7Specification
v5 v6 1 1 = stream version 7 format specification = 2 2 3 The 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) 3 4 {{{ 4 Der Datenstrom ist als Strom von 32-Bit-Worten zu sehen, der dann allerdings5 von MSB her dekodiert werden. Betrachtet man das ganze als Oktet-Strom, dann6 ist die Reihenfolge der Bits die folgende (Zählung ab 1 beginnend, MSB links):7 8 5 v-----------------------v-----------------------v-----------------------v-----------------------v-----------------------v--- 9 6 |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| 10 7 ^-----------------------^-----------------------^-----------------------^-----------------------^-----------------------^--- 8 }}} 9 Because 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. 11 10 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. 11 This bit structure mainly causes problems on 16 bit and 64 bit CPUs because one always has to decode with 32 bit words. 18 12 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ß.21 13 22 }}}23 14 {{{ 24 =============================== GROBSTRUKTUR============================15 =============================== BASIC STRUCTURE ============================ 25 16 26 17 Header … … 34 25 4 bit 7 Streamversion 7 35 26 36 Signatur 37 24 bit 0x2B504D Signatur "MP+"27 Signature 28 24 bit 0x2B504D Signature "MP+" 38 29 -1------------------------------------------------------------------------ 39 30 FrameCount 40 32 bit 0...0xFFFFFFFF Anzahl der Frames, jeder Frame beinhaltet115241 Samples pro Kanal, der letzte Frame beinhaltet142 bis 1152 Samples pro Kanal. Man beachte weiterhin43 die Latenz der Analyse und Synthesefilterbank von44 481 Samples. Siehe Bemerkung2.31 32 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. 45 36 -2------------------------------------------------------------------------- 46 37 IntensityStereo 47 1 bit 0...1 normalerweise 0, bei Intensitätsstereokodierung (IS) 1.48 Derzeitig von keinem Encoder benutzt.49 S iehe Bemerkung3.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. 50 41 51 42 MidSideStereo 52 1 bit 0...1 W enn MidSideStereo verwendet wird, ist dieses Bit1,53 sonst0.43 1 bit 0...1 When MidSideStereo is in use, this bit is 1, 44 otherwise 0. 54 45 55 46 MaxBand 56 6 bit 0...32 l etztes in der gesamten Datei verwendetes Subband.57 Typi sche Werte sind 23 bis29.47 6 bit 0...32 last subband used in the whole file. 48 Typical values range from 23 to 29. 58 49 59 50 Profile 60 4 bit 0, 7...13 Verwendetes Profile51 4 bit 0, 7...13 Used profile 61 52 62 0: kein Profile53 0: no profile 63 54 1: Unstable/Experimental 64 2: un genutzt65 3: un genutzt66 4: un genutzt55 2: unused 56 3: unused 57 4: unused 67 58 5: below Telephone (q= 0.0) 68 59 6: below Telephone (q= 1.0) … … 78 69 79 70 Link 80 2 bit 00: Tit el startet und endet mit sehr niedrigem Pegel (keine Live- oder Klassiktitel)81 01: Tit el hört laut auf82 10: Tit el fängt laut an83 11: Titel fängt laut an und hört laut auf71 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 84 75 85 76 SampleFreq … … 90 81 91 82 MaxLevel 92 16 bit 0...32768 Maxim aler Pegel des kodieren PCM-Inputsignals93 S iehe Bemerkung 483 16 bit 0...32768 Maximum level of the coded PCM input signal 84 See note 4. 94 85 -3------------------------------------------------------------------------- 95 86 TitleGain 96 16 bit -32768...+32767 Veränderung des Wiedergabepegels. Wert wird als97 vorzeichenbehafteter 16-bit-Wert betrachtet und der98 Pegel wird um so viele mB (Millibel) verändert. Somit99 sind Pegeländerungen von -327.68 dB bis +327.67 dB möglich.87 16 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. 100 91 TitlePeak 101 16 bit 0...65535 Maxim aler Pegel des dekodierten Titels92 16 bit 0...65535 Maximum level of the decoded title 102 93 16422: -6 dB 103 94 32767: 0 dB … … 105 96 -4------------------------------------------------------------------------- 106 97 AlbumGain 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. 98 16 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. 113 103 AlbumPeak 114 16 bit 0...65535 Maxim aler Pegel der gesamten dekodiertenCD104 16 bit 0...65535 Maximum level of the whole decoded CD 115 105 16422: -6 dB 116 106 32767: 0 dB … … 118 108 -5------------------------------------------------------------------------- 119 109 TrueGapless 120 1 bit Wird True Gapless verwendet?121 0: n ein122 1: ja110 1 bit Is True Gapless in use? 111 0: no 112 1: yes 123 113 124 114 LastFrameLength … … 139 129 EncoderVersion % 2 == 1 Alpha (1.05a...z) 140 130 }}} 141 {{{142 AudioDaten (insgesamt FrameCount mal)143 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~144 131 145 LengthOfFrame 146 20 bit 132 == Audio Data (in total FrameCount times) == 147 133 148 FrameData 149 ? bit 134 LengthOfFrame[[br]] 135 20 bit[[br]] 136 [[br]] 137 FrameData[[br]] 138 ? bit[[br]] 150 139 151 }}}152 {{{153 Ende154 ~~~~155 LastFrameUsedSamples156 11 bit157 Siehe weiterhin Bemerkung 2158 140 159 LengthOfFrame 160 20 bit 141 == End == 142 LastFrameUsedSamples[[br]] 143 11 bit (See furthermore note 2)[[br]] 144 [[br]] 145 LengthOfFrame[[br]] 146 20 bit[[br]] 147 [[br]] 148 FrameData[[br]] 149 ? bit[[br]] 150 [[br]] 151 FillBits[[br]] 152 The 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]] 153 0...31 bit[[br]] 161 154 162 FrameData163 ? bit164 155 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) == 157 The 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) == 160 448 161 162 == Note 3 (Intensity Stereo) == 163 Intensity Stereo, if in use, has to be used from 2.75 upwards. In every frame. 164 In SV4 to 6, one was able to choose between 5.5, 8.25 or 11 kHz, but only for the whole file. 165 Which was unflexible enough. 166 Furthermore, with higher bitrates, there is the possibility that the decoder assumes undefined 167 states, because variables on which the result of decoding heavily depends aren't initialized then. 168 169 == Note 4 (Clipping) == 170 Clipping Prevention right now works in a way that the biggest sample of the PCM input 171 is saved in the mpegplus file and upon replaying one assumes that the peak level 172 is no more than 18% over the level of the PCM input (differences caused by added noise or encoding 173 fluctuations of the level).[[br]] 174 This is however a very crude approximation which sometimes attenuates the level too much or not enough.[[br]] 175 The exact maximum replay level can only be determined by doing a decode.[[br]] 176 Furthermore, note the "FS+>0 dB" problem: There are 177 overdrives of DA converters up to 3 dB possible to be caused by non-clipped samples, if 178 interpolated samples between those samples become too big.[[br]] 179 32000 32000 -32000 -32000[[br]] 180 becomes after 2x oversampling:[[br]] 181 32000 45255 32000 0 -32000 -45255 -32000 0[[br]] 182 A second problem are level changes on live albums between the tracks, if those 183 have different peak levels. In these cases, the whole album should be attenuated 184 to the required peak level.[[br]] 185