Digital cellular telecommunications system (Phase 2+) (GSM); Universal Mobile Telecommunications System (UMTS); LTE; ANSI-C code for the Adaptive Multi-Rate - Wideband (AMR-WB) speech codec (3GPP TS 26.173 version 15.1.0 Release 15)

RTS/TSGS-0426173vf10

General Information

Status
Published
Publication Date
08-Apr-2019
Technical Committee
Current Stage
12 - Completion
Completion Date
09-Apr-2019
Ref Project

Buy Standard

Standard
ETSI TS 126 173 V15.1.0 (2019-04) - Digital cellular telecommunications system (Phase 2+) (GSM); Universal Mobile Telecommunications System (UMTS); LTE; ANSI-C code for the Adaptive Multi-Rate - Wideband (AMR-WB) speech codec (3GPP TS 26.173 version 15.1.0 Release 15)
English language
23 pages
sale 15% off
Preview
sale 15% off
Preview

Standards Content (Sample)

ETSI TS 126 173 V15.1.0 (2019-04)






TECHNICAL SPECIFICATION
Digital cellular telecommunications system (Phase 2+) (GSM);
Universal Mobile Telecommunications System (UMTS);
LTE;
ANSI-C code for the Adaptive Multi-Rate - Wideband (AMR-WB)
speech codec
(3GPP TS 26.173 version 15.1.0 Release 15)



---------------------- Page: 1 ----------------------
3GPP TS 26.173 version 15.1.0 Release 15 1 ETSI TS 126 173 V15.1.0 (2019-04)



Reference
RTS/TSGS-0426173vf10
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

Siret N° 348 623 562 00017 - NAF 742 C
Association à but non lucratif enregistrée à la
Sous-Préfecture 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 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 prevailing version of an ETSI
deliverable is the one made publicly available in PDF format at www.etsi.org/deliver.
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
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 in 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 reproduction in all media.

© ETSI 2019.
All rights reserved.

TM TM TM
DECT , PLUGTESTS , UMTS and the ETSI logo are trademarks of ETSI registered for the benefit of its Members.
TM TM
3GPP and LTE are trademarks of ETSI registered for the benefit of its Members and
of the 3GPP Organizational Partners.
oneM2M™ logo is a trademark of ETSI registered for the benefit of its Members and
of the oneM2M Partners.
®
GSM and the GSM logo are trademarks registered and owned by the GSM Association.
ETSI

---------------------- Page: 2 ----------------------
3GPP TS 26.173 version 15.1.0 Release 15 2 ETSI TS 126 173 V15.1.0 (2019-04)
Intellectual Property Rights
Essential patents
IPRs essential or potentially essential to normative deliverables may have been declared to ETSI. The information
pertaining to these 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. Latest 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 Web
server) which are, or may be, or may become, essential to the present document.
Trademarks
The present document may include trademarks and/or tradenames which are asserted and/or registered by their owners.
ETSI claims no ownership of these except for any which are indicated as being the property of ETSI, and conveys no
right to use or reproduce any trademark and/or tradename. Mention of those trademarks in the present document does
not constitute an endorsement by ETSI of products, services or organizations associated with those trademarks.
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 identities 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", "shall 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 direct citation.
ETSI

---------------------- Page: 3 ----------------------
3GPP TS 26.173 version 15.1.0 Release 15 3 ETSI TS 126 173 V15.1.0 (2019-04)
Contents
Intellectual Property Rights . 2
Foreword . 2
Modal verbs terminology . 2
Foreword . 4
1 Scope . 5
2 References . 5
3 Definitions and abbreviations . 5
3.1 Definitions . 5
3.2 Abbreviations . 5
4 C code structure . 6
4.1 Contents of the C source code . 6
4.2 Program execution . 6
4.3 Code hierarchy . 6
4.5 Variables, constants and tables . 10
4.5.1 Description of constants used in the C-code . 11
4.5.2 Description of fixed tables used in the C-code . 11
4.5.3 Static variables used in the C-code . 13
5 Homing procedure . 17
6 File formats . 17
6.1 Speech file (encoder input / decoder output) . 17
6.2 Mode control file (encoder input) . 17
6.3 Parameter bitstream file (encoder output / decoder input) . 18
Default 3GPP format: . 18
ITU format (activated with command line parameter -itu) . 19
MIME/file storage format (activated with command line parameter -mime) . 19
Annex A (informative): Change history . 20
History . 22

