📄 draft-ietf-avt-ilbc-codec-05.txt
字号:
Internet Draft S. V. Andersen
Document: draft-ietf-avt-ilbc-codec-05.txt Aalborg University
Category: Experimental A. Duric
May 29th, 2004 Telio
Expires: November 29th, 2004 H. Astrom
R. Hagen
W. B. Kleijn
J. Linden
Global IP Sound
Internet Low Bit Rate Codec
Status of this Memo
This document specifies an Internet experimental standards track
protocol for the Internet community, and requests discussion and
suggestions for improvements. Please refer to the current edition of
the "Internet Official Protocol Standards" (STD 1) for the
standardization state and status of this protocol. Distribution of
this memo is unlimited.
By submitting this Internet-Draft, we certify that any applicable
patent or other IPR claims of which we am aware have been disclosed,
and any of which we become aware will be disclosed, in accordance
with RFC 3668.
Copyright Notice
Copyright (C) The Internet Society (2004). All Rights Reserved.
Abstract
This document specifies a speech codec suitable for robust voice
communication over IP. The codec is developed by Global IP Sound
(GIPS). It is designed for narrow band speech and results in a
payload bit rate of 13.33 kbit/s for 30 ms frames and 15.20 kbit/s
for 20 ms frames. The codec enables graceful speech quality
degradation in the case of lost frames, which occurs in connection
with lost or delayed IP packets.
Andersen et. al. 1
Internet Low Bit Rate Codec May 04
Table of Contents
Status of this Memo................................................1
Copyright Notice...................................................1
Abstract...........................................................1
Table of Contents..................................................2
1. INTRODUCTION....................................................5
2. OUTLINE OF THE CODEC............................................5
2.1 Encoder........................................................6
2.2 Decoder........................................................7
3. ENCODER PRINCIPLES..............................................8
3.1 Pre-processing.................................................9
3.2 LPC Analysis and Quantization..................................9
3.2.1 Computation of Autocorrelation Coefficients..................9
3.2.2 Computation of LPC Coefficients.............................11
3.2.3 Computation of LSF Coefficients from LPC Coefficients.......11
3.2.4 Quantization of LSF Coefficients............................11
3.2.5 Stability Check of LSF Coefficients.........................12
3.2.6 Interpolation of LSF Coefficients...........................12
3.2.7 LPC Analysis and Quantization for 20 ms frames..............13
3.3 Calculation of the Residual...................................14
3.4 Perceptual Weighting Filter...................................14
3.5 Start State Encoder...........................................15
3.5.1 Start State Estimation......................................15
3.5.2 All-Pass Filtering and Scale Quantization...................16
3.5.3 Scalar Quantization.........................................17
3.6 Encoding the remaining samples................................17
3.6.1 Codebook Memory.............................................19
3.6.2 Perceptual Weighting of Codebook Memory and Target..........20
3.6.3 Codebook Creation...........................................21
3.6.3.1 Creation of a Base Codebook...............................21
3.6.3.2 Codebook Expansion........................................22
3.6.3.3 Codebook Augmentation.....................................22
3.6.4 Codebook Search.............................................23
3.6.4.1 Codebook Search at Each Stage.............................24
3.6.4.2 Gain Quantization at Each Stage...........................24
3.6.4.3 Preparation of Target for Next Stage......................26
3.7 Gain Correction Encoding......................................26
3.8 Bitstream Definition..........................................27
4. DECODER PRINCIPLES.............................................30
4.1 LPC Filter Reconstruction.....................................30
4.2 Start State Reconstruction....................................31
4.3 Excitation Decoding Loop......................................31
4.4 Multistage Adaptive Codebook Decoding.........................32
4.4.1 Construction of the Decoded Excitation Signal...............32
4.5 Packet Loss Concealment.......................................33
4.5.1 Block Received Correctly and Previous Block also Received...33
Andersen et. al. Experimental - Expires November 29th, 2004 2
Internet Low Bit Rate Codec May 04
4.5.2 Block Not Received..........................................33
4.5.3 Block Received Correctly When Previous Block Not Received...34
4.6 Enhancement...................................................34
4.6.1 Estimating the pitch........................................36
4.6.2 Determination of the Pitch-Synchronous Sequences............36
4.6.3 Calculation of the smoothed excitation......................37
4.6.4 Enhancer criterion..........................................38
4.6.5 Enhancing the excitation....................................38
4.7 Synthesis Filtering...........................................39
4.8 Post Filtering................................................39
5. IANA CONSIDERATIONS............................................39
6. SECURITY CONSIDERATIONS........................................39
7. EVALUATION OF THE ILBC IMPLEMENTATIONS.........................39
8. REFERENCES.....................................................40
8.1 Normative.....................................................40
8.2 Informative...................................................40
9. ACKNOWLEDGEMENTS...............................................40
10. AUTHOR'S ADDRESSES............................................41
Full Copyright Statement..........................................42
Intellectual Property.............................................42
APPENDIX A REFERENCE IMPLEMENTATION...............................43
A.1 iLBC_test.c...................................................44
A.2 iLBC_encode.h.................................................49
A.3 iLBC_encode.c.................................................50
A.4 iLBC_decode.h.................................................59
A.5 iLBC_decode.c.................................................60
A.6 iLBC_define.h.................................................71
A.7 constants.h...................................................74
A.8 constants.c...................................................76
A.9 anaFilter.h...................................................89
A.10 anaFilter.c..................................................89
A.11 createCB.h...................................................90
A.12 createCB.c...................................................91
A.13 doCPLC.h.....................................................95
A.14 doCPLC.c.....................................................96
A.15 enhancer.h..................................................101
A.16 enhancer.c..................................................101
A.17 filter.h....................................................113
A.18 filter.c....................................................114
A.19 FrameClassify.h.............................................117
A.20 FrameClassify.c.............................................118
A.21 gainquant.h.................................................120
A.22 gainquant.c.................................................120
A.23 getCBvec.h..................................................122
A.24 getCBvec.c..................................................123
A.25 helpfun.h...................................................126
A.26 helpfun.c...................................................128
Andersen et. al. Experimental - Expires November 29th, 2004 3
Internet Low Bit Rate Codec May 04
A.27 hpInput.h...................................................133
A.28 hpInput.c...................................................134
A.29 hpOutput.h..................................................135
A.30 hpOutput.c..................................................135
A.31 iCBConstruct.h..............................................136
A.32 iCBConstruct.c..............................................137
A.33 iCBSearch.h.................................................139
A.34 iCBSearch.c.................................................140
A.35 LPCdecode.h.................................................148
A.36 LPCdecode.c.................................................149
A.37 LPCencode.h.................................................152
A.38 LPCencode.c.................................................152
A.39 lsf.h.......................................................156
A.40 lsf.c.......................................................157
A.41 packing.h...................................................162
A.42 packing.c...................................................163
A.43 StateConstructW.h...........................................166
A.44 StateConstructW.c...........................................166
A.45 StateSearchW.h..............................................168
A.46 StateSearchW.c..............................................169
A.47 syntFilter.h................................................172
A.48 syntFilter.c................................................173
Andersen et. al. Experimental - Expires November 29th, 2004 4
Internet Low Bit Rate Codec May 04
1. INTRODUCTION
This document contains the description of an algorithm for the
coding of speech signals sampled at 8 kHz. The algorithm, called
iLBC, uses a block-independent linear-predictive coding (LPC)
algorithm and has support for two basic frame lengths: 20 ms at 15.2
kbit/s and 30 ms at 13.33 kbit/s. When the codec operates at block
lengths of 20 ms, it produces 304 bits per block which SHOULD be
packetized as in [1]. Similarly, for block lengths of 30 ms it
produces 400 bits per block which SHOULD be packetized as in [1].
The two modes for the different frame sizes operate in a very
similar way. When they differ it is explicitly stated in the text,
usually with the notation x/y, where x refers to the 20 ms mode and
y refers to the 30 ms mode.
The described algorithm results in a speech coding system with a
controlled response to packet losses similar to what is known from
pulse code modulation (PCM) with packet loss concealment (PLC), such
as the ITU-T G.711 standard [4] which operates at a fixed bit rate
of 64 kbit/s. At the same time, the described algorithm enables
fixed bit rate coding with a quality-versus-bit rate tradeoff close
to state-of-the-art. A suitable RTP payload format for the iLBC
codec is specified in [1].
Some of the applications for which this coder is suitable are: real
time communications such as telephony and videoconferencing,
streaming audio, archival, and messaging.
Cable Television Laboratories (CableLabs(R)) intends to adapt iLBC
as a PacketCable(TM) audio codec standard for VoIP over Cable
applications [3].
This document is organized as follows. In Section 2 a brief outline
of the codec is given. The specific encoder and decoder algorithms
are explained in Sections 3 and 4, respectively. A c-code reference
implementation is provided in Appendix A.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in
this document are to be interpreted as described in RFC 2119 [2].
2. OUTLINE OF THE CODEC
The codec consists of an encoder and a decoder described in Section
2.1 and 2.2, respectively.
The essence of the codec is LPC and block based coding of the LPC
residual signal. For each 160/240 (20ms/30 ms) sample block, the
following major steps are performed: A set of LPC filters are
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -