ETSI EN 301 712-2000 Digital Cellular Telecommunications System (Phase 2+) Adaptive Multi Rate (AMR) Speech ANSI-C Code for the AMR Speech Codec (GSM 06 73 Version 7 4 1 Release 19_1.pdf

上传人:jobexamine331 文档编号:729813 上传时间:2019-01-08 格式:PDF 页数:26 大小:1.20MB
下载 相关 举报
ETSI EN 301 712-2000 Digital Cellular Telecommunications System (Phase 2+) Adaptive Multi Rate (AMR) Speech ANSI-C Code for the AMR Speech Codec (GSM 06 73 Version 7 4 1 Release 19_1.pdf_第1页
第1页 / 共26页
ETSI EN 301 712-2000 Digital Cellular Telecommunications System (Phase 2+) Adaptive Multi Rate (AMR) Speech ANSI-C Code for the AMR Speech Codec (GSM 06 73 Version 7 4 1 Release 19_1.pdf_第2页
第2页 / 共26页
ETSI EN 301 712-2000 Digital Cellular Telecommunications System (Phase 2+) Adaptive Multi Rate (AMR) Speech ANSI-C Code for the AMR Speech Codec (GSM 06 73 Version 7 4 1 Release 19_1.pdf_第3页
第3页 / 共26页
ETSI EN 301 712-2000 Digital Cellular Telecommunications System (Phase 2+) Adaptive Multi Rate (AMR) Speech ANSI-C Code for the AMR Speech Codec (GSM 06 73 Version 7 4 1 Release 19_1.pdf_第4页
第4页 / 共26页
ETSI EN 301 712-2000 Digital Cellular Telecommunications System (Phase 2+) Adaptive Multi Rate (AMR) Speech ANSI-C Code for the AMR Speech Codec (GSM 06 73 Version 7 4 1 Release 19_1.pdf_第5页
第5页 / 共26页
点击查看更多>>
资源描述

1、- c PLEASE NOTE This document is normally accompanied by a disk/dish wnen purchased in hardcopy. The dislddisks contain information which would be of no value as a hardcopy document. If you require a copy of the diskldisb, please use the contact information below for your request. When submitting yo

2、ur request, please have the following irzfonnation vuiizble: Your company name/account number Originating orsanisacion Document number USMCanada Enformation Handling Services E-mail Te!: 800-U$-3352 Outside USAiCanada Except the United I(ingdom) Information Handling Services E-mai Te!: i 1-303-790

3、-0600 Technic3 Tz!: (O Fax: (O United Kingdom Indexes Ltd 344) 404409, Custoinet Support 34.1) 40442 I, Ccistoiner Suppori In formation Handing Senices and Teclinicai Indexer - Cortitiziad to Service Excellence ETSI EN 301 71 2 V7.4.1 (2000-09) European Standard (Telecommunications series) Digital c

4、ellular telecommunications system (Phase 2+); Adaptive Multi Rate (AMR) speech; ANSI-C code for the AMR speech codec (GSM 06.73 version 7.4.1 Release 1998) (GSM 06.73 version 7.4.1 Release 1998) 2 ETSI EN 301 712 V7.4.1 (2000-09) Reference REN/TSGS-O40673Q7R3 Keywords Digital cellular telecommunicat

5、ions system, Global System for Mobile communications (GSM) AMR, ANSI C Code ETSI 650 Route des Lucioles F-O6921 Sophia Antipolis Cedex - FRANCE Tel.: +33 4 92 94 42 O0 Fax: +33 4 93 65 47 16 Siret No 348 623 562 0001 7 - NAF 742 C Association but non lucratif enregistre la Sous-prfecture de Grasse (

6、06) No 7803/88 Important notice The pre Individual copies of the present document can be downloaded from: http:llwww.etsi.org ent document may be made available in more than one electronic version or in print. In e of existing or perceived difference in contents between such versions, the reference

7、version is the Portable Document Format (PDF). In case of dispute, the reference shall be the printing on ETSI printers of the 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

8、 status. Information on the current status of this and other ETSI documents is available at http:llwww.etsi.orcg/lb/status/ If you find errors in the present document, send your comment to: editor et.si.fr Copyright Notification No part may be reproduced except as authorized by written permission. T

9、he copyright and the foregoing restriction extend to reproduction in all media. O European Telecommunications Standards Institute 2000. All rights reserved. ETSI (GSM 06.73 version 7.4.1 Release 1998) 3 ETSI EN 301 712 V7.4.1 (2000-09) Contents Intellectual Property Rights 4 Foreword . 4 1 2 3 3.1 3

10、.2 4 4.1 4.2 4.3 4.4 4.5 4.5.1 4.5.2 4.5.3 5 6 6.1 6.2 6.3 Scope 5 References 5 Definitions and abbreviations . 6 Definitions 6 Abbreviations . 6 C code structure 6 Contents of the C source code 6 Program execution 7 Coding style 7 Code hierarchy . 7 Variables. constants and tables . 11 Description

11、of constants used in the C-code . 11 Description of fixed tables used in the C-code . 11 Static variables used in the C-code . 13 Homing procedure 17 File formats 23 Mode control file (encoder input) . 23 Parameter bitstream file (encoder output / decoder input) . 23 Speech file (encoder input / dec

12、oder output) 23 Annex A (informative): Change Request History 24 History 25 ETSI (GSM 06.73 version 7.4.1 Release 1998) 4 ETSI EN 301 712 V7.4.1 (2000-09) Intellectual Property Rights IPRs essential or potentially essential to the present document may have been declared to ETSI. The information pert

13、aining to these essential IPRs, if any, is publicly available for ETSI members and non-members, and can be found in ETSI SR O00 3 14: “Intellectual Propero Rights (IPRs); Essential, or potentially Essential, IPRs notifed to ETSI in respect of ETSI standards“, which is available from the ETSI Secreta

14、riat. Latest updates are available on the ETSI Web server (-). 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 O00 314 (or the updates on the ETSI Web server

15、) which are, or may be, or may become, essential to the present document. Foreword This European Standard (Telecommunications series) has been produced by ETSI Technical Committee Special Mobile Group (SMG). The present document provides the bit exact definition of the Adaptive Multi Rate (AMR) spee

16、ch traffic codec for the digital cellular telecommunications system. The present document contains an electronic copy of the ANSI-C code for the GSM Adaptive Multi-Rate codec, given in the associated file “en301712v07040lo0.zip“. The ANSI-C code is necessary for a bit exact implementation of the Ada

17、ptive Multi Rate speech transcoder (GSM 06.90 3), Voice Activity Detection (GSM 06.94 7), comfort noise (GSM 06.92 5), Discontinuous Transmission (GSM 06.93 6) and example solutions for substituting and muting of lost frames (GSM 06.91 4). The associated file “en301712v070401o0.zip“ contains a “read

18、me.txt“ file, which explains the procedure for installation and usage of the ANSI-C code files. The contents of the present document is subject to continuing work within SMG and may change following formal SMG approval. Should SMG modify the contents of the present document it will be re-released wi

19、th an identifying change of release date and an increase in version number as follows: Version 7.x.y where: 7 indicates Release 1998 of GSM Phase 2+. x the second digit is incremented for all changes of substance, i.e. technical enhancements, corrections, updates, etc. y the third digit is increment

20、ed when editorial only changes have been incorporated in the specification. National transposition dates Date of adoption of the present document: Date of latest announcement of the present document (doa): Date of latest publication of new National Standard or endorsement of the present document (do

21、p/e): Date of withdrawal of any conflicting National Standard (dow): 25 August 2000 30 November 2000 31 May 2001 31 May 2001 ETSI (GSM 06.73 version 7.4.1 Release 1998) 5 ETSI EN 301 712 V7.4.1 (2000-09) 1 Scope The present document contains an electronic copy of the ANSI-C code for the GSM Adaptive

22、 Multi-Rate codec. The ANSI-C code is necessary for a bit exact implementation of the Adaptive Multi Rate speech transcoder (GSM 06.90 3), Voice Activity Detection (GSM 06.94 7), comfort noise (GSM 06.92 5), Discontinuous Transmission (GSM 06.93 6) and example solutions for substituting and muting o

23、f lost frames (GSM 06.91 4). 2 References The following documents contain provisions which, through reference in this text, constitute provisions of the present document. References are either specific (identified by date of publication, edition number, version number, etc.) or non-specific. For a s

24、pecific reference, subsequent revisions do not apply. For a non-specific reference, the latest version applies. A non-specific reference to an ETS shall also be taken to refer to later versions published as an EN with the same number. For this Release 1998 document, references to GSM documents are f

25、or Release 1998 versions (version 7.x.y). il GSM O 1.04: “Digital cellular telecommunications system (Phase 2+); Abbreviations and acronyms“. GSM 06.74: “Digital cellular telecommunications system (Phase 2+); Test sequences for the GSM Adaptive Multi-Rate (AMR) speech codec“. GSM 06.90: “Digital cel

26、lular telecommunications system (Phase 2+); Adaptive Multi-Rate (AMR) speech transcoding“. GSM 06.9 1: “Digital cellular telecommunications system (Phase 2+); Substitution and muting of lost frame for Adaptive Multi-Rate (AMR) speech traffic channels“. GSM 06.92: “Digital cellular telecommunications

27、 system (Phase 2+); Comfort noise aspects for Adaptive Multi-Rate (AMR) speech traffic channels“. GSM 06.93: “Digital cellular telecommunications system (Phase 2+); Discontinuous transmission (DTX) for Adaptive Multi-Rate (AMR) speech traffic channels“. GSM 06.94: “Digital cellular telecommunication

28、s system (Phase 2+); Voice Activity Detector (VAD) for Adaptive Multi-Rate (AMR) speech traffic channels“. Pl 31 41 51 61 71 ETSI (GSM 06.73 version 7.4.1 Release 1998) 6 ETSI EN 301 712 V7.4.1 (2000-09) 3 3.1 Definitions and abbreviations Definitions Definition of terms used in the present document

29、, can be found in GSM 06.90 3, GSM 06.91 4, GSM 06.92 5, GSM 06.93 61 and GSM 06.94 71. 3.2 Abbreviations For the purposes of the present document, the following abbreviations apply: ANSI American National Standards Institute ETS European Telecommunication Standard GSM I/O InputIOutput RAM Random Ac

30、cess Memory ROM Read Only Memory Global System for Mobile communications For abbreviations not given in this subclause see GSM O 1 .O4 11. 4 C code structure This clause gives an overview of the structure of the bit-exact C code and provides an overview of the contents and organization of the C code

31、 attached to the present document. The C code has been verified on the following systems: - - - Sun Microsystems workstations and GNU gcc compiler. DEC Alpha workstations and GNU gcc compiler. IBM PC/AT compatible computers with Linux operating system and GNU gcc compiler. ANSI-C 9899 was selected a

32、s the programming language because portability was desirable. 4.1 Contents of the C source code The C code distribution has all files in the root level. The distributed files with suffix “c“ contain the source code and the files with suffix “h“ are the header files. The ROM data is contained mostly

33、in files with suffix “tab“. The C code distribution also contains one speech coder installation verification data file, “spch-dos.inp“. The reference encoder output file is named “spch-dos.cod“, the reference decoder input file is named “spch-dos.dec“ and the reference decoder output file is named “

34、spch-dos.out“. These four files are formatted such that they are correct for an IBM PC/AT compatible computer. The same files with reversed byte order of the 16 bit words are named “spch-unx.inp“, “spchunx.cod“, “spch-unx.“dec“ and “spchunx.out“, respectively. Final verification is to be performed u

35、sing the GSM Adaptive Multi-Rate test sequences described in GSM 06.74 2. Makefiles are provided for the platforms in which the C code has been verified (listed above). Once the software is installed, this directory will have a compiled version of encoder and decoder (the bit-exact C executables of

36、the speech codec) and all the object files. ETSI (GSM 06.73 version 7.4.1 Release 1998) 7 ETSI EN 301 712 V7.4.1 (2000-09) 4.2 Program execution The GSM Adaptive Multi-Rate codec is implemented in two programs: - (encoder) speech encoder; - (decoder) speech decoder. The programs should be called lik

37、e: - - encoder encoder options ; decoder decoder options . The speech files contain 16-bit linear encoded PCM speech samples and the parameter files contain encoded speech data and some additional flags. The encoder and decoder options will be explained by running the applications with option -h. Se

38、e the file readme.txt for more information on how to run the encoder and decoder programs. 4.3 Coding style The C code is written according to the following structuring conventions. Each function func() that needs static variables is considered a module. A module consists of: - - - a state structure

39、 (struct) combining the static variables of the module; three auxiliary functions func-init(), funCreset(), and func-exit(); the processing function func() itself. The initialization function func-init() allocates (from the heap) a new state structure, calls the funCreset() function, stores the poin

40、ter to the newly allocated structure in its first function parameter, and returns with a value of O if completed successful or a value of 1 otherwise. The reset function funCreset() takes a pointer to the state structure and resets all members of the structure to a predefined value (homing). The exi

41、t function func-exit() performs any necessary cleanup and frees the state structure memory. The processing function func() also takes a pointer to the state structure as well as all other necessary parameters and performs its task using (and possibly modifying) the values in the state structure. If

42、a module calls other modules, the higher level state structure contains a pointer to the lower level state structures, and the init, reset, and exit functions recursively call the corresponding lower level functions. By this convention, the code becomes “instantiable“ (more than one copy of a module

43、 can be used in the same program) and the static data hierarchy is clearly visible in the code. 4.4 Code hierarchy Figures 1 to 4 are call graphs that show the functions used in the speech codec, including the functions of VAD, DTX, and comfort noise generation. Each column represents a call level a

44、nd each cell a function. The functions contain calls to the functions in rightwards neighbouring cells. The time order in the call graphs is from the top downwards as the processing of a frame advances. All standard C functions: printf(), fwrite(), etc. have been omitted. Also, no basic operations (

45、add(), L-add(), maco, etc.) or double precision extended operations (e.g. L-Extracto) appear in the graphs. The initialisation of the static RAM (Le. calling the -init functions) is also omitted. The basic operations are not counted as extending the depth, therefore the deepest level in this softwar

46、e is level 7. The encoder call graph is broken down into three separate call graphs, tables 1 to 3. ETSI (GSM 06.73 version 7.4.1 Release 1998) 8 ETSI EN 301 712 V7.4.1 (2000-09) Table 1 : Speech encoder call structure Log2-norm (continued) I 1 2 3 Option to call one or the other VA option Specific

47、to VA option 1 Specific to VA option 2 ETSI (GSM 06.73 version 7.4.1 Release 1998) cbsearch gainQuant subframePostProc Pred-It-So6 Convolve update-gp-clipping Prm2bits I nt2 bin 9 Pred-It-So6 Convolve G-pitch check-gp-clipping q-gain-pitch see Table 2 see Table 3 Synfilt copy ETSI EN 301 712 V7.4.1

48、(2000-09) cbsearch code-Zi409bits Table 1 (concluded): Speech encoder call structure cor-h-x code-3i40-14bits Table 2: cbsearch call structure cor-h Inv-sqti I search-2i40 build-code cor-h-x gainQuant set-sign I cor-h Iinv-sqti search-2i40 . . . gc-ved-copy ICOPY I gc-pred I Log2 ILog2-norm Itxiia-c

49、oae code-2i40-11 bits cor-h-x cor-h Ilnv-sqti I search-3i40 Ibuild-code pde4i40-17bits (cor-hx I set-sign I ETSI (GSM 06.73 version 7.4.1 Release 1998) 10 Table 4: Speech decoder call structure it-lpc-1 and3 iec-lag3 red-It-306 lec-lag6 ecode-Zi40-9bits ecode-2i40-11 bits ecode-3i40-14bits ecode4i40-17bits ecode-i40-31 bits c-gain-pitch -gain-pitch ETSI EN 301 712 V7.4.1 (2000-09) Lsf-lsp I LspAz I Get-lsp-pol decompress-code Idecompressl O I gmed-n I Speech-Decode-Frame gc-pred Bits2prm Decoder-

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 标准规范 > 国际标准 > 其他

copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
备案/许可证编号:苏ICP备17064731号-1