ETSI

---------------------- Page: 4 ----------------------
3GPP TS 26.173 version 15.1.0 Release 15 4 ETSI TS 126 173 V15.1.0 (2019-04)
Foreword
rd
This Technical Specification (TS) has been produced by the 3 Generation 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 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.
ETSI

---------------------- Page: 5 ----------------------
3GPP TS 26.173 version 15.1.0 Release 15 5 ETSI TS 126 173 V15.1.0 (2019-04)
1 Scope
The present document contains an electronic copy of the ANSI-C code for the Adaptive Multi-Rate Wideband codec.
The ANSI-C code is necessary for a bit exact implementation of the Adaptive Multi Rate Wideband speech transcoder
(3GPP TS 26.190 [2]), Voice Activity Detection (3GPP TS 26.194 [6]), comfort noise (3GPP TS 26.192 [4]), source
controlled rate operation (3GPP TS 26.193 [5]) and example solutions for substituting and muting of lost frames (3GPP
TS 26.191 [3]).
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 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] 3GPP TS 26.174: "AMR Wideband Speech Codec; Test sequences".
[2] 3GPP TS 26.190: "AMR Wideband Speech Codec; Speech transcoding".
[3] 3GPP TS 26.191: "AMR Wideband Speech Codec; Substitution and muting of lost frames".
[4] 3GPP TS 26.192: "AMR Wideband Speech Codec; Comfort noise aspects".
[5] 3GPP TS 26.193: "AMR Wideband Speech Codec; Source controlled rate operation".
[6] 3GPP TS 26.194: "AMR Wideband Speech Codec; Voice Activity Detection".
[7] RFC 3267 "A Real-Time Transport Protocol (RTP) Payload Format and File Storage Format for
Adaptive Multi-Rate (AMR) and Adaptive Multi-Rate Wideband (AMR-WB) Audio Codecs",
June 2002.
3 Definitions and abbreviations
3.1 Definitions
Definition of terms used in the present document, can be found in 3GPP TS 26.190 [2], 3GPP TS 26.191 [3], 3GPP
TS 26.192 [4], 3GPP TS 26.193 [5] and 3GPP TS 26.194 [6].
3.2 Abbreviations
For the purpose of the present document, the following abbreviations apply:
AMR-WB Adaptive Multi-Rate Wideband
ANSI American National Standards Institute
ETS European Telecommunication Standard
GSM Global System for Mobile communications
I/O Input/Output
RAM Random Access Memory
ROM Read Only Memory

ETSI

---------------------- Page: 6 ----------------------
3GPP TS 26.173 version 15.1.0 Release 15 6 ETSI TS 126 173 V15.1.0 (2019-04)
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 attached to this document.
The C code has been verified on the following systems:
- Sun Microsystems workstations and GNU gcc compiler
- HP workstations and cc compiler
- IBM PC compatible computers with Windows NT4 operating system and GNU gcc compiler.
ANSI-C was selected as 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 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 "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", "spch_unx.cod", "spch_unx.dec" and "spch_unx.out", respectively.
Final verification is to be performed using the GSM Adaptive Multi-Rate Wideband test sequences described in 3GPP
TS 26.174 [1].
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 the speech
codec) and all the object files.
4.2 Program execution
The GSM Adaptive Multi-Rate Wideband codec is implemented in two programs:
- (encoder) speech encoder;
- (decoder) speech decoder.
The programs should be called like:
- encoder [encoder options] ;
- decoder .
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 without input arguments. See the file
readme.txt for more information on how to run the encoder and decoder programs.
4.3 Code hierarchy
Tables 1 to 3 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 and 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 (add(), L_add(), mac(),
ETSI

---------------------- Page: 7 ----------------------
3GPP TS 26.173 version 15.1.0 Release 15 7 ETSI TS 126 173 V15.1.0 (2019-04)
etc.) or double precision extended operations (e.g. L_Extract()) appear in the graphs. The initialization of the static
RAM (i.e. calling the _init functions) is also omitted.
The basic operations are not counted as extending the depth, therefore the deepest level in this software is level 6.
The encoder call graph is broken down into two separate call graphs, Table 1 to 2.
ETSI

