General Information

Abstract

Adaptive Multi- Rate (AMR) ANSI C Source code

Status
Published
Publication Date
30-Nov-2003
Current Stage
6060 - National Implementation/Publication (Adopted Project)
Start Date
01-Dec-2003
Due Date
01-Dec-2003
Completion Date
01-Dec-2003
Mandate
T-172

Buy Documents

Standard

SIST EN 301 712 V7.2.1:2003

English language (25 pages)
Preview
Preview
e-Library read for
×1 day

Overview

SIST EN 301 712 V7.2.1:2003 defines the ANSI-C reference implementation of the Adaptive Multi-Rate (AMR) speech codec, compliant with the Global System for Mobile Communications (GSM) Phase 2+ standard. Produced by the Slovenski inštitut za standardizacijo (SIST), this standard aligns with the European Telecommunications Standards Institute (ETSI) EN 301 712, specifying a bit-exact C source code necessary to ensure consistent AMR speech transcoding and processing in digital cellular systems.

The AMR speech codec plays a crucial role in delivering high-quality and efficient speech transmission over GSM mobile networks, while the provided ANSI-C code forms the foundation for software and hardware implementations of AMR encoding and decoding globally.

Key Topics

  • AMR Speech Codec: Fundamental for GSM networks, supporting multiple bit rates to optimize speech quality and bandwidth usage under varying radio conditions.
  • ANSI-C Source Code: Offers a portable, reference-grade implementation, enabling interoperability and bit-exact validation for speech codec software across different platforms.
  • GSM Phase 2+ Compliance: The standard guarantees compatibility with the broader GSM ecosystem, supporting essential features such as voice activity detection (VAD), discontinuous transmission (DTX), and comfort noise generation.
  • Bit-Exactness: Ensures consistent operation and output across implementations, a critical requirement for certification, testing, and deployment in telecom infrastructures.
  • Codec Structure and Operation: The documentation includes both the encoder and decoder structure, code hierarchy, variable definitions, fixed tables, constants, and operational guidelines for integration and verification.

Applications

  • Mobile Telephony: The AMR speech codec is widely deployed in GSM mobile phones, base stations, and switching networks for voice services, facilitating clear communication even in fluctuating radio conditions.
  • Reference Implementation in R&D: Telecommunications equipment manufacturers and software developers use the standard’s ANSI-C reference code for benchmarking, conformance testing, and developing proprietary or optimized codec implementations.
  • Network Equipment Certification: Network operators and test laboratories deploy the reference code to validate third-party AMR codec performance and ensure strict bit-exactness during system certifications.
  • Embedded Platform Integration: Device OEMs utilize the C code as a baseline for porting the codec into embedded platforms, including DSPs and microcontrollers, maintaining consistency and quality control.
  • Educational and Training Resource: The comprehensive source and structure documentation supports training, research, and in-depth study of speech codec technologies and GSM signal processing.

Related Standards

SIST EN 301 712 V7.2.1:2003 references and works alongside several related GSM and ETSI standards, notably:

  • GSM 06.90: Adaptive Multi-Rate (AMR) speech transcoding
  • GSM 06.91: Substitution and muting of lost frames for AMR speech traffic channels
  • GSM 06.92: Comfort noise aspects for AMR channels
  • GSM 06.93: Discontinuous transmission (DTX) for AMR channels
  • GSM 06.94: Voice Activity Detector (VAD) for AMR
  • GSM 06.74: Test sequences for AMR speech codec
  • GSM 01.04: Abbreviations and acronyms

These standards collectively support development, testing, and operation of reliable digital speech services within the global mobile telecommunications industry.


Keywords: Adaptive Multi-Rate (AMR) codec, ANSI-C reference code, GSM speech codec, mobile telecommunication standards, bit-exact codec, SIST, ETSI, speech encoding and decoding, digital cellular systems, codec validation.

Buy Documents

Standard

SIST EN 301 712 V7.2.1:2003

English language (25 pages)
Preview
Preview
e-Library read for
×1 day

Get Certified

Connect with accredited certification bodies for this standard

ANCE

Mexican certification and testing association.

