1、INTERNATIONAL STANDARD ISO/IEC 11172-3 First edition 1993-08-01 Information technology - Coding of moving pictures and associated audio for digital storage media at up to about I,5 Mbit/s - Part 3: Audio Technologies de /information - Codage de /image animee et du son associ6 pour /es supports de st
2、ockage num lbig_values*2+countl*4; 1+=4) ( hcodlvlIwlllxlIlyll if (v!=O) signv if (w!=o) signw if (x!=O) signx if (y!=O) signy isl = v isl+l = w isl+2 = x isl+3 = y I for (; 1576; I+) isl = 0 019 113 1 113 1 16 bslbf 1 bslbf 1 bslbf 1 bslbf 1 bslbf bslbf uimsbf bslbf uimsbf bslbf 2.4.1.8 Ancillary d
3、ata sy11tax ancihyJata() ( if (layer = 1) II (layer = 2) for (b=O; bno-of-ancillary-bits; b+) ancillary-bit 1 No. of bits Mnemonic 1 bslbf 19 Copyright American National Standards Institute Provided by IHS under license with ANSINot for ResaleNo reproduction or networking permitted without license f
4、rom IHS-,-,-ISO/IEC 11172-3: 1993 (E) 0 ISO/IEC 2.4.2 Semantics for the audio bitstream syntax 2.4.2.1 Audio sequence general frame - Layer I and Layer II: Part of the bitstream that is decodable by itself. In Layer I it contains information for 384 samples and in Layer II for 1 152 samples. It star
5、ts with a syncword, and ends just before the next syncword. It consists of an integer number of slots (four bytes in Layer I, one byte in Layer II). - Layer III: Part of the bitstream that is decodable with the use of previously acquired mJn information. In Layer III it contains information for 1 15
6、2 samples. Although the distance between the start of consecutive syncwords is an integer number of slots (one byte in Layer III), the audio information belonging to one frame is generally not contained between two successive syncwords. 2.4.2.2 Audio frame header - Part of the bitstream containing s
7、ynchronization and state information. error-check - Part of the bitstream containing information for error detection. audio-data - Part of the bitstream containing information on the audio samples. ancillary-data - P,art of the bitstream that may be used for ancillary data. 2.4.2.3 Header The Fist 3
8、2 bits (four bytes) are header information which is common to all layers. syncword - The bit string 1111 1111 1111. ID - One bit to indicate the ID of the algorithm. Equals 1 for ISO/IEC 11172-3 audio, 0 is reserved. Layer - 2 bits to indicate which layer is used, according to the following. To ch,a
9、nge the layer, a reset of the audio decoder may bc required. protection-bit - One bit to indicate whether redundancy has been added in the audio bitstreCam to facilitate error detection and concealment. Equals 1 if no redundancy has been added, 0 if redundancy has been added bitrate-index - Indicate
10、s the bitrate. The all zero value indicates the free format condition, in which a fixed bitrate which does not need to be in the list can be used. Fixed means that a frame contains either N or N+l slots, depending on the value of the padding bit. The bitrate-index is an index to a table, which is di
11、fferent for the different layers. The bitrate-index indicates the total bitrate irrespective of the mode (stereo, joint-stereo, dual-chzumel, single-channel). 20 Copyright American National Standards Institute Provided by IHS under license with ANSINot for ResaleNo reproduction or networking permitt
12、ed without license from IHS-,-,-0 ISOAEC ISOAEC 11172-3: 1993 (E) bitrate-index 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 I 101 1110 1111 bitrate specified (kbits/s) Layer I !itx tie tk!e 32 32 32 64 48 40 96 56 48 128 64 56 160 80 64 192 96 80 224 112 96 256 128 112 288 160 1
13、28 320 192 160 352 224 192 384 256 224 416 320 256 448 384 320 fofiidden forbidden forbidden Layer II Layer III L In order to provide the smallest possible delay and complexity, the decoder is not required to support a continuously variable bitrate when in Layer I or II. Layer III supports variable
14、bitrate by switching the bitrate-index. The switching of the b padding = 110; for each subsequent audio frame: if (Layer = 1) dif = (12 * bitrate) % sampling-frequency; else dif = (144 * bitmte) % sampling-frequency; rest = rest - dif; if (rest c 0) ( padding = yes; rest = rest + samplingfrequency;
15、I else padding = no; private-bit - Bit for private use. This bit will not be used in the future by ISO/IEC. mode - Indicates the mode according to the following table. In Layer I and II the joint-stereo mode is intensity-stereo, in Layer III it is intensity-stereo and/or ms-stereo. -1 jomt-stereo (u
16、itensity-stereo and/or ms-stereo) In Layer I, in all modes except joint stereo, the value of bound equals 32. In layer II, in all modes except joint-stereo, the value of bound equals sblimit. In joint-stereo mode the bound is determined by the mode_extension. mode-extension - These bits are used in
17、joint-stereo mode. In Layer I and II they indicate which subbands are in intensity-stereo. All other subbands are coded in stereo. mode-extension 00 subbands 4-3 1 in intensity-stereo, bound=4 01 subbands 8-3 1 in intensity-stereo, bound=8 10 subb,ands 12-31 in intensity-stereo, bound=12 11 subbands
18、 16-3 1 in intensity-stereo, bound=16 In Layer III they indicate which type of joint stereo coding method is applied. The frequency ranges over which the intensity-stereo and ms-stereo modes are applied are implicit in the algorithm. For more infonnation see 2.4.3.4. mode-extension intensity-stereo
19、00 Off 01 011 10 Off ms-stereo Off Off 011 I 11 I 011 I 011 I 22 Copyright American National Standards Institute Provided by IHS under license with ANSINot for ResaleNo reproduction or networking permitted without license from IHS-,-,-0 ISOAEC ISOAEC 11172-3: 1993 (E) Note that the mode “stereo” is
20、used if the mode bits specify stereo or equivalently if the mode bits specify joint stereo and the mode-extension specifies intensity-stereo “off” and ms-stereo “off”. copyright - If this bit equals O, there is no copyright on the ISO/IEC 11172-3 bitstream, 1 means copyright protected. original/copy
21、 - This bit equals 0 if the bitstream is a copy, 1 if it is an original. emphasis - Indicates the type of de-emphasis that shall be used. di 2.4.2.4 Error check crc-check - A 16 bit parity-check word is used for optional error detection within the encoded bitstream. 2.4.2.5 Audio data, Layer I alloc
22、ationchsb - Indicates the number of bits used to code the samples in subband sb of channel ch. For subbands in intensity-stereo mode the bitstream comils only one allocation data element per subband. allocationchsb bits per sample 0 0 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 1
23、5 15 forbidden Note: For code 0000 no samples are transferred. scalefactorchsb - Indicates the factor of subband sb of channel ch by which the requantized samples of subband sb in channel ch shall be multiplied. The six bits constitute an unsigned integer, index to table B.l “Layer I, II scalefactor
24、s”. samplechsbs - Coded representation of the s-th sample in subband sb of channel ch. For subbands in intensity-stereo mode the coded representation of the sample is valid for both channels. 2.4.2.6 Audio data, Layer II allocationchsb - Corltails infonnation concerning the quantizers used for the s
25、amples in subband sb in ch,annel ch, whether the infonnation on three consecutive samples has been grouped to one code, and on the number of bits used to code the samples. The meaning and length of this field depends on the number of the subband, the bitrate, and the sampling frequency. The bits in
26、this field form an unsigned integer used as an index to the relevant table in table B.2 “Layer II bit allocation tables”, which gives the number of levels used for quantization. For subbands in intensity-stereo mode the bitstream contains only one allocation data element per subband. 23 Copyright Am
27、erican National Standards Institute Provided by IHS under license with ANSINot for ResaleNo reproduction or networking permitted without license from IHS-,-,-ISOIIEC 11172-3: 1993 (E) 0 ISO/IEC scfsichsb - Scalefactor selection infonnation. This gives infonnation on the number of scalefactors transf
28、erred for subband sb in channel ch and for which ptarts of the signal in this frame they are valid. The frame is divided into three equal parts of 12 subband samples each per subband. scfsisb 00 three scalefactors transmitted, for parts 0,1,2 respectively. 01 two scalefactors transmitted, first one
29、valid for parts 0 and 1, second one for part 2. 10 one scalefactor transmitted, valid for all three parts. 11 two scalefactors transmitted, fust one valid for part 0, the second one for parts 1 and 2. scalefactorchsbp - Indicates the factor by which the requantized samples of subband sb in channel c
30、h and of part p of the frame should be multiplied. The six bits constitute an unsigned integer, index to table B .l “Layer I, II scalefactors. groupingchsb - Is a function that determines, whether grouping is in effect for coding of s,amples in subband sb of channel ch. Grouping means, that three co
31、nsecutive samples (a triplet) of the current subband sb in ch,annel ch in the current granule gr are coded and transmitted using one common codeword and not using three separate codewords. Groupingchsb is true, if in the Bit Allocation table currently in use (see B.2) the value found under the sb (r
32、ow) and the allocationsb (column) is either 3, 5, or 9. Otherwise it is false. For subbands in intensity-stereo mode the grouping is valid for both channels. samplecodechsbgr - Coded representation of the three consecutive sCampIes in the granule gr in subband sb of channel ch. For subbands in inten
33、sity-stereo mode the coded representation of the samplecode is valid for both channels. samplechlsbs - Coded representation of the s-tb sCampIe in subband sb of channel ch. For subbands in intensity-stereo mode the coded representation of the sample is valid for both channels. 2.4.2.7 Audio data, La
34、yer Ill main-data-begin - The value of main-data-begin is used to determine the location of the first bit of main data of a frame. The mahi-data-begin value specifies the location as a negative offset in bytes from the first byte of the audio sync word. The number of bytes belonging to the header an
35、d side infonnation is not taken into account. For example, if main-data-begin = 0, then main data starts after the side infonnation. Examples are given in figure A.7.a and tigure A.7.b. private-bits - Bits for private use. These bits will not be used in the future by ISO/IEC. The number of private-b
36、its depends on the number of channels. The number of bits allocated for private-bits is detennined to equalize the total number of bits used for side-infonnation. scfsichscfsi-band - In Layer III, the scalefactor selection infonnation works simiharly to audio Layer II. The main difference is the use
37、 of the variable scfsi-band to apply scfsi to groups of scalefactors instead of single scalefactors. The application of scalefactors to granules is controlled by scfsi. 24 Copyright American National Standards Institute Provided by IHS under license with ANSINot for ResaleNo reproduction or networking permitted without license from IHS-,-,-