1、 ETSI TS 1Digital cellular telecoUniversal Mobile TelGeneral audio codEnhanced aaFixed(3GPP TS 26.4floppy3TECHNICAL SPECIFICATION126 411 V13.0.0 (2016communications system (Phaelecommunications System (LTE; odec audio processing functiaacPlus general audio codec;ed-point ANSI-C code .411 version 13.
2、0.0 Release 1316-01) hase 2+); (UMTS); ctions; c; 13) ETSI ETSI TS 126 411 V13.0.0 (2016-01)13GPP TS 26.411 version 13.0.0 Release 13Reference RTS/TSGS-0426411vd00 Keywords GSM,LTE,UMTS ETSI 650 Route des Lucioles F-06921 Sophia Antipolis Cedex - FRANCE Tel.: +33 4 92 94 42 00 Fax: +33 4 93 65 47 16
3、 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 in electronic versions and/or in prin
4、t. 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 prevailing document is the print of the Po
5、rtable 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 documents is available at http:/port
6、al.etsi.org/tb/status/status.asp 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 in any form or by any means, electronic or mech
7、anical, 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 reproduction in all media. European Telecommunication
8、s Standards Institute 2016. All rights reserved. DECTTM, PLUGTESTSTM, UMTSTMand the ETSI logo are Trade Marks of ETSI registered for the benefit of its Members. 3GPPTM and LTE are Trade Marks of ETSI registered for the benefit of its Members and of the 3GPP Organizational Partners. GSM and the GSM l
9、ogo are Trade Marks registered and owned by the GSM Association. ETSI ETSI TS 126 411 V13.0.0 (2016-01)23GPP TS 26.411 version 13.0.0 Release 13Intellectual Property Rights IPRs essential or potentially essential to the present document may have been declared to ETSI. The information pertaining to t
10、hese essential IPRs, if any, is publicly available for ETSI members and non-members, and can be found in ETSI SR 000 314: “Intellectual Property Rights (IPRs); Essential, or potentially Essential, IPRs notified to ETSI in respect of ETSI standards“, which is available from the ETSI Secretariat. Late
11、st updates are available on the ETSI Web server (https:/ipr.etsi.org/). Pursuant to the ETSI IPR Policy, no investigation, including IPR searches, has been carried out by ETSI. No guarantee can be given as to the existence of other IPRs not referenced in ETSI SR 000 314 (or the updates on the ETSI W
12、eb server) which are, or may be, or may become, essential to the present document. Foreword This Technical Specification (TS) has been produced by ETSI 3rd Generation Partnership Project (3GPP). The present document may refer to technical specifications or reports using their 3GPP identities, UMTS i
13、dentities or GSM identities. These should be interpreted as being references to the corresponding ETSI deliverables. The cross reference between GSM, UMTS, 3GPP and ETSI identities can be found under http:/webapp.etsi.org/key/queryform.asp. Modal verbs terminology In the present document “shall“, “s
14、hall not“, “should“, “should not“, “may“, “need not“, “will“, “will not“, “can“ and “cannot“ are to be interpreted as described in clause 3.2 of the ETSI Drafting Rules (Verbal forms for the expression of provisions). “must“ and “must not“ are NOT allowed in ETSI deliverables except when used in dir
15、ect citation. ETSI ETSI TS 126 411 V13.0.0 (2016-01)33GPP TS 26.411 version 13.0.0 Release 13Contents Intellectual Property Rights 2g3Foreword . 2g3Modal verbs terminology 2g3Foreword . 4g31 Scope 5g32 References 5g33 Definitions and abbreviations . 5g33.1 Definitions 5g33.2 Abbreviations . 6g34 Fix
16、ed point ANSI-C code structure 6g34.1 Contents of the fixed point ANSI-C source code . 6g34.2 Program execution 8g34.3 Memory requirements 9g34.3.1 Constants and tables 9g34.3.2 Static memory . 14g34.3.3 Dynamic memory . 16g34.3.4 Maximum stack size . 16g35 File formats 21g35.1 Audio input file (enc
17、oder input/decoder output) 21g35.2 Bitstream file format (encoder output/decoder input) 21g35.3 Error pattern file (decoder input) 21g3Annex A (informative): Weighted MOPS 22g3Annex B (informative): Change history . 23g3History 24g3ETSI ETSI TS 126 411 V13.0.0 (2016-01)43GPP TS 26.411 version 13.0.0
18、 Release 13Foreword This Technical Specification has been produced by the 3rdGeneration Partnership Project (3GPP). The contents of the present document are subject to continuing work within the TSG and may change following formal TSG approval. Should the TSG modify the contents of the present docum
19、ent, it will be re-released by the TSG with an identifying change of release date and an increase in version number as follows: Version x.y.z where: x the first digit: 1 presented to TSG for information; 2 presented to TSG for approval; 3 or greater indicates TSG approved document under change contr
20、ol. y the second digit is incremented for all changes of substance, i.e. technical enhancements, corrections, updates, etc. z the third digit is incremented when editorial only changes have been incorporated in the document. ETSI ETSI TS 126 411 V13.0.0 (2016-01)53GPP TS 26.411 version 13.0.0 Releas
21、e 131 Scope The present document contains an electronic copy of the ANSI-C code for the Fixed-point Enhanced aacPlus codec 1. 2 References The following documents contain provisions which, through reference in this text, constitute provisions of the present document. References are either specific (
22、identified by date of publication, edition number, version number, etc.) or non-specific. For a specific reference, subsequent revisions do not apply. For a non-specific reference, the latest version applies. In the case of a reference to a 3GPP document (including a GSM document), a non-specific re
23、ference implicitly refers to the latest version of that document in the same Release as the present document. 1 3GPP TS 26.401: “General audio codec audio processing functions; Enhanced aacPlus general audio codec; General description“. 2 3GPP TS 26.403: “General audio codec audio processing functio
24、ns; Enhanced aacPlus general audio codec; Encoder specification; Advanced Audio Coding (AAC) part“. 3 3GPP TS 26.404: “General audio codec audio processing functions; Enhanced aacPlus general audio codec; Encoder specification; Spectral Band Replication (SBR) part“. 4 3GPP TS 26.405: “General audio
25、codec audio processing functions; Enhanced aacPlus general audio codec; Encoder specification; Parametric stereo part“. 5 ISO/IEC 14496-3 (2001): “Information technology - Coding of audio-visual objects - Part 3: Audio“. 6 ISO/IEC 14496-3:2001/Amd.1:2003: “Bandwidth Extension“. 7 ISO/IEC 14496-3:200
26、1/Amd.1:2003/Cor 1:2004. 8 ISO/IEC 14496-3:2001/ Amd.2:2004: “Parametric coding for high quality audio“. 9 3GPP TS 26.402: “General audio codec audio processing functions; Enhanced aacPlus general audio codec; Additional decoder tools“. 10 3GPP TS 26.244: “Transparent end-to-end streaming service; 3
27、GPP file format (3GP)“. 3 Definitions and abbreviations 3.1 Definitions For the purposes of the present document, the terms and definitions given in 3GPP TS 26.401 1, 3GPP TS 26.403 2, 3GPP TS 26.404 3, 3GPP TS 26.405 4 and 3GPP TS 26.402 9 apply. ETSI ETSI TS 126 411 V13.0.0 (2016-01)63GPP TS 26.41
28、1 version 13.0.0 Release 133.2 Abbreviations For the purposes of the present document, the following abbreviations apply: AAC Advanced Audio Coding aacPlus Combination of MPEG-4 AAC and MPEG-4 Bandwidth extension (SBR) ANSI American National Standards Institute Enhanced aacPlus Combination of MPEG-4
29、 AAC, MPEG-4 Bandwidth extension (SBR) and MPEG-4 Parametric Stereo GSM Global System for Mobile communications I/O Input/OutputMDCT Modified Discrete Cosine Transform QMF Quadrature Mirror Filter RAM Random Access MemoryROM Read Only Memory SBR Spectral Band Replication 4 Fixed point ANSI-C code st
30、ructure This clause gives an overview of the structure of the fixed point ANSI-C code and provides an overview of the contents and organization of the C code attached to the present document. The C code has been verified on the following systems: IBM PC/AT compatible computers with Windows XP, 2000
31、and Microsoft Visual C+ v.6.0 compiler. IBM PC/AT compatible computers with Linux OS and GCC v.3.3 compiler. ANSI-C was selected as the programming language because portability was desirable. 4.1 Contents of the fixed point ANSI-C source code The C code distribution is organized in two directories f
32、or encoder and decoder and further into several subdirectories, reflecting the major building blocks of the Enhanced aacPlus codec. The file descriptions on root level as well as the directory structure is given as follows. Table 1: Source code directory structure for the encoder (ETSI_aacPlusenc) D
33、irectory Description README.txt information on how to compile Makefile UNIX style encoder Makefile enhAacPlusenc.dsw Win32 MSVC 6.0 encoder workspace enhAacPlusenc.dsp Win32 MSVC 6.0 encoder makefile src/ directory for the encoder frontend etsiop_fastaacenc/ AAC encoder library etsiop_resamplib/ res
34、ampler libraryetsiop_sbrenclib/ SBR encoder library Table 2: Source code directory structure for the decoder (ETSI_aacPlusdec) Directory Description README.txt information on how to compile Makefile UNIX style encoder Makefile enhAacPlusdec.dsw Win32 MSVC 6.0 decoder workspace src/ directory for the
35、 decoder frontend etsiop_aacdec AAC decoder library etsiop_sbrdeclib/ SBR decoder library ETSI ETSI TS 126 411 V13.0.0 (2016-01)73GPP TS 26.411 version 13.0.0 Release 13Table 3: Source code directory structure common for encoder and decoder Directory Description etsiop_bitbuf/ bitstream reading/writ
36、ing library etsiop_ffrlib/ general purpose functionalities etsioplib/ ETSI operators implementation 3g_lib/ precompiled libraries for audio and bitstream file format handling The distributed files with suffix “c“ contain the source code and the files with suffix “h“ are the header files. Within the
37、respective libraries, the RAM data is contained in “xxx_ram“ files with suffix “c“, the ROM data is contained in “xxx_rom“ files with suffix “c“. Makefiles are provided for the platforms in which the C code has been verified (listed above). A list of source code files is given below: Table 4: Encode
38、r source code files Directory Module src/ main.c mp4file.cetsiop_fastaacenc/ qc_main.c aacenc.cms_stereo.cspreading.c interface.cbit_cnt.cadj_thr.c quantize.cpsy_configuration.c sf_estim.c tns_param.cgrp_data.cpre_echo_control.c stprepro.c tns.cdyn_bits.cpsy_main.c channel_map.cblock_switch.cband_nr
39、g.c transform.c bitenc.cline_pe.c stat_bits.cetsiop_sbrenc/ qmf_enc.c ton_corr.cfram_gen.cenv_bit.c env_est.cmh_det.chybrid.c bit_sbr.cps_bitenc.csbr_main.c tran_det.csbr_misc.ccode_env.c nf_est.cfreq_sca.cinvf_est.c ps_enc.cetsiop_resamplib/ downsample_FIR.c ETSI ETSI TS 126 411 V13.0.0 (2016-01)83
40、GPP TS 26.411 version 13.0.0 Release 13Table 5: Decoder source code files Directory Module src/ main.c fileifc.cspline_resampler.c etsiop_aacdec/ aacdecoder.c streaminfo.cchannelinfo.cstereo.c longblock.cshortblock.cpulsedata.c block.cpns.c imdct.ctns.cbitstream.c channel.cconceal.cdatastream.c etsi
41、op_sbrdeclib/ env_dec.c aacpluscheck.cenv_calc.clpp_tran.c sbrdecoder.csbr_dec.csbr_crc.c hybrid.cps_bitdec.cenv_extr.c freq_sca.c ps_dec.cqmf_dec.cTable 6: Common source code files Directory Module etsiop_bitbuf/ bitbuffer.c etsiop_ffrlib/ fft_32x32.c transcendent.ctranscendent_enc.c intrinsics.c v
42、ector.c4.2 Program execution The Enhanced aacPlus codec is implemented in two programs: enhAacPlusEnc.exe. enhAacPlusDec.exe. The programs should be called like: enhAacPlusEnc.exe . enhAacPlusDec.exe error_pattern_file. The audio files contain 16-bit linear encoded PCM samples with wav header, the b
43、itstream files are of 3GPP type an the error pattern file is a ASCII file, see clause 5. ETSI ETSI TS 126 411 V13.0.0 (2016-01)93GPP TS 26.411 version 13.0.0 Release 13The encoder and decoder command line handling is also explained by running the applications without input arguments. 4.3 Memory requ
44、irements The data types of variables and tables used in the fixed-point implementation are defined by the ETSI operator data types, the following types are used: Word8. Word16. Word32. Flag. 4.3.1 Constants and tables This clause contains a listing of all constants and tables contributing to the ROM
45、 requirements of the encoder and decoder. Table 7: Encoder constants and tables Name Data type Size 16-bit word Allocated in Source File Description LongWindowSine Word16 1 024 aac_rom.c Window coefficients ShortWindowSine Word16 128 aac_rom.c Window coefficientsLongWindowKBD Word16 1 024 aac_rom.c
46、Window coefficients fftTwiddleTable Word16 513 aac_rom.c FFT twiddle coefficients formfac_sqrttable Word32 192 aac_rom.c Lookup table for efficient sqrt implementation mTab_3_4 Word32 1 024 aac_rom.c Quantizer table, used for efficient pow () implementation mTab_4_3 Word32 1 024 aac_rom.c Inverse qu
47、antizer table, used for efficient pow () implementation pow2tominusNover16 Word16 17 aac_rom.c Lookup table for efficient pow() implementation specExpMantTableComb_enc Word32 128 aac_rom.c Lookup table for efficient inverse quantizer implementation specExpTableComb_enc Word8 32 aac_rom.c Lookup tabl
48、e for efficient inverse quantizer implementation quantBorders Word16 16 aac_rom.c Lookup table for efficient distortion calculation implementation quantBorders Word16 12 aac_rom.c Lookup table for efficient distortion calculation implementation p_8000_mono_long TNS_CONFIG_TABULATED 5 aac_rom.c TNS t
49、uning parameters p_8000_stereo_long TNS_CONFIG_TABULATED 5 aac_rom.c TNS tuning parameters p_8000_mono_short TNS_CONFIG_TABULATED 5 aac_rom.c TNS tuning parameters p_8000_stereo_short TNS_CONFIG_TABULATED 5 aac_rom.c TNS tuning parameters p_16000_mono_long TNS_CONFIG_TABULATED 5 aac_rom.c TNS tuning parameters p_16000_stereo_long TNS_CONFIG_TABULATED 5 aac_rom.c TNS tuning parameters p_16000_mono_short TNS_CONFIG_TABULATED 5 aac_rom.c TNS tuning parameters p_16000_stereo_short TNS_CONFIG_TABULATED 5 aac_rom.c TN