EMA Mexico Verified

Intertek Slovenia

Intertek testing, inspection, and certification services in Slovenia.

UKAS Slovenia Verified

LNE (Laboratoire National de Métrologie et d'Essais)

French national laboratory for metrology and testing.

COFRAC France Verified

Sponsored listings

Frequently Asked Questions

SIST EN 301 712 V7.2.1:2003 is a standard published by the Slovenian Institute for Standardization (SIST). Its full title is "Digital cellular telecommunications system (Phase 2+) (GSM); Adaptive Multi Rate (AMR) speech; ANSI-C code for the AMR speech codec (GSM 06.73 version 7.2.1 Release 1998)". This standard covers: Adaptive Multi- Rate (AMR) ANSI C Source code

Adaptive Multi- Rate (AMR) ANSI C Source code

SIST EN 301 712 V7.2.1:2003 is classified under the following ICS (International Classification for Standards) categories: 33.070.50 - Global System for Mobile Communication (GSM). The ICS classification helps identify the subject area and facilitates finding related standards.

SIST EN 301 712 V7.2.1:2003 is associated with the following European legislation: Standardization Mandates: T-172. When a standard is cited in the Official Journal of the European Union, products manufactured in conformity with it benefit from a presumption of conformity with the essential requirements of the corresponding EU directive or regulation.

SIST EN 301 712 V7.2.1:2003 is available in PDF format for immediate download after purchase. The document can be added to your cart and obtained through the secure checkout process. Digital delivery ensures instant access to the complete standard document.

Standards Content (Sample)


2003-01.Slovenski inštitut za standardizacijo. Razmnoževanje celote ali delov tega standarda ni dovoljeno.Digital cellular telecommunications system (Phase 2+) (GSM); Adaptive Multi Rate (AMR) speech; ANSI-C code for the AMR speech codec (GSM 06.73 version 7.2.1 Release 1998)33.070.50Globalni sistem za mobilno telekomunikacijo (GSM)Global System for Mobile Communication (GSM)ICS:Ta slovenski standard je istoveten z:EN 301 712 Version 7.2.1SIST EN 301 712 V7.2.1:2003en01-december-2003SIST EN 301 712 V7.2.1:2003SLOVENSKI
STANDARD
ETSIEN301712V7.2.1(2000-04)EuropeanStandard(Telecommunicationsseries)Digitalcellulartelecommunicationssystem(Phase2+);AdaptiveMultiRate(AMR)speech;ANSI-CcodefortheAMRspeechcodec(GSM06.73version7.2.1Release1998)GLOBALSYSTEMFORMOBILECOMMUNICATIONSRSIST EN 301 712 V7.2.1:2003

ETSIETSIEN301712V7.2.1(2000-04)2(GSM06.73version7.2.1Release1998)ReferenceREN/SMG-110673Q7R1KeywordsDigitalcellulartelecommunicationssystem,GlobalSystemforMobilecommunications(GSM)AMR,ANSICCodeETSI650RoutedesLuciolesF-06921SophiaAntipolisCedex-FRANCETel.:+33492944200Fax:+33493654716SiretN°34862356200017-NAF742CAssociationàbutnonlucratifenregistréeàlaSous-PréfecturedeGrasse(06)N°7803/88ImportantnoticeIndividualcopiesofthepresentdocumentcanbedownloadedfrom:http://www.etsi.orgThepresentdocumentmaybemadeavailableinmorethanoneelectronicversionorinprint.Inanycaseofexistingorperceiveddifferenceincontentsbetweensuchversions,thereferenceversionisthePortableDocumentFormat(PDF).Incaseofdispute,thereferenceshallbetheprintingonETSIprintersofthePDFversionkeptonaspecificnetworkdrivewithinETSISecretariat.Usersofthepresentdocumentshouldbeawarethatthedocumentmaybesubjecttorevisionorchangeofstatus.InformationonthecurrentstatusofthisandotherETSIdocumentsisavailableathttp://www.etsi.org/tb/status/Ifyoufinderrorsinthepresentdocument,sendyourcommentto:editor@etsi.frCopyrightNotificationNopartmaybereproducedexceptasauthorizedbywrittenpermission.Thecopyrightandtheforegoingrestrictionextendtoreproductioninallmedia.©EuropeanTelecommunicationsStandardsInstitute2000.Allrightsreserved.SIST EN 301 712 V7.2.1:2003

ETSIETSIEN301712V7.2.1(2000-04)3(GSM06.73version7.2.1Release1998)ContentsIntellectualPropertyRights.4Foreword.41Scope.52References.53Definitionsandabbreviations.63.1Definitions.63.2Abbreviations.64Ccodestructure.64.1ContentsoftheCsourcecode.64.2Programexecution.74.3Codingstyle.74.4Codehierarchy.74.5Variables,constantsandtables.114.5.1DescriptionofconstantsusedintheC-code.114.5.2DescriptionoffixedtablesusedintheC-code.124.5.3StaticvariablesusedintheC-code.145Homingprocedure.176Fileformats.236.1Speechfile(encoderinput/decoderoutput).236.2Modecontrolfile(encoderinput).236.3Parameterbitstreamfile(encoderoutput/decoderinput).23AnnexA(informative):ChangeRequestHistory.24History.25SIST EN 301 712 V7.2.1:2003

ETSIETSIEN301712V7.2.1(2000-04)4(GSM06.73version7.2.1Release1998)IntellectualPropertyRightsIPRsessentialorpotentiallyessentialtothepresentdocumentmayhavebeendeclaredtoETSI.TheinformationpertainingtotheseessentialIPRs,ifany,ispubliclyavailableforETSImembersandnon-members,andcanbefoundinSR000314:"IntellectualPropertyRights(IPRs);Essential,orpotentiallyEssential,IPRsnotifiedtoETSIinrespectofETSIstandards",whichisavailablefromtheETSISecretariat.LatestupdatesareavailableontheETSIWebserver(http://www.etsi.org/ipr).PursuanttotheETSIIPRPolicy,noinvestigation,includingIPRsearches,hasbeencarriedoutbyETSI.NoguaranteecanbegivenastotheexistenceofotherIPRsnotreferencedinSR000314(ortheupdatesontheETSIWebserver)whichare,ormaybe,ormaybecome,essentialtothepresentdocument.ForewordThisEuropeanStandard(Telecommunicationsseries)hasbeenproducedbytheSpecialMobileGroup(SMG).ThepresentdocumentprovidesthebitexactdefinitionoftheAdaptiveMultiRate(AMR)speechtrafficcodecforthedigitalcellulartelecommunicationssystem.ThepresentdocumentcontainsanelectroniccopyoftheANSI-CcodefortheGSMAdaptiveMulti-Ratecodec,givenintheassociatedfile"en_301712v070201p0.zip".TheANSI-CcodeisnecessaryforabitexactimplementationoftheAdaptiveMultiRatespeechtranscoder(GSM06.90[3]),VoiceActivityDetection(GSM06.94[7]),comfortnoise(GSM06.92[5]),DiscontinuousTransmission(GSM06.93[6])andexamplesolutionsforsubstitutingandmutingoflostframes(GSM06.91[4]).Theassociatedfile"en_301712v070201p0.zip"containsa"readme.txt"file,whichexplainstheprocedureforinstallationandusageoftheANSI-Ccodefiles.ThecontentsofthepresentdocumentissubjecttocontinuingworkwithinSMGandmaychangefollowingformalSMGapproval.ShouldSMGmodifythecontentsofthepresentdocumentitwillbere-releasedwithanidentifyingchangeofreleasedateandanincreaseinversionnumberasfollows:Version7.x.ywhere:7indicatesRelease1998ofGSMPhase2+.xtheseconddigitisincrementedforallchangesofsubstance,i.e.technicalenhancements,corrections,updates,etc.ythethirddigitisincrementedwheneditorialonlychangeshavebeenincorporatedinthespecification.NationaltranspositiondatesDateofadoptionofthisEN:31March2000DateoflatestannouncementofthisEN(doa):30June2000DateoflatestpublicationofnewNationalStandardorendorsementofthisEN(dop/e):31December2000DateofwithdrawalofanyconflictingNationalStandard(dow):31December2000SIST EN 301 712 V7.2.1:2003

ETSIETSIEN301712V7.2.1(2000-04)5(GSM06.73version7.2.1Release1998)1ScopeThepresentdocumentcontainsanelectroniccopyoftheANSI-CcodefortheGSMAdaptiveMulti-Ratecodec.TheANSI-CcodeisnecessaryforabitexactimplementationoftheAdaptiveMultiRatespeechtranscoder(GSM06.90[3]),VoiceActivityDetection(GSM06.94[7]),comfortnoise(GSM06.92[5]),DiscontinuousTransmission(GSM06.93[6])andexamplesolutionsforsubstitutingandmutingoflostframes(GSM06.91[4]).2ReferencesThefollowingdocumentscontainprovisionswhich,throughreferenceinthistext,constituteprovisionsofthepresentdocument.• Referencesareeitherspecific(identifiedbydateofpublication,editionnumber,versionnumber,etc.)ornon-specific.• Foraspecificreference,subsequentrevisionsdonotapply.• Foranon-specificreference,thelatestversionapplies.• Anon-specificreferencetoanETSshallalsobetakentorefertolaterversionspublishedasanENwiththesamenumber.• ForthisRelease1998document,referencestoGSMdocumentsareforRelease1998versions(version7.x.y).[1]GSM01.04:"Digitalcellulartelecommunicationssystem(Phase2+);Abbreviationsandacronyms".[2]GSM06.74:"Digitalcellulartelecommunicationssystem(Phase2+);TestsequencesfortheGSMAdaptiveMulti-Rate(AMR)speechcodec".[3]GSM06.90:"Digitalcellulartelecommunicationssystem(Phase2+);AdaptiveMulti-Rate(AMR)speechtranscoding".[4]GSM06.91:"Digitalcellulartelecommunicationssystem(Phase2+);SubstitutionandmutingoflostframeforAdaptiveMulti-Rate(AMR)speechtrafficchannels".[5]GSM06.92:"Digitalcellulartelecommunicationssystem(Phase2+);ComfortnoiseaspectsforAdaptiveMulti-Rate(AMR)speechtrafficchannels".[6]GSM06.93:"Digitalcellulartelecommunicationssystem(Phase2+);Discontinuoustransmission(DTX)forAdaptiveMulti-Rate(AMR)speechtrafficchannels".[7]GSM06.94:"Digitalcellulartelecommunicationssystem(Phase2+);VoiceActivityDetector(VAD)forAdaptiveMulti-Rate(AMR)speechtrafficchannels".SIST EN 301 712 V7.2.1:2003

ETSIETSIEN301712V7.2.1(2000-04)6(GSM06.73version7.2.1Release1998)3Definitionsandabbreviations3.1DefinitionsDefinitionoftermsusedinthepresentdocument,canbefoundinGSM06.90[3],GSM06.91[4],GSM06.92[5],GSM06.93[6]andGSM06.94[7].3.2AbbreviationsForthepurposesofthepresentdocument,thefollowingabbreviationsapply:ANSIAmericanNationalStandardsInstituteETSEuropeanTelecommunicationStandardGSMGlobalSystemforMobilecommunicationsI/OInput/OutputRAMRandomAccessMemoryROMReadOnlyMemoryForabbreviationsnotgiveninthissubclauseseeGSM01.04[1].4CcodestructureThisclausegivesanoverviewofthestructureofthebit-exactCcodeandprovidesanoverviewofthecontentsandorganizationoftheCcodeattachedtothisdocument.TheCcodehasbeenverifiedonthefollowingsystems:-SunMicrosystemsworkstationsandGNUgcccompiler;-DECAlphaworkstationsandGNUgcccompiler;-IBMPC/ATcompatiblecomputerswithLinuxoperatingsystemandGNUgcccompiler;ANSI-C9899wasselectedastheprogramminglanguagebecauseportabilitywasdesirable4.1ContentsoftheCsourcecodeTheCcodedistrubutionhasallfilesintherootlevel.Thedistributedfileswithsuffix"c"containthesourcecodeandthefileswithsuffix"h"aretheheaderfiles.TheROMdataiscontainedmostlyinfileswithsuffix"tab".TheCcodedistributionalsocontainsonespeechcoderinstallationverificationdatafile,"spch_dos.inp".Thereferenceencoderoutputfileisnamed"spch_dos.cod",thereferencedecoderinputfileisnamed"spch_dos.dec"andthereferencedecoderoutputfileisnamed"spch_dos.out".ThesefourfilesareformattedsuchthattheyarecorrectforanIBMPC/ATcompatiblecomputer.Thesamefileswithreversedbyteorderofthe16bitwordsarenamed"spch_unx.inp","spch_unx.cod","spch_unx."dec"and"spch_unx.out",respectively.FinalverificationistobeperformedusingtheGSMAdaptiveMulti-RatetestsequencesdescribedinGSM06.74[2].MakefilesareprovidedfortheplatformsinwhichtheCcodehasbeenverified(listedabove).Oncethesoftwareisinstalled,thisdirectorywillhaveacompiledversionofencoderanddecoder(thebit-exactCexecutablesofthespeechcodec)andalltheobjectfiles.SIST EN 301 712 V7.2.1:2003

ETSIETSIEN301712V7.2.1(2000-04)7(GSM06.73version7.2.1Release1998)4.2ProgramexecutionTheGSMAdaptiveMulti-Ratecodecisimplementedintwoprograms:-(encoder)speechencoder;-(decoder)speechdecoder.Theprogramsshouldbecalledlike:encoder[encoderoptions]decoder[decoderoptions]Thespeechfilescontain16-bitlinearencodedPCMspeechsamplesandtheparameterfilescontainencodedspeechdataandsomeadditionalflags.Theencoderanddecoderoptionswillbeexplainedbyrunningtheapplicationswithoption–h.Seethefilereadme.txtformoreinformationonhowtoruntheencoderanddecoderprograms.4.3CodingstyleTheCcodeiswrittenaccordingtothefollowingstructuringconventions.Eachfunctionfunc()thatneedsstaticvariablesisconsideredamodule.Amoduleconsistsof:-a'statestructure'(struct)combiningthestaticvariablesofthemodule-threeauxiliaryfunctionsfunc_init(),func_reset(),andfunc_exit().-theprocessingfunctionfunc()itselfTheinitializationfunctionfunc_init()allocates(fromtheheap)anewstatestructure,callsthefunc_reset()function,storesthepointertothenewlyallocatedstructureinitsfirstfunctionparameter,andreturnswithavalueof0ifcompletedsuccessfuloravalueof1otherwise.Theresetfunctionfunc_reset()takesapointertothestatestructureandresetsallmembersofthestructuretoapredefinedvalue('homing').Theexitfunctionfunc_exit()performsanynecessarycleanupandfreesthestatestructurememory.Theprocessingfunctionfunc()alsotakesapointertothestatestructureaswellasallothernecessaryparametersandperformsitstaskusing(andpossiblymodifying)thevaluesinthestatestructure.Ifamodulecallsothermodules,thehigherlevelstatestructurecontainsapointertothelowerlevelstatestructures,andtheinit,reset,andexitfunctionsrecursivelycallthecorrespondinglowerlevelfunctions.Bythisconvention,thecodebecomes"instantiable"(morethanonecopyofamodulecanbeusedinthesameprogram)andthestaticdatahierarchyisclearlyvisibleinthecode.4.4CodehierarchyFigures1to4arecallgraphsthatshowthefunctionsusedinthespeechcodec,includingthefunctionsofVAD,DTX,andcomfortnoisegeneration.Eachcolumnrepresentsacalllevelandeachcellafunction.Thefunctionscontaincallstothefunctionsinrightwardsneighboringcells.Thetimeorderinthecallgraphsisfromthetopdownwardsastheprocessingofaframeadvances.AllstandardCfunctions:printf(),fwrite(),etc.havebeenomitted.Also,nobasicoperations(add(),L_add(),mac(),etc.)ordoubleprecisionextendedoperations(e.g.L_Extract())appearinthegraphs.TheinitializationofthestaticRAM(i.e.callingthe_initfunctions)isalsoomitted.Thebasicoperationsarenotcountedasextendingthedepth,thereforethedeepestlevelinthissoftwareislevel7.Theencodercallgraphisbrokendownintothreeseparatecallgraphs,Table1to3.SIST EN 301 712 V7.2.1:2003

ETSIETSIEN301712V7.2.1(2000-04)8(GSM06.73version7.2.1Release1998)Table1:SpeechencodercallstructureSpeech_Encode_FramePre_Processcod_amrCopyVad11filter_bankfirst_filter_stagefilter5filter3level_calculationvad_decisioncomplex_estimate_adaptcomplex_vadnoise_estimate_updateupdate_cntrlhangover_additionVad21block_normr_fftc_fftfn10Log10Log2Log2_normPow2tx_dtx_handlerlpcAutocorrLag_windowLevinsonlspAz_lspChebpsQ_plsf_5Lsp_lsfLsf_wtVq_subvecVq_subvec_sReorder_lsfLsf_lspInt_lpc_1and3_2Lsp_azGet_lsp_polInt_lpc_1and3Lsp_azGet_lsp_polQ_plsf_3Lsp_lsfLsf_wtCopyVq_subvec3Vq_subvec4Reorder_lsfLsf_lspInt_lpc_1to3_2Lsp_azGet_lsp_polInt_lpc_1to3Lsp_azGet_lsp_polCopydtx_bufferCopyLog2Log2_normdtx_encLsp_lsfReorder_lsfLsf_lspSet_zerolsp_resetCopyQ_plsf_resetcl_ltp_resetPitch_fr_resetcheck_lsppre_bigWeight_AiResiduSyn_filtol_ltpPitch_olvad_tone_detection_update2Lag_maxvad_tone_detection2Inv_sqrtcomp_corr2hp_max2vad_complex_detection_update2Pitch_ol_wghcomp_corr2Lag_max2vad_tone_detection_update2vad_tone_detection2gmed_nhp_max2vad_complex_detection_update2vad_pitch_detectionLTP_flag_update3subframePreProcWeight_AiSyn_filtResiduCopycl_ltpPitch_frgetRangeNorm_CorrConvolveInv_sqrtsearchFracInterpol_3or6Enc_lag3Enc_lag6(continued)1OptiontocalloneortheotherVADoption2SpecifictoVADoption13SpecifictoVADoption2SIST EN 301 712 V7.2.1:2003

ETSIETSIEN301712V7.2.1(2000-04)9(GSM06.73version7.2.1Release1998)Table1(concluded):SpeechencodercallstructurePred_lt_3or6ConvolveG_pitchcheck_gp_clippingq_gain_pitchcbsearchseeTable2gainQuantseeTable3update_gp_clippingCopysubframePostProcSyn_filtPred_lt_3or6ConvolvePrm2bitsInt2binTable2:cbsearchcallstructurecbsearchcode_2i40_9bitscor_h_xset_signcor_hInv_sqrtsearch_2i40build_codecode_2i40_11bitscor_h_xset_signcor_hInv_sqrtsearch_2i40build_codecode_3i40_14bitscor_h_xset_signcor_hInv_sqrtsearch_3i40build_codecode_4i40_17bitscor_h_xset_signcor_hInv_sqrtsearch_4i40build_codecode_8i40_31bitscor_h_xset_sign12k2Inv_sqrtcor_hInv_sqrtsearch_10and8i40build_codecompress_codecompress10code_10i40_35bitscor_h_xset_sign12k2Inv_sqrtcor_hInv_sqrtsearch_10and8i40build_codeq_pTable3:gainQuantcallstructuregainQuantgc_pred_copyCopygc_predLog2Log2_normLog2_normcalc_filt_energiescalc_target_energyMR475_update_unq_predgc_pred_updateMR475_gain_quantMR475_quant_store_resultsLog2Log2_normgc_pred_updategc_predLog2Log2_normLog2_normG_codeq_gain_codePow2MR795_gain_quantq_gain_pitchMR795_gain_code_quant3calc_unfilt_energiesLog2Log2_normgain_adaptgmed_nMR795_gain_code_quant_modsqrt_l_expQua_gainPow2gc_pred_updateSIST EN 301 712 V7.2.1:2003

ETSIETSIEN301712V7.2.1(2000-04)10(GSM06.73version7.2.1Release1998)Table4:SpeechdecodercallstructureSpeech_Decode_FrameBits2prmBin2intDecoder_amrrx_dtx_handlerDecoder_amr_resetlsp_avg_resetD_plsf_resetec_gain_pitch_resetec_gain_code_resetgc_pred_resetBgn_scd_resetSet_zeroph_disp_resetdtx_dec_resetCopySet_zerodtx_decCopyLsf_lspInit_D_plsf_3CopyD_plsf_3Reorder_lsfCopyLsf_lsppseudonoiseLsp_lsfReorder_lsfLsp_AzGet_lsp_polA_ReflLog2Log2_normBuild_CN_codepseudonoiseSyn_filtLsf_lsplsp_avgCopyD_plsf_3Reorder_lsfCopyLsf_lspInt_lpc_1to3Lsp_AzGet_lsp_polD_plsf_5Reorder_lsfCopyLsf_lspInt_lpc_1and3Lsp_AzGet_lsp_polDec_lag3Pred_lt_3or6Dec_lag6decode_2i40_9bitsdecode_2i40_11bitsdecode_3i40_14bitsdecode_4i40_17bitsdecode_8i40_31bitsdecompress_codedecompress10ec_gain_pitchgmed_nd_gain_pitchec_gain_pitch_updatedecode_10i40_35bitsDec_gainLog2Log2_normgc_predLog2Log2_normLog2_normPow2gc_pred_updateec_gain_codegmed_ngc_pred_average_limetedgc_pred_updateec_gain_code_updated_gain_codegc_predLog2Log2_normLog2_normPow2gc_pred_updateInt_lsfCb_gain_averageph_disp_releaseph_disp_lockph_dispsqrt_l_expEx_ctrlgmed_nagc2Inv_sqrtSyn_filtBgn_scdgmed_ndtx_dec_activity_updateCopyLog2Log2_normlsp_avgPost_FilterCopyWeight_AiResiduSet_zeroSyn_filtPreemphasisagcenergy_oldenergy_newenergy_oldInv_sqrtPost_ProcessSIST EN 301 712 V7.2.1:2003

ETSIETSIEN301712V7.2.1(2000-04)11(GSM06.73version7.2.1Release1998)4.5Variables,constantsandtablesThedatatypesofvariablesandtablesusedinthefixedpointimplementationaresignedintegersin2’scomplementrepresentation,definedby:Word1616bitvariableWord3232bitvariableFurthermoresomeenumtypesareused,allpossibletorepresentwithonebyte,andabooleanFlag.4.5.1DescriptionofconstantsusedintheC-codeThissectioncontainsalistingofallglobalconstantsdefinedincnst.h.Table5:GlobalconstantsConstantValueDescriptionL_TOTAL320totalsizeofspeechbuffer.L_WINDOW240windowsizeinLPanalysisL_FRAME160framesizeL_FRAME_BY280framesizedividedby2L_SUBFR40subframesizeL_CODE40codevectorlengthNB_TRACK5numberoftracksSTEP5codebookstepsizeNB_TRACK_MR1024numberoftracksmodemr102STEP_MR1024codebookstepsizemodemr102M10orderofLPfilterMP1(M+1)orderofLPfilter+1LSF_GAP205minimumdistancebetweenLSFafterquantization;50Hz=205LSP_PRED_FAC_MR12221299MR122LSPpredictionfactor(0.65Q15)AZ_SIZE44sizeofarrayofLPfiltersin4subframes(4*M+4)PIT_MIN_MR12218minimumpitchlag(MR122mode)PIT_MIN20minimumpitchlag(allothermodes)PIT_MAX143maximumpitchlagL_INTERPOL(10+1)lengthoffilterforinterpolationL_INTER_SRCH4lengthoffilterforCLLTPsearchinterpolationMU26214factorfortiltcompensationfilter0.8AGC_FAC29491factorforautomaticgaincontrol0.9L_NEXT40overheadinLPanalysisSHARPMAX13017maximumvalueofpitchsharpeningSHARPMIN0minimumvalueofpitchsharpeningMAX_PRM_SIZE57max.num.ofparamsMAX_SERIAL_SIZE244max.num.ofserialbitsGP_CLIP15565pitchgainclipping=0.95N_FRAME7oldpitchgainsinaveragecalculationEHF_MASK816bitrepresentationofallsamplesintheencoderhomingframe(leftjustification)SIST EN 301 712 V7.2.1:2003

ETSIETSIEN301712V7.2.1(2000-04)12(GSM06.73version7.2.1Release1998)4.5.2DescriptionoffixedtablesusedintheC-codeThissectioncontainsalistingofallfixedtablessortedbysourcefilenameandtablename.AlltabledataisdeclaredasWord16.Table6:FixedtablesFileTablenameLengthDescriptionc2_9pf.ctrackTable4*5tracktableforalgebraiccodebooksearch(MR475,MR515)cod_amr.cgamma110spectralexpansionfactorscod_amr.cgamma1_12k210spectralexpansionfactorscod_amr.cgamma210spectralexpansionfactorsdtx_dec.clsf_hist_mean_scale10initializationvaluesforDTXlsfparametersdtx_dec.cdtx_log_en_adjust9leveladjustmentsforechmodeec_gains.ccdown7attenuationfactorsforcodebookgainec_gains.cpdown7attenuationfactorsforadaptivecodebookgaingc_pred.cpred4algebraiccodebookgainMApredictorcoefficientsgc_pred.cpred_MR1224algebraiccodebookgainMApredictorcoefficients(MR122)pitch_fr.cmode_dep_parm72parametersdefiningtheadaptivecodebooksearchpermodepost_pro.ca3HPfiltercoefficients(denominator)inPost_Processpost_pro.cb3HPfiltercoefficients(numerator)inPost_Processpre_proc.ca3HPfiltercoefficients(denominator)inPre_Processpre_proc.cb3HPfiltercoefficients(numerator)inPre_Processpred_lt.cinter_661interpolationfiltercoefficientspstfilt.cgamma3_MR12210spectralexpansionfactorspstfilt.cgamma310spectralexpansionfactorspstfilt.cgamma4_MR12210spectralexpansionfactorspstfilt.cgamma410spectralexpansionfactorsbitno.tabprmno9numberofbitsforeachmodebitno.tabprmnofsf8numberofparametersforLPCandfirstsubframeforeachmode(usedfordecoderhomingprocedure)bitno.tabbitno9pointerstothebitno_MR.tablesbitno.tabbitno_MR47517numberofbitsperparametertotransmit(MR475)bitno.tabbitno_MR51519numberofbitsperparametertotransmit(MR515)bitno.tabbitno_MR5919numberofbitsperparametertotransmit(MR59)bitno.tabbitno_MR6719numberofbitsperparametertotransmit(MR67)bitno.tabbitno_MR7419numberofbitsperparametertotransmit(MR74)bitno.tabbitno_MR79523numberofbitsperparametertotransmit(MR795)bitno.tabbitno_MR10239numberofbitsperparametertotransmit(MR102)bitno.tabbitno_MR12257numberofbitsperparametertotransmit(MR122)bitno.tabbitno_MRDTX5numberofbitsperparametertotransmit(MRDTX)c2_11pf.tabstartPos12trackstartsearchpositionforfirstpulsec2_11pf.tabstartPos24trackstartsearchpositionforsecondpulsec2_9pf.tabstartPos16trackstartsearchpositioncorrwght.tabcorrweight251weightingofthecorrelationfunctioninopenloopLTPsearch(MR102)d_homing.tabdhf8pointerstothedhf_MR…tablesd_homing.tabdhf_MR47517parametervaluesforthedecoderhomingframe(MR475)d_homing.tabd
...