---------------------- Page: 8 ----------------------
3GPP TS 26.173 version 15.1.0 Release 15 8 ETSI TS 126 173 V15.1.0 (2019-04)
Table 1: Speech encoder call structure
coder Copy
Decim_12k8 Down_samp Interpol (function)
 Copy
Set_zero
HP50_12k8
Scale_sig
wb_vad Filter_bank Filter5
  Filter3
  Level_calculation
 vad_decision Ilog2
  Noise_estimate_update update_cntrl
  hangover_addition
 Estimate_Speech
tx_dtx_handler
Parm_serial
Autocorr
Lag_window
Levinson
Az_isp Chebps2
Int_isp Isp_Az Get_isp_pol
Isp_isf
Gp_clip_test_isf
Weight_a
Residu
Deemph2
LP_Decim2
Scale_mem_Hp_wsp
Pitch_med_ol Hp_wsp
 Isqrt_n
wb_vad_tone_detection
Med_olag median5
dtx_buffer Copy
dtx_enc Find_frame_indices
 Aver_isf_history
 Qisf_ns Sub_VQ
  Disf_ns Reorder_isf
 Parm_serial
 Pow2
 Random
 Dot_product12
 Isqrt_n
Isf_isp
Isp_Az Get_isp_pol
Synthesis Copy
 Syn_filt_32
 Deemph_32
 HP50_12k8
 Random
 Scale_sig
 Dot_product12
 Isqrt_n
 HP400_12k8
 Weight_a
 Syn_filt
 Filt_6k_7k
Reset_encoder Set_zero
 Init_gp_clip
 Init_Phase_dispersion Set_zero
Qpisf_2s_36b VQ_stage1
 Sub_VQ
 Dpisf_2s_36b Reorder_isf
Qpisf_2s_46b VQ_stage1
 Sub_VQ
 Dpisf_2s_46b Reorder_isf
Syn_filt
Preemph2
Pitch_fr4 Norm_Corr Convolve
  Isqrt_n
 Interpol_4
Gp_clip
Pred_lt4
Convolve
G_pitch Dot_product12
Updt_tar
Preemph
Pit_shrp
Cor_h_x
ACELP_2t64_fx Dot_product12
 Isqrt_n
ACELP_4t64_fx See Table 2
Q_gain2 Dot_product12
 Pow2
Gp_clip_test_gain_pit
voice_factor Dot_product12

ETSI

---------------------- Page: 9 ----------------------
3GPP TS 26.173 version 15.1.0 Release 15 9 ETSI TS 126 173 V15.1.0 (2019-04)
Table 2: ACELP_4t64_fx call structure
ACELP_4t64_fx Dot_product12
Isqrt_n
cor_h_vec
search_ixiy
quant_1p_N1
quant_2p_2N1
quant_3p_3N1 quant_2p_2N1
 quant_1p_N1
quant_4p_4N quant_4p_4N1 Quant_2p_2N1
 quant_1p_N1
 quant_3p_3N1 Quant_2p_2N1
  Quant_1p_N1
 quant_2p_2N1
quant_5p_5N quant_3p_3N1 Quant_2p_2N1
  Quant_1p_N1
 quant_2p_2N1
quant_6p_6N_2 quant_5p_5N Quant_3p_3N1 quant_2p_2N1
  Quant_1p_N1
  quant_2p_2N1
 quant_1p_N1
 quant_4p_4N quant_4p_4N1 quant_2p_2N1
  quant_1p_N1
  quant_3p_3N1 quant_2p_2N1
  quant_1p_N1
  quant_2p_2N1
 quant_2p_2N1
 quant_3p_3N1 quant_2p_2N1
  Quant_1p_N1

ETSI

---------------------- Page: 10 ----------------------
3GPP TS 26.173 version 15.1.0 Release 15 10 ETSI TS 126 173 V15.1.0 (2019-04)
Table 3: Speech decoder call structure
decoder Rx_dtx_handler
Dtx_dec Copy
 Disf_ns Reorder_isf
 Serial_parm
 Pow2
 Random
 Dot_product12
 Isqrt_n
