1、 ETSI TS 126 204 V14.0.0 (2017-04) Digital cellular telecommunications system (Phase 2+) (GSM); Universal Mobile Telecommunications System (UMTS); LTE; Speech codec speech processing functions; Adaptive Multi-Rate - Wideband (AMR-WB) speech codec; ANSI-C code (3GPP TS 26.204 version 14.0.0 Release 1
2、4) floppy3TECHNICAL SPECIFICATION ETSI ETSI TS 126 204 V14.0.0 (2017-04)13GPP TS 26.204 version 14.0.0 Release 14Reference RTS/TSGS-0426204vE00 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
3、 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 print. The content of an
4、y 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 Portable Document Form
5、at (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 https:/portal.etsi.org/TB/ETSI
6、DeliverableStatus.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, in
7、cluding 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 Telecommunications Standard
8、s Institute 2017. 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 logo are Tr
9、ade Marks registered and owned by the GSM Association. ETSI ETSI TS 126 204 V14.0.0 (2017-04)23GPP TS 26.204 version 14.0.0 Release 14Intellectual Property Rights IPRs essential or potentially essential to the present document may have been declared to ETSI. The information pertaining to these essen
10、tial 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
11、 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)
12、 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 identities
13、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“,
14、 “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 citati
15、on. ETSI ETSI TS 126 204 V14.0.0 (2017-04)33GPP TS 26.204 version 14.0.0 Release 14Contents Intellectual Property Rights 2g3Foreword . 2g3Modal verbs terminology 2g3Foreword . 4g31 Scope 5g32 References 5g33 Definitions and abbreviations . 6g33.1 Definitions 6g33.2 Abbreviations . 6g34 C code struct
16、ure 6g34.1 Contents of the C source code 6g34.2 Program execution 6g34.3 Code hierarchy . 7g34.4 Variables, constants and tables . 14g34.4.1 Description of fixed tables used in the C-code . 15g34.4.2 Static variables used in the C-code . 16g35 Homing procedure 19g36 File formats 20g36.1 Speech file
17、(encoder input/decoder output) 20g36.2 Mode control file (encoder input) . 20g36.3 Parameter bitstream file (encoder output/decoder input) . 20g3Annex A (informative): Change history . 21g3History 22g3ETSI ETSI TS 126 204 V14.0.0 (2017-04)43GPP TS 26.204 version 14.0.0 Release 14Foreword This Techni
18、cal Specification (TS) 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 document, it will be re-release
19、d 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
20、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 204 V14.0.0 (2017-04)53GPP TS 26.204 version 14.0.0 Release 141 Scope The present do
21、cument contains an electronic copy of the ANSI-C code for the Floating-point Adaptive Multi-Rate Wideband codec. This floating-point codec specification is mainly targeted to be used in multimedia applications or in packet-based applications. The bit-exact fixed-point ANSI-C code in 3GPP TS 26.173 r
22、emains the preferred implementation for all applications, but the floating-point codec may be used instead of the fixed-point codec when the implementation platform is better suited for a floating-point implementation. It has been verified that the fixed-point and floating-point codecs interoperate
23、with each other without any artifacts. The floating-point ANSI-C code in the present document is the only standard conforming non-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 generation (
24、3GPP TS 26.192 4), and source controlled rate operation (3GPP TS 26.193 5). The floating-point code also contains example solutions for substituting and muting of lost frames (3GPP TS 26.191 3). The fixed-point specification in 26.173 shall remain the only allowed implementation for the 3G AMR-WB sp
25、eech service and the use of the floating-point codec is strictly limited to other services. The floating-point encoder in the present document is a non-bit-exact implementation of the fixed-point encoder producing quality indistinguishable from that of the fixed-point encoder. The decoder in the pre
26、sent document is functionally a bit-exact implementation of the fixed-point decoder, but the code has been optimized for speed and the standard fixed-point libraries are not used as such. 2 References The following documents contain provisions which, through reference in this text, constitute provis
27、ions 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
28、 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 speech codec, wideband; Test sequences“. 2 3GPP TS 26.190: “Mandatory Speech Codec speech processing func
29、tions AMR Wideband speech codec; Transcoding functions“. 3 3GPP TS 26.191: “AMR speech codec, wideband; Error concealment of lost frames“. 4 3GPP TS 26.192: “Mandatory Speech Codec speech processing functions AMR Wideband Speech Codec; Comfort noise aspects“. 5 3GPP TS 26.193: “AMR speech codec, wid
30、eband; Source controlled rate operation“. 6 3GPP TS 26.194: “Mandatory Speech Codec speech processing functions AMR Wideband speech codec; Voice Activity Detector (VAD)“. 7 RFC 3267 “A Real-Time Transport Protocol (RTP) Payload Format and File Storage Format for Adaptive Multi-Rate (AMR) and Adaptiv
31、e Multi-Rate Wideband (AMR-WB) Audio Codecs, June 2002. ETSI ETSI TS 126 204 V14.0.0 (2017-04)63GPP TS 26.204 version 14.0.0 Release 143 Definitions and abbreviations 3.1 Definitions For the purposes of the present document, the terms and definitions given in TS 26.190 2, TS 26.191 3, TS 26.192 4, T
32、S 26.193 5 and TS 26.194 6. 3.2 Abbreviations For the purposes of the present document, the following abbreviations apply: AMR-WB Adaptive Multi-Rate WideBand ANSI American National Standards Institute GSM Global System for Mobile communications I/O Input/OutputRAM Random Access Memory ROM Read Only
33、 Memory 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 the present document. The C code has been verified on the following systems: - IBM PC/AT compatible computers with Win
34、dows NT40 and Microsoft Visual C+ v.6.0 compiler. - IBM PC/AT compatible computers with Windows NT40 and Intel C/C+ v.4.0 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 l
35、evel. 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 in “rom“ files with suffix “c“. Makefiles are provided for the platforms in which the C code has been verified (listed above). Once the software is instal
36、led, this directory will have a compiled version of encoder and decoder and all the object files. 4.2 Program execution The Adaptive Multi-Rate Wideband codec is implemented in two programs: - (encoder) speech encoder; - (decoder) speech decoder. The programs should be called like: - encoder encoder
37、 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. ETSI ETSI TS 126 204 V14.0.0 (2017-04)73GPP TS 26.204 version 14.0.0 Release 14The encoder and decoder options will be explained by
38、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 and 2 are call graphs that show the functions used in the speech codec, including the functions of VAD, DTX, and comfort noise ge
39、neration. 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: memcpy(), fwrite(), etc.
40、 have been omitted. The initialization of the static RAM (i.e. calling the _init functions) is also omitted. ETSI ETSI TS 126 204 V14.0.0 (2017-04)83GPP TS 26.204 version 14.0.0 Release 14Table 1: Speech encoder call structure ETSI ETSI TS 126 204 V14.0.0 (2017-04)93GPP TS 26.204 version 14.0.0 Rele
41、ase 14E_MAIN_encode E_UTIL_decim_12k8 E_UTIL_down_samp E_UTIL_interpol E_UTIL_decim_12k8 E_UTIL_hp50_12k8 _UTIL_hp50_12k8 E_UTIL_f_preemph _DTX_vad E_DTX_filter_bank E_DTX_filter5 E_DTX_filter3 E_DTX_level_calculation E_DTX_decision E_DTX_noise_estimate_update E_DTX_update_cntrl E_DTX_hangover_addit
42、ion E_DTX_speech_estimate E_DTX_tx_handler _DTX_reset E_LPC_isf_init E_MAIN_parm_store _UTIL_autocorr E_LPC_lag_wind _LPC_lev_dur E_LPC_a_isp_conversion E_LPC_chebyshev _LPC_f_int_isp_find E_LPC_f_isp_a_conversion E_LPC_f_isp_pol_get E_LPC_isp_isf_conversion _GAIN_clip_isf_test E_LPC_a_weight_UTIL_r
43、esidu E_UTIL_deemph _GAIN_lp_decim2E_GAIN_open_loop_search _GAIN_olag_median E_GAIN_sort E_DTX_pitch_tone_detection_GAIN_open_loop_search E_GAIN_olag_median_DTX_pitch_tone_detectionE_UTIL_residu _DTX_buffer E_DTX_exe E_DTX_frame_indices_find E_DTX_isf_history_aver E_DTX_isf_q E_LPC_isf_sub_vq E_LPC_
44、isf_noise_d E_LPC_f_isf_reorder E_DTX_dithering_control E_UTIL_random E_MAIN_reset E_GAIN_clip_init E_DTX_reset E_DTX_vad_reset E_LPC_isf_2s3s_quantise E_LPC_stage1_isf_vq E_LPC_isf_sub_vq E_LPC_stage1_isf_vq E_LPC_isf_sub_vq E_LPC_isf_2s3s_decode E_LPC_isf_reorder E_LPC_isf_2s5s_quantise E_LPC_stag
45、e1_isf_vq E_LPC_isf_sub_vq E_LPC_isf_2s5s_decode E_LPC_isf_reorder E_LPC_isf_isp_conversion _LPC_int_isp_find E_LPC_isp_a_conversion E_LPC_isp_pol_get E_UTIL_l_extract E_UTIL_mpy_32_16 E_UTIL_l_extract E_UTIL_mpy_32_16 E_UTIL_residu _DTX_buffer E_UTIL_residuE_UTIL_synthesis E_LPC_a_weight _UTIL_resi
46、duE_UTIL_deemph _UTIL_f_preemph E_LPC_a_weightE_UTIL_synthesis ETSI ETSI TS 126 204 V14.0.0 (2017-04)103GPP TS 26.204 version 14.0.0 Release 14E_UTIL_residu _LPC_a_weightE_UTIL_synthesisE_UTIL_deemph _GAIN_closed_loop_search E_GAIN_norm_corr E_UTIL_f_convolve E_GAIN_norm_corr_interpolate E_GAIN_clip
47、_test _GAIN_adaptive_codebook_excitation E_UTIL_convolve E_ACELP_xy1_corr E_ACELP_codebook_target_update E_UTIL_convolve E_ACELP_xy1_corr E_ACELP_codebook_target_update E_UTIL_f_preemph _GAIN_f_pitch_sharpening E_ACELP_xh_corrE_ACELP_2t E_ACELP_4t E_ACELP_h_vec_corr1E_ACELP_h_vec_corr2E_ACELP_2pulse
48、_search E_ACELP_quant_1p_N1 E_ACELP_quant_2p_2N1 E_ACELP_quant_3p_3N1 E_ACELP_quant_2p_2N1 E_ACELP_quant_1p_N1 E_ACELP_quant_4p_4N E_ACELP_quant_4p_4N1 E_ACELP_quant_2p_2N1 E_ACELP_quant_1p_N1 E_ACELP_quant_3p_3N1 E_ACELP_quant_2p_2N1 E_ACELP_quant_3p_3N1 E_ACELP_quant_5p_5N E_ACELP_quant_3p_3N1 E_A
49、CELP_quant_2p_2N1 E_ACELP_quant_6p_6N_2 E_ACELP_quant_5p_5N E_ACELP_quant_1p_N1 E_ACELP_quant_4p_4N E_ACELP_quant_2p_2N1 E_ACELP_quant_3p_3N1 E_UTIL_preemph _GAIN_pitch_sharpeningE_ACELP_xy2_corr E_ACELP_gains_quantise E_UTIL_dot_product12 E_UTIL_saturate_31 E_UTIL_norm_lE_UTIL_normalized_inverse_sqrt E_UTIL_l_extract E_UTIL_saturateE_UTIL_mpy_32_16 E_UTIL_log2_32 E_UTIL_norm_l E_UTIL_normalized_log2E_UTIL_signal_up_scale _UTIL_signal_down_scale E_GAIN_clip_pit_test _UTIL_signal_down_scale E_GAIN_voice_f