ANSI-C code for the GSM Enhanced Full Rate (EFR) speech codec
Specification: 46053
Summary
This document provides the bit-exact definition of the Enhanced Full Rate (EFR) speech traffic codec for the digital cellular telecommunications system.
Specification Intelligence
This is a Technical Document in the Unknown Series series, focusing on Technical Document. The document is currently in approved by tsg and under change control and is under formal change control.
Classification
Specifics
Version
Full Document v800
3GPP TS 46.053 V8.0.0 (2008-12) |
Technical Specification |
3rd Generation Partnership Project; Technical Specification Group Services and System Aspects; ANSI-C code for the GSM Enhanced Full Rate (EFR) speech codec (Release 8)
|
|
The present document has been developed within the 3rd
Generation Partnership Project (3GPP TM) and may be further
elaborated for the purposes of 3GPP.    |
|
Keywords GSM, speech, codec |
3GPP Postal address
3GPP support office address 650 Route des Lucioles - Sophia Antipolis Valbonne - FRANCE Tel.: +33 4 92 94 42 00 Fax: +33 4 93 65 47 16 Internet http://www.3gpp.org |
Contents
Foreword................................................................................................................................................ 4
1....... Scope........................................................................................................................................... 5
2....... References.................................................................................................................................... 5
3....... Definitions and abbreviations......................................................................................................... 5
3.1......... Definitions............................................................................................................................................................................ 5
3.2......... Abbreviations....................................................................................................................................................................... 6
4....... C code structure............................................................................................................................ 6
4.1......... Contents of the C source code disk.................................................................................................................................. 6
4.2......... Program execution.............................................................................................................................................................. 7
4.3......... Code hierarchy..................................................................................................................................................................... 7
Annex A (informative):....... Change History...................................................................................... 13
This Technical Specification has been produced by the 3rd Generation Partnership Project (3GPP).
The present document provides the bit exact definition of the Enhanced Full Rate (EFR) speech traffic codec for the digital cellular telecommunications system.
An electronic attachment accompanies the present document, containing clause 5, the bitâexact ANSIâC code for the Enhanced Full Rate speech transcoder.
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 document, 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 control.
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.
The present document contains an electronic copy of the ANSIâC code for the GSM Enhanced Full Rate codec. The ANSIâC code is necessary for a bit exact implementation of the Enhanced Full Rate speech transcoder (GSM 06.60 [3]), Voice Activity Detection (GSM 06.82 [7]), comfort noise (GSM 06.62 [5]), Discontinuous Transmission (GSM 06.81 [6]) and example solutions for substituting and muting of lost frames (GSM 06.61 [4]).
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 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 reference implicitly refers to the latest version of that document in the same Release as the present document.
[1]Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â GSM 01.04: "Digital cellular telecommunications system (Phase 2+); Abbreviations and acronyms".
[2]Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â GSM 06.54: "Digital cellular telecommunications system (Phase 2+); Test sequences for the GSM Enhanced Full Rate (EFR) speech codec".
[3]Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â GSM 06.60: "Digital cellular telecommunications system (Phase 2+); Enhanced Full Rate (EFR) speech transcoding".
[4]Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â GSM 06.61: "Digital cellular telecommunications system (Phase 2+); Substitution and muting of lost frame for Enhanced Full Rate (EFR) speech traffic channels".
[5]Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â GSM 06.62: "Digital cellular telecommunications system (Phase 2+); Comfort noise aspects for Enhanced Full Rate (EFR) speech traffic channels".
[6]Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â GSM 06.81: "Digital cellular telecommunications system (Phase 2+); Discontinuous transmission (DTX) for Enhanced Full Rate (EFR) speech traffic channels".
[7]Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â GSM 06.82: "Digital cellular telecommunications system (Phase 2+); Voice Activity Detector (VAD) for Enhanced Full Rate (EFR) speech traffic channels".
3.1Â Â Â Â Â Â Â Definitions
Definition of terms used in the present document can be found in GSM 06.60 [3], GSM 06.61 [4], GSM 06.62 [5], GSM 06.81 [6] and GSM 06.82 [7].
3.2Â Â Â Â Â Â Â Abbreviations
For the purposes of the present document, the following abbreviations apply:
ANSIÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â American National Standards Institute
DSâHDÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Double Sided High Density
ETSÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â European Telecommunication Standard
GSMÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Global System for Mobile communications
I/OÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Input/Output
ROMÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Read Only Memory
For abbreviations not given in this clause see GSM 01.04 [1].
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 archive en_300724v080000o0.ZIP which accompanies the present document.
The C code has been verified on the following systems:
â    Sun Microsystems 1) workstations and Sun Microsystems cc compiler and gcc compiler;
â    IBM 2) PC/AT compatible computers and Borland TurboâC++ 3) compiler;
â    Hewlett Packard's 4) workstations and HP cc compiler;
ANSIâC 9899 was selected as the programming language because portability was desirable.
4.1Â Â Â Â Â Â Â Contents of the C source code disk
The C code disk has all of the files in the root level.
In this disk, the files with suffix "c" contain the source code and the files with suffix "h" are the header files. The ROM data is contained mostly in files with suffix "tab". All text files are formatted such that they are correct for an IBM PC/AT compatible.
The archive en_300724v080000o0.ZIP which accompanies the present document 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 "spch_dos.out". These four files are formatted such that they are correct for an IBM PC/AT compatible. The same files with reversed byte order of the 16 bit words are named "spch_unx.inp", "spch_unx.cod", "spch_unx."dec" and "spch_unx.out", respectively.
In an IBM PC/AT compatible platform, the installation verification can be performed by running the batch file "ts_dos.bat". In most UNIX platforms, the installation verification can be performed by running the batch file "ts_unx.bat". Final verification is to be performed using the GSM Enhanced Full Rate test sequences described in GSM 06.54 [2].
Makefiles are provided for the three platforms in which the C code has been verified (listed above). Once the software is installed, this directory will have compiled versions of coder and decoder (the bitâexact C executables of the speech codec), ed_iface (interface program between coder and decoder) and all the object files.
The programs coder and decoder are the GSM Enhanced Full Rate encoder and decoder executable files, respectively. A third program, ed_iface, is also contained in this directory. This is the program which provides the format conversion between the encoder output file format and the decoder input file format.
4.2Â Â Â Â Â Â Â Program execution
The GSM enhanced full rate speech codec is implemented as three separate programs:
â    (coder) speech encoder;
â    (ed_iface) encoder/decoder interface;
â    (decoder) speech decoder.
For encoding using the coder program, the input is a binary speech file (*.inp) and the output is a binary encoded parameter file (*.cod). For decoding using the decoder program, the input is a binary parameter file (*.dec) and the output is a binary synthesized speech file (*.out).
NOTE:Â Â Â Â Â The format for the parameter input file required for decoding (*.dec) is not the same as the format of the parameter output file generated by encoding (*.cod). The ed_iface program will translate an *.cod file into a *.dec file.
See the file readme.txt for more information on how to run the coder, ed_iface and decoder programs.
4.3Â Â Â Â Â Â Â Code hierarchy
Figures 1 to 5 are call graphs that show the functions used in the speech codec, including the functions of VAD, DTX, and comfort noise generation.
The encode call graph is broken down into three separate call graphs, and the decode call graph is broken down into two separate call graphs. Those clauses which are large are separated from the primary call tree and given their own call tree. Each vertical column represents a call level. For example, main() is at level 0, Coder_12k2() at level 1, Int_lpc2() at level 2, Lsp_Az() at level 3, Get_lsp_pol() at level 4, etc. The basic operations are not counted as extending the depth, therefore the deepest level in this software is level 4.
Some items have been omitted from this call graph. All standard C functions: printf(), fwrite(), etc. have been omitted. Also, no basic operations (add(), L_add(), mac(), etc.) or double precision extended operations (e.g. L_Extract()) appear in the graphs. The reset functions of the encoder and decoder are only visible as the functions reset_enc and reset_dec, respectively. There are several subroutine calls from inside these functions.
The time order in the call graphs is from the bottom upwards as the processing of a frame advances.
Figure 1: Speech encoder call graph (see figures 2 and 3)
Figure 2: Speech encoder subframe processing call graph
Figure 3: Voice Activity Detector (VAD) call graph
Figure 4: Speech decoder call graph (see figure 5)
Figure 5: Speech decoder postfilter call graph
Change history |
|||||
SMG No. |
TDoc. No. |
CR. No. |
Clause affected |
New version |
Subject/Comments |
SMG#23 |
|
|
|
4.0.1 |
ETSI Publication |
SMG#20 |
|
|
|
5.1.2 |
Release 1996 version |
SMG#27 |
|
|
|
6.0.0 |
Release 1997 version |
SMG#29 |
|
|
|
7.0.0 |
Release 1998 version |
|
|
|
|
7.0.1 |
Version update to 7.0.1 for Publication |
SMG#31 |
|
|
|
8.0.0 |
Release 1999 version |
|
|
|
|
8.0.1 |
Update to Version 8.0.1 for Publication |
Change history |
|||||||
Date |
TSG # |
TSG Doc. |
CR |
Rev |
Subject/Comment |
Old |
New |
03-2001 |
11 |
|
|
|
Version for Release 4 |
|
4.0.0 |
06-2002 |
16 |
|
|
|
Version for Release 5 |
4.0.0 |
5.0.0 |
12-2004 |
26 |
|
|
|
Version for Release 6 |
5.0.0 |
6.0.0 |
06-2007 |
36 |
|
|
|
Version for Release 7 |
6.0.0 |
7.0.0 |
12-2008 |
42 |
|
|
|
Version for Release 8 |
7.0.0 |
8.0.0 |
Version Control
Version Control
Toto je jediná verze této specifikace.
Download & Access
46053-800
Technical Details
AI Classification
Version Information
Document Info
Keywords & Refs
Partners
File Info
3GPP Spec Explorer - Enhanced specification intelligence