Serial_parm
Isf_isp
Isp_Az Get_isp_pol
Copy
Synthesis Copy
 Syn_filt_32
 Deemph_32
 HP50_12k8
 Oversamp_16k Copy
  Up_samp Interpol
 Random
 Scale_sig
 Dot_product12
 Isqrt_n
 HP400_12k8
 Isf_Extrapolation Isf_isp
 Isp_Az Get_isp_pol
 Weight_a
 Syn_filt
 Filt_6k_7k Copy
 Filt_7k Copy
Reset_decoder Set_zero
 Init_Phase_dispersion Set_zero
Dpisf_2s_36b Reorder_isf
Dpisf_2s_46b Reorder_isf
Int_isp Isp_Az Get_isp_pol
Lagconc insertion_sort Insert
 Random
Pred_lt4
Random
DEC_ACELP_2t64_fx
DEC_ACELP_4t64_fx dec_1p_N1
 add_pulses
 dec_2p_2N1
 dec_3p_3N1 Dec_2p_2N1
  dec_1p_N1
 dec_4p_4N dec_4p_4N1 dec_2p_2N1
  dec_1p_N1
  Dec_3p_3N1 Dec_2p_2N1
  Dec_1p_N1
  Dec_2p_2N1
 dec_5p_5N dec_3p_3N1 Dec_2p_2N1
  Dec_1p_N1
  Dec_2p_2N1
 dec_6p_6N_2 Dec_5p_5N dec_3p_3N1 Dec_2p_2N1
   Dec_1p_N1
  dec_2p_2N1
  dec_1p_N1
  dec_4p_4N dec_4p_4N1 dec_2p_2N1
  dec_1p_N1
  Dec_3p_3N1 Dec_2p_2N1
   Dec_1p_N1
  Dec_2p_2N1
  dec_2p_2N1
  dec_3p_3N1 Dec_2p_2N1
  Dec_1p_N1
Preemph
Pit_shrp
D_gain2 Dot_product12
 Isqrt_n
 Median5
 Pow2
Scale_sig
voice_factor Dot_product12
Phase_dispersion Set_zero
Agc2 Isqrt Isqrt_n
Set_zero
Dtx_dec_activity_update Copy

4.5 Variables, constants and tables
The data types of variables and tables used in the fixed point implementation are signed integers in 2's complement
representation, defined by:
- Word16 16 bit variable;
- Word32 32 bit variable.
ETSI

---------------------- Page: 11 ----------------------
3GPP TS 26.173 version 15.1.0 Release 15 11 ETSI TS 126 173 V15.1.0 (2019-04)
4.5.1 Description of constants used in the C-code
This subclause contains a listing of all global constants defined in cnst.h.
Table 5: Global constants
Constant Value Description
L_TOTAL 384 total size of speech buffer.
L_WINDOW 384 window size in LP analysis
L_NEXT 64 Look-ahead size
L_FRAME 256 frame size in 12.8 kHz
L_FRAME16k 320 frame size in 16 kHz
L_SUBFR 64 Subframe size in 12.8 kHz
L_SUBFR16k 80 Subframe size in 16 kHz
NB_SUBFR 4 Number of subframes
M16k 20 order of LP filter in high-band synthesis in 6.60 mode
M 16 order of LP filter
L_FILT16k 15 Delay of down-sampling filter in 16 kHz
L_FILT 12 Delay of down-sampling filter in 12.8 kHz
GP_CLIP 15565 Pitch gain clipping
PIT_SHARP 27853 pitch sharpening factor
PIT_MIN 34 minimum pitch lag (all modes)
PIT_FR2 128 Minimum pitch lag with resolution ½
PIT_FR1_9b 160 Minimum pitch lag with resolution for 9 bit quantization
PIT_FR1_8b 92 Minimum pitch lag with resolution for 8 bit quantization
PIT_MAX 231 maximum pitch lag
L_INTERPOL (16+1) length of filter for interpolation
OPL_DECIM 2 Decimation in open-loop pitch analysis
PREEMPH_FAC 22282 preemphasis factor
GAMMA1 30147 Weighting factor (numerator)
TILT_FAC 22282 tilt factor (denominator)
Q_MAX 8 scaling max for signal
RANDOM_INITSEED 21845 random init value
L_MEANBUF 3 Size of ISF buffer
ONE_PER_MEANBUF 10923 Inverse of L_MEANBUF

