1、 ETSI TS 102 366 V1.4.1 (2017-09) Digital Audio Compression (AC-3, Enhanced AC-3) Standard TECHNICAL SPECIFICATION ETSI ETSI TS 102 366 V1.4.1 (2017-09)2 Reference RTS/JTC-041 Keywords audio, broadcasting, coding, digital ETSI 650 Route des Lucioles F-06921 Sophia Antipolis Cedex - FRANCE Tel.: +33
2、4 92 94 42 00 Fax: +33 4 93 65 47 16 Siret N 348 623 562 00017 - NAF 742 C Association but non lucratif enregistre la Sous-Prfecture de Grasse (06) N 7803/88 Important notice The present document can be downloaded from: http:/www.etsi.org/standards-search The present document may be made available i
3、n electronic versions and/or in print. The content of any electronic and/or print versions of the present document shall not be modified without the prior written authorization of ETSI. In case of any existing or perceived difference in contents between such versions and/or in print, the only prevai
4、ling document is the print of the Portable Document Format (PDF) version kept on a specific network drive within ETSI Secretariat. Users of the present document should be aware that the document may be subject to revision or change of status. Information on the current status of this and other ETSI
5、documents is available at https:/portal.etsi.org/TB/ETSIDeliverableStatus.aspx If you find errors in the present document, please send your comment to one of the following services: https:/portal.etsi.org/People/CommiteeSupportStaff.aspx Copyright Notification No part may be reproduced or utilized i
6、n any form or by any means, electronic or mechanical, including photocopying and microfilm except as authorized by written permission of ETSI. The content of the PDF version shall not be modified without the written authorization of ETSI. The copyright and the foregoing restriction extend to reprodu
7、ction in all media. ETSI 2017. European Broadcasting Union 2017. All rights reserved. DECTTM, PLUGTESTSTM, UMTSTMand the ETSI logo are trademarks of ETSI registered for the benefit of its Members. 3GPPTM and LTE are trademarks of ETSI registered for the benefit of its Members and of the 3GPP Organiz
8、ational Partners. oneM2M logo is protected for the benefit of its Members. GSM and the GSM logo are trademarks registered and owned by the GSM Association. ETSI ETSI TS 102 366 V1.4.1 (2017-09)3 Contents Intellectual Property Rights 17g3Foreword . 17g3Modal verbs terminology 17g3Introduction 18g31 S
9、cope 21g32 References 21g32.1 Normative references . 21g32.2 Informative references 21g33 Definitions and abbreviations . 22g33.1 Definitions 22g33.2 Abbreviations . 24g34 Bit stream syntax 27g34.1 Synchronization frame . 27g34.2 Semantics of syntax specification. 27g34.3 Syntax specification . 28g3
10、4.3.0 AC-3_bit_stream and syncframe 28g34.3.1 syncinfo - Synchronization information . 28g34.3.2 bsi - Bit stream information 28g34.3.3 audblk - Audio block 29g34.3.4 auxdata - Auxiliary data 32g34.3.5 errorcheck - Error detection code . 32g34.4 Description of bit stream elements . 32g34.4.0 Introdu
11、ction. 32g34.4.1 syncinfo - Synchronization information . 32g34.4.1.1 syncword - Synchronization word - 16 bits . 32g34.4.1.2 crc1 - Cyclic redundancy check 1 bit to 16 bits 32g34.4.1.3 fscod - Sample rate code - 2 bits . 33g34.4.1.4 frmsizecod - Frame size code - 6 bits 33g34.4.2 bsi - Bit stream i
12、nformation 33g34.4.2.1 bsid - Bit stream identification - 5 bits 33g34.4.2.2 bsmod - Bit stream mode - 3 bits 33g34.4.2.3 acmod - Audio coding mode - 3 bits . 33g34.4.2.4 cmixlev - Centre mix level - 2 bits 34g34.4.2.5 surmixlev - Surround mix level - 2 bits . 34g34.4.2.6 dsurmod - DolbySurround mod
13、e - 2 bits . 34g34.4.2.7 lfeon - Low frequency effects channel on - 1 bit . 35g34.4.2.8 dialnorm - Dialogue normalization - 5 bits . 35g34.4.2.9 compre - Compression gain word exists - 1 bit . 35g34.4.2.10 compr - Compression gain word - 8 bits . 35g34.4.2.11 langcode - Language code exists - 1 bit
14、35g34.4.2.12 langcod - Language code - 8 bits 35g34.4.2.13 audprodie - Audio production information exists - 1 bit . 35g34.4.2.14 mixlevel - Mixing level - 5 bits . 36g34.4.2.15 roomtyp - Room type - 2 bits 36g34.4.2.16 dialnorm2 - Dialogue normalization, Ch2 - 5 bits . 36g34.4.2.17 compr2e - Compre
15、ssion gain word exists, Ch2 - 1 bit 36g34.4.2.18 compr2 - Compression gain word, Ch2 - 8 bits. 36g34.4.2.19 langcod2e - Language code exists, Ch2 - 1 bit 36g34.4.2.20 langcod2 - Language code, Ch2 - 8 bits 36g34.4.2.21 audprodi2e - Audio production information exists, Ch2 - 1 bit 36g34.4.2.22 mixlev
16、el2 - Mixing level, Ch2 - 5 bits 36g34.4.2.23 roomtyp2 - Room type, Ch2 - 2 bits 37g34.4.2.24 copyrightb - Copyright bit - 1 bit 37g3ETSI ETSI TS 102 366 V1.4.1 (2017-09)4 4.4.2.25 origbs - Original bit stream - 1 bit . 37g34.4.2.26 timecod1e, timecod2e - Time code (first and second) halves exists -
17、 2 bits . 37g34.4.2.27 timecod1 - Time code first half - 14 bits . 37g34.4.2.28 timecod2 - Time code second half - 14 bits 37g34.4.2.29 addbsie - Additional bit stream information exists - 1 bit . 37g34.4.2.30 addbsil - Additional bit stream information length - 6 bits . 37g34.4.2.31 addbsi - Additi
18、onal bit stream information - (addbsil + 1) x 8) bits 37g34.4.3 audblk - Audio block 38g34.4.3.1 blkswch - Block switch flag - 1 bit . 38g34.4.3.2 dithflagch - Dither flag - 1 bit . 38g34.4.3.3 dynrnge - Dynamic range gain word exists - 1 bit 38g34.4.3.4 dynrng - Dynamic range gain word - 8 bits . 3
19、8g34.4.3.5 dynrng2e - Dynamic range gain word exists, Ch2 - 1 bit 38g34.4.3.6 dynrng2 - dynamic range gain word, Ch2 - 8 bits . 38g34.4.3.7 cplstre - Coupling strategy exists - 1 bit 38g34.4.3.8 cplinu - Coupling in use - 1 bit 38g34.4.3.9 chincplch - Channel in coupling - 1 bit 38g34.4.3.10 phsflgi
20、nu - Phase flags in use - 1 bit . 38g34.4.3.11 cplbegf - Coupling begin frequency code - 4 bits . 39g34.4.3.12 cplendf - Coupling end frequency code - 4 bits 39g34.4.3.13 cplbndstrcsbnd - Coupling band structure - 1 bit 39g34.4.3.14 cplcoech - Coupling coordinates exist - 1 bit . 39g34.4.3.15 mstrcp
21、lcoch - Master coupling coordinate - 2 bits . 40g34.4.3.16 cplcoexpchbnd - Coupling coordinate exponent - 4 bits 40g34.4.3.17 cplcomantchbnd - Coupling coordinate mantissa - 4 bits 40g34.4.3.18 phsflgbnd - Phase flag - 1 bit 40g34.4.3.19 rematstr - Rematrixing strategy - 1 bit 40g34.4.3.20 rematflgr
22、bnd - Rematrix flag - 1 bit . 40g34.4.3.21 cplexpstr - Coupling exponent strategy - 2 bits . 40g34.4.3.22 chexpstrch - Channel exponent strategy - 2 bits . 41g34.4.3.23 lfeexpstr - Low frequency effects channel exponent strategy - 1 bit . 41g34.4.3.24 chbwcodch - Channel bandwidth code - 6 bits . 41
23、g34.4.3.25 cplabsexp - Coupling absolute exponent - 4 bits . 41g34.4.3.26 cplexpsgrp - Coupling exponents - 7 bits . 41g34.4.3.27 expschgrp - Channel exponents - 4 bits or 7 bits . 41g34.4.3.28 gainrngch - Channel gain range code - 2 bits . 41g34.4.3.29 lfeexpsgrp - Low frequency effects channel exp
24、onents - 4 bits or 7 bits 41g34.4.3.30 baie - Bit allocation information exists - 1 bit . 41g34.4.3.31 sdcycod - Slow decay code - 2 bits . 41g34.4.3.32 fdcycod - Fast decay code - 2 bits . 42g34.4.3.33 sgaincod - Slow gain code - 2 bits . 42g34.4.3.34 dbpbcod - dB per bit code - 2 bits . 42g34.4.3.
25、35 floorcod - Masking floor code - 3 bits . 42g34.4.3.36 snroffste - SNR offset exists - 1 bit . 42g34.4.3.37 csnroffst - Coarse SNR offset - 6 bits . 42g34.4.3.38 cplfsnroffst - Coupling fine SNR offset - 4 bits 42g34.4.3.39 cplfgaincod - Coupling fast gain code - 3 bits . 42g34.4.3.40 fsnroffstch
26、- Channel fine SNR offset - 4 bits 42g34.4.3.41 fgaincodch - Channel fast gain code - 3 bits . 42g34.4.3.42 lfefsnroffst - Low frequency effects channel fine SNR offset - 4 bits . 42g34.4.3.43 lfefgaincod - Low frequency effects channel fast gain code - 3 bits . 42g34.4.3.44 cplleake - Coupling leak
27、 initialization exists - 1 bit 42g34.4.3.45 cplfleak - Coupling fast leak initialization - 3 bits 43g34.4.3.46 cplsleak - Coupling slow leak initialization - 3 bits 43g34.4.3.47 deltbaie - Delta bit allocation information exists - 1 bit 43g34.4.3.48 cpldeltbae - Coupling delta bit allocation exists
28、- 2 bits 43g34.4.3.49 deltbaech - Delta bit allocation exists - 2 bits . 43g34.4.3.50 cpldeltnseg - Coupling delta bit allocation number of segments - 3 bits . 43g34.4.3.51 cpldeltoffstseg - Coupling delta bit allocation offset - 5 bits 43g34.4.3.52 cpldeltlenseg - Coupling delta bit allocation leng
29、th - 4 bits . 43g34.4.3.53 cpldeltbaseg - Coupling delta bit allocation - 3 bits . 43g34.4.3.54 deltnsegch - Channel delta bit allocation number of segments - 3 bits . 44g3ETSI ETSI TS 102 366 V1.4.1 (2017-09)5 4.4.3.55 deltoffstchseg - Channel delta bit allocation offset - 5 bits 44g34.4.3.56 deltl
30、enchseg - Channel delta bit allocation length - 4 bits . 44g34.4.3.57 deltbachseg - Channel delta bit allocation - 3 bits . 44g34.4.3.58 skiple - Skip length exists - 1 bit . 44g34.4.3.59 skipl - Skip length - 9 bits . 44g34.4.3.60 skipfld - Skip field - (skipl x 8) bits 44g34.4.3.61 chmantchbin - C
31、hannel mantissas - 0 bits to 16 bits 44g34.4.3.62 cplmantbin - Coupling mantissas - 0 bits to 16 bits 45g34.4.3.63 lfemantbin - Low frequency effects channel mantissas - 0 bits to 16 bits 45g34.4.4 auxdata - Auxiliary data field . 45g34.4.4.0 Introduction . 45g34.4.4.1 auxbits - Auxiliary data bits
32、- nauxbits bits . 45g34.4.4.2 auxdatal - Auxiliary data length - 14 bits 46g34.4.4.3 auxdatae - Auxiliary data exists - 1 bit 46g34.4.5 errorcheck - Frame error detection field . 46g34.4.5.1 crcrsv - CRC reserved bit - 1 bit . 46g34.4.5.2 crc2 - Cyclic redundancy check 2 - 16 bits . 46g34.5 Bit stre
33、am constraints . 46g35 Decoding the AC-3 bit stream 47g35.1 Introduction 47g35.2 Summary of the decoding process 47g35.2.1 Input bit stream . 47g35.2.1.0 Introduction . 47g35.2.1.1 Continuous or burst input 47g35.2.1.2 Byte or word alignment . 47g35.2.2 Synchronization and error detection . 48g35.2.
34、3 Unpack BSI, side information. 49g35.2.4 Decode exponents . 50g35.2.5 Bit allocation . 50g35.2.6 Process mantissas 50g35.2.7 Decoupling 50g35.2.8 Rematrixing 50g35.2.9 Dynamic range compression . 50g35.2.10 Inverse transform 50g35.2.11 Window, overlap/add 51g35.2.12 Downmixing . 51g35.2.13 PCM outp
35、ut buffer 51g35.2.14 Output PCM 51g36 Algorithmic details . 51g36.0 Introduction 51g36.1 Exponent coding . 51g36.1.1 Overview 51g36.1.2 Exponent strategy . 52g36.1.3 Exponent decoding . 53g36.2 Bit allocation 55g36.2.1 Overview 55g36.2.2 Parametric bit allocation . 56g36.2.2.0 Introduction . 56g36.2
36、.2.1 Initialization 56g36.2.2.2 Exponent mapping into psd . 57g36.2.2.3 psd integration . 57g36.2.2.4 Compute excitation function . 58g36.2.2.5 Compute masking curve 59g36.2.2.6 Apply delta bit allocation 60g36.2.2.7 Compute bit allocation 60g36.2.3 Bit allocation tables 61g36.3 Quantization and dec
37、oding of mantissas 65g36.3.1 Overview 65g36.3.2 Expansion of mantissas for asymmetric quantization (6 bap 15) . 66g36.3.3 Expansion of mantissas for symmetrical quantization (1 bap 5) 66g3ETSI ETSI TS 102 366 V1.4.1 (2017-09)6 6.3.4 Dither for zero bit mantissas (bap = 0) . 66g36.3.5 Ungrouping of m
38、antissas 68g36.4 Channel coupling 68g36.4.1 Overview 68g36.4.2 Sub-band structure for coupling 69g36.4.3 Coupling coordinate format 70g36.5 Rematrixing 70g36.5.1 Overview 70g36.5.2 Frequency band definitions . 71g36.5.2.0 Introduction . 71g36.5.2.1 Coupling not in use . 71g36.5.2.2 Coupling in use,
39、cplbegf 2 . 71g36.5.2.3 Coupling in use, 2 cplbegf 0 . 72g36.5.2.4 Coupling in use, cplbegf = 0 . 72g36.5.3 Encoding technique. 72g36.5.4 Decoding technique 73g36.6 Dialogue normalization 73g36.7 Dynamic range compression 74g36.7.1 Overview 74g36.7.2 Dynamic range control; dynrng, dynrng2 . 74g36.7.
40、2.1 Overview . 74g36.7.2.2 Detailed implementation . 75g36.7.3 Heavy compression; compr, compr2 76g36.7.3.1 Overview . 76g36.7.3.2 Detailed implementation . 76g36.8 Downmixing . 77g36.8.0 Introduction. 77g36.8.1 General downmix procedure . 77g36.8.2 Downmixing into two channels 80g36.9 Transform equ
41、ations and block switching 81g36.9.1 Overview 81g36.9.2 Technique . 82g36.9.3 Decoder implementation . 82g36.9.4 Transformation equations . 82g36.9.4.1 512-sample IMDCT transform 82g36.9.4.2 256-sample IMDCT transforms 84g36.9.5 Channel gain range code . 86g36.10 Error detection 87g36.10.0 Introduct
42、ion. 87g36.10.1 CRC checking . 87g36.10.2 Checking bit stream consistency . 88g37 Encoding the AC-3 bit stream 90g37.1 Introduction 90g37.2 Summary of the encoding process 90g37.2.1 Input PCM 90g37.2.1.1 Input word length 90g37.2.1.2 Input sample rate . 90g37.2.1.3 Input filtering 90g37.2.2 Transien
43、t detection 91g37.2.3 Forward transform 93g37.2.3.1 Windowing 93g37.2.3.2 Time to frequency transformation . 93g37.2.4 Coupling strategy 93g37.2.4.1 Basic encoder 93g37.2.4.2 Advanced encoder . 93g37.2.5 Form coupling channel . 93g37.2.5.1 Coupling channel 93g37.2.5.2 Coupling coordinates 94g37.2.6
44、Rematrixing 94g37.2.7 Extract exponents 94g37.2.8 Exponent strategy . 94g3ETSI ETSI TS 102 366 V1.4.1 (2017-09)7 7.2.9 Dither strategy 94g37.2.10 Encode exponents . 94g37.2.11 Normalize mantissas . 95g37.2.12 Core bit allocation . 95g37.2.13 Quantize mantissas . 95g37.2.14 Pack AC-3 syncframe . 95g3
45、Annex A (normative): AC-3 bit streams in the MPEG-2 multiplex 96g3A.0 Scope 96g3A.1 Introduction 96g3A.2 Detailed specification for System A (ATSC) . 96g3A.2.1 Stream_type 96g3A.2.2 Stream_id . 96g3A.2.3 Registration_descriptor 97g3A.2.4 AC-3 audio_descriptor . 97g3A.2.5 ISO_639_language_code 100g3A
46、.2.6 STD audio buffer size . 100g3A.3 Specification for System B (DVB) . 101g3A.4 PES constraints . 101g3A.4.0 Introduction 101g3A.4.1 Encoding. 101g3A.4.2 Decoding 101g3A.4.3 Byte-alignment . 102g3Annex B (informative): Void . 103g3Annex C (informative): AC-3 karaoke mode . 104g3C.0 Scope 104g3C.1
47、Introduction 104g3C.2 Detailed specification . 104g3C.2.1 Karaoke mode indication 104g3C.2.2 Karaoke mode channel assignment 104g3C.2.3 Reproduction of karaoke mode bit streams 105g3C.2.3.0 Introduction. 105g3C.2.3.1 Karaoke-aware decoder 105g3C.2.3.2 Karaoke-capable decoders 105g3Annex D (normative
48、): Alternate bit stream syntax . 107g3D.0 Scope 107g3D.1 Specification . 107g3D.1.1 Indication of alternate bit stream syntax . 107g3D.1.2 Alternate bit stream syntax specification 107g3D.1.3 Description of alternate syntax bit stream elements . 108g3D.1.3.0 Introduction. 108g3D.1.3.1 xbsi1e: Extra
49、bit stream information #1 exists, 1 bit 108g3D.1.3.2 dmixmod: Preferred stereo downmix mode, 2 bits . 108g3D.1.3.3 ltrtcmixlev: Lt/Rt centre mix level, 3 bits . 108g3D.1.3.4 ltrtsurmixlev: Lt/Rt surround mix level, 3 bits 109g3D.1.3.5 lorocmixlev: Lo/Ro centre mix level, 3 bits . 109g3D.1.3.6 lorosurmixlev: Lo/Ro surround mix level, 3 bits 110g3D.1.3.7 xbsi2e: Extra bit stream information #2 exists, 1 bit 110g3D.1.3.8 dsurexmod: DolbySurround EXmode, 2 bits 110g3D.1.3.9 dheadphonmod: DolbyH