4.5.2 Description of fixed tables used in the C-code
This section contains a listing of all fixed tables sorted by source file name and table name. All table data is declared as
Word16.
Table 6: Fixed tables
File Table name Length Description
c4t64fx.c tipos 36 Starting points of iterations
cod_main.c HP_gain 16 High band gain table for 23.85 kbit/s mode
cod_main.c interpol_frac 4 LPC interpolation coefficients
cod_main.c isp_init 16 Isp tables for initialization
cod_main.c isf_init 16 Isf tables for initialization
d_gain2.c cdown_unusable 7 Attenuation factors for codebook gain in lost frames
d_gain2.c cdown_usable 7 Attenuation factors for codebook gain in bad frames
d_gain2.c pdown_unusable 7 Attenuation factors for adaptive codebook gain in lost frames
d_gain2.c pdown_usable 7 Attenuation factors for adaptive codebook gain in bad frames
d_gain2.c pred 4 Algebraic code book gain MA predictor coefficients
dec_main.c HP_gain 16 High band gain table for 23.85 kbit/s mode
dec_main.c interpol_frac 4 LPC interpolation coefficients
dec_main.c isp_init 16 Isp tables for initialization
dec_main.c isf_init 16 Isf tables for initialization
decim54.c fir_down 120 Downsample FIR filter coefficients
decim54.c fir_up 120 Upsample FIR filter coefficients
ETSI

---------------------- Page: 12 ----------------------
3GPP TS 26.173 version 15.1.0 Release 15 12 ETSI TS 126 173 V15.1.0 (2019-04)
File Table name Length Description
dtx.c en_adjust 9 Energy scaling factor for each mode during comfort noise
grid100.tab grid 101 Grid points of Chebyshev polynomials
ham_wind.tab window 384 LP analysis window
hp400.c a 3 HP filter coefficients (denominator) in higher band energy
estimation
hp400.c b 3 HP filter coefficients (numerator) in higher band energy
estimation
hp50.c a 3 HP filter coefficients (denominator) in pre-filtering
hp50.c b 3 HP filter coefficients (numerator) in pre-filtering
hp6k.c fir_6k_7k 31 Bandpass FIR filter coefficients for higher band generation
hp7k.c fir_7k 31 Bandpass FIR filter coefficients for higher band in 23.85 kbit/s
mode
hp_wsp.c a 3 HP filter coefficients (denominator) in open-loop lag gain
computation
hp_wsp.c b 3 HP filter coefficients (numerator) in open-loop lag gain
computation
isp_isf.tab slope 128 Table to compute acos(x) in Isp_isf()
isp_isf.tab table 129 Table to compute cos(x) in Isf_isp()
lag_wind.tab lag_h 16 High part of the lag window table
lag_wind.tab lag_l 16 Low part of the lag window table
lp_dec2.c h_fir 5 HP FIR filter coefficients in open-loop lag search
math_op.c table_isqrt 49 Table used in inverse square root computation
math_op.c table_pow2 33 Table used in power of two computation
p_med_ol.tab corrweight 199 Weighting of the correlation function in open loop LTP search
ph_disp.c ph_imp_low 64 Phase dispersion impulse response
ph_disp.c ph_imp_mid 64 Phase dispersion impulse response
pitch_f4.c inter4_1 32 Interpolation filter coefficients
pred_lt4.c inter4_2 128 Interpolation filter coefficients
q_gain2.c pred 4 Algebraic code book gain MA predictor coefficients
q_gain2.tab t_qua_gain6b 2*64 Gain quantization table for 6-bit gain quantization
q_gain2.tab t_qua_gain7b 2*128 Gain quantization table for 7-bit gain quantization
qisf_ns.tab dico1_isf_noise 2*64 1st ISF quantizer for comfort noise
qisf_ns.tab dico2_isf_noise 3*64 2nd ISF quantizer for comfort noise
qisf_ns.tab dico3_isf_noise 3*64 3rd ISF quantizer for comfort noise
qisf_ns.tab dico4_isf_noise 4*32 4th ISF quantizer for comfort noise
qisf_ns.tab dico5_isf_noise 4*32 5th ISF quantizer for comfort noise
qisf_ns.tab mean_isf_noise 16 ISF mean for comfort noise
qpisf_2s.tab dico1_isf 9*256 1st ISF quantizer of the 1st stage
qpisf_2s.tab dico2_isf 7*256 2nd ISF quantizer of the 1st stage
qpisf_2s.tab dico21_isf 3*64 1st ISF quantizer of the 2nd stage (not the 6.60 kbit/s mode)
qpisf_2s.tab dico21_isf_36b 5*128 1st ISF quantizer of the 2nd stage (the 6.60 kbit/s mode)
qpisf_2s.tab dico22_isf 3*128 2nd ISF quantizer of the 2nd stage (not the 6.60 kbit/s mode)
qpisf_2s.tab dico22_isf_36b 4*128 2nd ISF quantizer of the 2nd stage (the 6.60 kbit/s mode)
qpisf_2s.tab dico23_isf 3*128 3rd ISF quantizer of the 2nd stage (not the 6.60 kbit/s mode)
qpisf_2s.tab dico23_isf_36b 7*64 3rd ISF quantizer of the 2nd stage (the 6.60 kbit/s mode)
qpisf_2s.tab dico24_isf 3*32 4th ISF quantizer of the 2nd stage (not the 6.60 kbit/s mode)
qpisf_2s.tab dico25_isf 4*32 5th ISF quantizer of the 2nd stage (not the 6.60 kbit/s mode)
qpisf_2s.tab mean_isf 16 ISF mean

ETSI

---------------------- Page: 13 ----------------------
3GPP TS 26.173 version 15.1.0 Release 15 13 ETSI TS 126 173 V15.1.0 (2019-04)
4.5.3 Static variables used in the C-code
In this section two tables that specify the static variables for the speech encoder and decoder respectively are shown. All
static variables are declared within a C struct.
ETSI

---------------------- Page: 14 ----------------------
3GPP TS 26.173 version 15.1.0 Release 15 14 ETSI TS 126 173 V15.1.0 (2019-04)
Table 7: Speech encoder static variables
ETSI

---------------------- Page: 15 ----------------------
3GPP TS 26.173 version 15.1.0 Release 15 15 ETSI TS 126 173 V15.1.0 (2019-04)
Struct name Variable Type[Length] Description
Coder_State mem_decim Word16[30] Decimation filter memory
mem_sig_in Word16[6] Prefilter memory
mem_preemph Word16 Preemphasis filter memory
old_speech Word16[128] speech buffer
old_wsp Word16[115] buffer holding spectral weighted speech
old_exc Word16[248] excitation vector
mem_levinson Word16[18] Levinson memories
Ispold Word16[16] Old ISP vector
ispold_q Word16[16] Old quantized ISP vector
past_isfq Word16[16] past quantized ISF prediction error
mem_wsp Word16 Open-loop LTP deemphasis filter memory
mem_decim2 Word16[3] Open-loop LTP decimation filter memory
mem_w0 Word16 weighting filter memory (applied to error signal)
mem_syn Word16[16] synthesis filter memory
tilt_code Word16 Preemhasis filter memory
old_wsp_max Word16 Open loop scaling factor
old_wsp_shift Word16 Maximum open loop scaling factor
Q_old Word16 Old scaling factor
Q_max Word16[2] Maximum scaling factor
gp_clip Word16[2] memory of pitch clipping
qua_gain Word16[4] Gain quantization memory
old_T0_med Word16 weighted open loop pitch lag
ol_gain Word16 Open-loop gain
ada_w Word16 weigthing level depeding on open loop pitch gain
ol_wght_flg Word16 switches lag weighting on and off
old_ol_lag Word16[5] Open loop lag history
hp_wsp_mem Word16[9] Open-loop lag gain filter memory
old_hp_wsp Word16[243] Open-loop lag
vadSt VadVars* see below in this table
dtx_encSt dtx_encState* see below in this table
first_frame Word16 First frame indicator
Isfold Word16[16] Old ISF vector
L_gc_thres Word16 Noise enhancer threshold
mem_syn_hi Word16[16] synthesis filter memory (most significant word)
mem_syn_lo Word16[16] synthesis filter memory (least significant word)
mem_deemph Word16 Deemphasis filter memory
mem_sig_out Word16[6] HP filter memory in the synthesis
mem_hp400 Word16[6] HP filter memory
mem_oversamp Word16[2*12] Oversampling filter memory
mem_syn_hf Word16[16] Higher band synthesis filter memory
mem_hf Word16[30] Estima
...

Questions, Comments and Discussion

Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.