Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/speex.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jean-marc.valin@usherbrooke.ca>2008-11-09 18:59:38 +0300
committerJean-Marc Valin <jean-marc.valin@usherbrooke.ca>2008-11-09 18:59:38 +0300
commit9063dd27f45382ede3bfbdad19e557f57423d2df (patch)
tree778158683a2930bba37dbdb2ce004356dfacbafc
parent42ef4a1d79eb85d450686e633500bc85450d8036 (diff)
Documenting the decoder
-rw-r--r--doc/manual.lyx3273
1 files changed, 1878 insertions, 1395 deletions
diff --git a/doc/manual.lyx b/doc/manual.lyx
index 5e84b40..e61caae 100644
--- a/doc/manual.lyx
+++ b/doc/manual.lyx
@@ -1,5 +1,5 @@
-#LyX 1.5.3 created this file. For more info see http://www.lyx.org/
-\lyxformat 276
+#LyX 1.6.0rc2 created this file. For more info see http://www.lyx.org/
+\lyxformat 340
\begin_document
\begin_header
\textclass scrbook
@@ -13,9 +13,11 @@
\font_osf false
\font_sf_scale 100
\font_tt_scale 100
+
\graphics default
\paperfontsize 10
\spacing single
+\use_hyperref false
\papersize letterpaper
\use_geometry true
\use_amsmath 2
@@ -46,7 +48,9 @@
\begin_layout Title
The Speex Manual
-\newline
+\begin_inset Newline newline
+\end_inset
+
Version 1.2
\end_layout
@@ -55,8 +59,9 @@ Jean-Marc Valin
\end_layout
\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
-\newpage
\end_layout
@@ -65,7 +70,7 @@ Copyright
\begin_inset ERT
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
\backslash
@@ -88,15 +93,19 @@ on License".
\end_layout
\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
-\newpage
-\begin_inset LatexCommand tableofcontents
+\begin_inset CommandInset toc
+LatexCommand tableofcontents
\end_inset
-\newpage
+\begin_inset Newpage newpage
+\end_inset
+
\end_layout
@@ -106,7 +115,9 @@ on License".
\end_inset
-\newpage
+\begin_inset Newpage newpage
+\end_inset
+
\end_layout
@@ -148,8 +159,12 @@ Designing for VoIP instead of mobile phones means that Speex is robust to
\begin_layout Standard
All the design goals led to the choice of CELP
-\begin_inset LatexCommand index
-name "CELP"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+CELP
+\end_layout
\end_inset
@@ -163,7 +178,8 @@ name "CELP"
\begin_layout Section
Getting help
-\begin_inset LatexCommand label
+\begin_inset CommandInset label
+LatexCommand label
name "sec:Getting-help"
\end_inset
@@ -224,7 +240,8 @@ Here are some additional guidelines related to the mailing list.
Before reporting bugs in Speex to the list, it is strongly recommended
(if possible) to first test whether these bugs can be reproduced using
the speexenc and speexdec (see Section
-\begin_inset LatexCommand ref
+\begin_inset CommandInset ref
+LatexCommand ref
reference "sec:Command-line-encoder/decoder"
\end_inset
@@ -242,7 +259,8 @@ About this document
\begin_layout Standard
This document is divided in the following way.
Section
-\begin_inset LatexCommand ref
+\begin_inset CommandInset ref
+LatexCommand ref
reference "sec:Feature-description"
\end_inset
@@ -250,27 +268,34 @@ reference "sec:Feature-description"
describes the different Speex features and defines many basic terms that
are used throughout this manual.
Section
-\begin_inset LatexCommand ref
+\begin_inset CommandInset ref
+LatexCommand ref
reference "sec:Command-line-encoder/decoder"
\end_inset
documents the standard command-line tools provided in the Speex distribution.
Section
-\begin_inset LatexCommand ref
+\begin_inset CommandInset ref
+LatexCommand ref
reference "sec:Programming-with-Speex"
\end_inset
includes detailed instructions about programming using the libspeex
-\begin_inset LatexCommand index
-name "libspeex"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+libspeex
+\end_layout
\end_inset
API.
Section
-\begin_inset LatexCommand ref
+\begin_inset CommandInset ref
+LatexCommand ref
reference "sec:Formats-and-standards"
\end_inset
@@ -286,19 +311,22 @@ The three last sections describe the algorithms used in Speex.
They are intended for people who want to understand how Speex really works
and/or want to do research based on Speex.
Section
-\begin_inset LatexCommand ref
+\begin_inset CommandInset ref
+LatexCommand ref
reference "sec:Introduction-to-CELP"
\end_inset
explains the general idea behind CELP, while sections
-\begin_inset LatexCommand ref
+\begin_inset CommandInset ref
+LatexCommand ref
reference "sec:Speex-narrowband-mode"
\end_inset
and
-\begin_inset LatexCommand ref
+\begin_inset CommandInset ref
+LatexCommand ref
reference "sec:Speex-wideband-mode"
\end_inset
@@ -307,14 +335,16 @@ reference "sec:Speex-wideband-mode"
\end_layout
\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
-\newpage
\end_layout
\begin_layout Chapter
Codec description
-\begin_inset LatexCommand label
+\begin_inset CommandInset label
+LatexCommand label
name "sec:Feature-description"
\end_inset
@@ -339,8 +369,12 @@ Before introducing all the Speex features, here are some concepts in speech
\begin_layout Subsection*
Sampling rate
-\begin_inset LatexCommand index
-name "sampling rate"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+sampling rate
+\end_layout
\end_inset
@@ -368,20 +402,32 @@ The sampling rate expressed in Hertz (Hz) is the number of samples taken
Speex is mainly designed for three different sampling rates: 8 kHz, 16
kHz, and 32 kHz.
These are respectively referred to as narrowband
-\begin_inset LatexCommand index
-name "narrowband"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+narrowband
+\end_layout
\end_inset
, wideband
-\begin_inset LatexCommand index
-name "wideband"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+wideband
+\end_layout
\end_inset
and ultra-wideband
-\begin_inset LatexCommand index
-name "ultra-wideband"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+ultra-wideband
+\end_layout
\end_inset
@@ -440,8 +486,12 @@ ps).
\begin_layout Subsection*
Quality
-\begin_inset LatexCommand index
-name "quality"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+quality
+\end_layout
\end_inset
@@ -456,8 +506,12 @@ Speex is a lossy codec, which means that it achieves compression at the
The Speex encoding process is controlled most of the time by a quality
parameter that ranges from 0 to 10.
In constant bit-rate
-\begin_inset LatexCommand index
-name "constant bit-rate"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+constant bit-rate
+\end_layout
\end_inset
@@ -468,8 +522,12 @@ name "constant bit-rate"
\begin_layout Subsection*
Complexity
-\begin_inset LatexCommand index
-name "complexity"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+complexity
+\end_layout
\end_inset
@@ -494,8 +552,12 @@ bzip2
5 times higher than for complexity 1.
In practice, the best trade-off is between complexity 2 and 4, though higher
settings are often useful when encoding non-speech sounds like DTMF
-\begin_inset LatexCommand index
-name "DTMF"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DTMF
+\end_layout
\end_inset
@@ -504,8 +566,12 @@ name "DTMF"
\begin_layout Subsection*
Variable Bit-Rate
-\begin_inset LatexCommand index
-name "variable bit-rate"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+variable bit-rate
+\end_layout
\end_inset
@@ -537,8 +603,12 @@ difficulty
\begin_layout Subsection*
Average Bit-Rate
-\begin_inset LatexCommand index
-name "average bit-rate"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+average bit-rate
+\end_layout
\end_inset
@@ -555,8 +625,12 @@ Average bit-rate solves one of the problems of VBR, as it dynamically adjusts
\begin_layout Subsection*
Voice Activity Detection
-\begin_inset LatexCommand index
-name "voice activity detection"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+voice activity detection
+\end_layout
\end_inset
@@ -583,8 +657,12 @@ comfort noise generation
\begin_layout Subsection*
Discontinuous Transmission
-\begin_inset LatexCommand index
-name "discontinuous transmission"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+discontinuous transmission
+\end_layout
\end_inset
@@ -600,8 +678,12 @@ Discontinuous transmission is an addition to VAD/VBR operation, that allows
\begin_layout Subsection*
Perceptual enhancement
-\begin_inset LatexCommand index
-name "perceptual enhancement"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+perceptual enhancement
+\end_layout
\end_inset
@@ -627,8 +709,12 @@ sounds
\begin_layout Subsection*
Latency and algorithmic delay
-\begin_inset LatexCommand index
-name "algorithmic delay"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+algorithmic delay
+\end_layout
\end_inset
@@ -662,14 +748,22 @@ The main characteristics of Speex can be summarized as follows:
\begin_layout Itemize
Free software/open-source
-\begin_inset LatexCommand index
-name "open-source"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+open-source
+\end_layout
\end_inset
, patent
-\begin_inset LatexCommand index
-name "patent"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+patent
+\end_layout
\end_inset
@@ -678,14 +772,22 @@ name "patent"
\begin_layout Itemize
Integration of narrowband
-\begin_inset LatexCommand index
-name "narrowband"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+narrowband
+\end_layout
\end_inset
and wideband
-\begin_inset LatexCommand index
-name "wideband"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+wideband
+\end_layout
\end_inset
@@ -698,8 +800,12 @@ Wide range of bit-rates available (from 2.15 kbps to 44 kbps)
\begin_layout Itemize
Dynamic bit-rate switching (AMR) and Variable Bit-Rate
-\begin_inset LatexCommand index
-name "variable bit-rate"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+variable bit-rate
+\end_layout
\end_inset
@@ -708,8 +814,12 @@ name "variable bit-rate"
\begin_layout Itemize
Voice Activity Detection
-\begin_inset LatexCommand index
-name "voice activity detection"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+voice activity detection
+\end_layout
\end_inset
@@ -718,8 +828,12 @@ name "voice activity detection"
\begin_layout Itemize
Variable complexity
-\begin_inset LatexCommand index
-name "complexity"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+complexity
+\end_layout
\end_inset
@@ -815,7 +929,8 @@ Acoustic Echo Canceller
\begin_layout Standard
In any hands-free communication system (Fig.
-\begin_inset LatexCommand ref
+\begin_inset CommandInset ref
+LatexCommand ref
reference "fig:Acoustic-echo-model"
\end_inset
@@ -840,11 +955,11 @@ wide false
sideways false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
\begin_inset ERT
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
\backslash
@@ -864,7 +979,7 @@ begin{center}
\begin_inset ERT
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
\backslash
@@ -876,12 +991,13 @@ end{center}
\end_layout
-\begin_layout Standard
+\begin_layout Plain Layout
\begin_inset Caption
-\begin_layout Standard
+\begin_layout Plain Layout
Acoustic echo model
-\begin_inset LatexCommand label
+\begin_inset CommandInset label
+LatexCommand label
name "fig:Acoustic-echo-model"
\end_inset
@@ -930,7 +1046,8 @@ where
\emph default
to use them.
Figure
-\begin_inset LatexCommand ref
+\begin_inset CommandInset ref
+LatexCommand ref
reference "fig:Integration-VoIP"
\end_inset
@@ -951,11 +1068,11 @@ wide false
sideways false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
\begin_inset ERT
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
\backslash
@@ -975,7 +1092,7 @@ begin{center}
\begin_inset ERT
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
\backslash
@@ -987,12 +1104,13 @@ end{center}
\end_layout
-\begin_layout Standard
+\begin_layout Plain Layout
\begin_inset Caption
-\begin_layout Standard
+\begin_layout Plain Layout
Integration of all the components in a VoIP client.
-\begin_inset LatexCommand label
+\begin_inset CommandInset label
+LatexCommand label
name "fig:Integration-VoIP"
\end_inset
@@ -1011,8 +1129,9 @@ name "fig:Integration-VoIP"
\end_layout
\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
-\newpage
\end_layout
@@ -1071,8 +1190,12 @@ The options supported by the Speex configure script are:
\begin_layout Description
--enable-fixed-point
-\begin_inset LatexCommand index
-name "fixed-point"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+fixed-point
+\end_layout
\end_inset
@@ -1092,8 +1215,12 @@ name "fixed-point"
\begin_layout Description
--enable-fixed-point-debug Use only for debugging the fixed-point
-\begin_inset LatexCommand index
-name "fixed-point"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+fixed-point
+\end_layout
\end_inset
@@ -1261,7 +1388,7 @@ usually
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
filter_mem16()
\end_layout
@@ -1276,7 +1403,7 @@ filter_mem16()
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
iir_mem16()
\end_layout
@@ -1291,7 +1418,7 @@ iir_mem16()
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
vq_nbest()
\end_layout
@@ -1306,7 +1433,7 @@ vq_nbest()
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
pitch_xcorr()
\end_layout
@@ -1321,7 +1448,7 @@ pitch_xcorr()
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
interp_pitch()
\end_layout
@@ -1337,7 +1464,7 @@ The filtering functions
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
filter_mem16()
\end_layout
@@ -1349,7 +1476,7 @@ filter_mem16()
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
iir_mem16()
\end_layout
@@ -1446,7 +1573,7 @@ manual
\begin_inset Foot
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
In this case, one must be careful with threads
\end_layout
@@ -1461,14 +1588,16 @@ In this case, one must be careful with threads
\end_layout
\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
-\newpage
\end_layout
\begin_layout Chapter
Command-line encoder/decoder
-\begin_inset LatexCommand label
+\begin_inset CommandInset label
+LatexCommand label
name "sec:Command-line-encoder/decoder"
\end_inset
@@ -1497,8 +1626,12 @@ speexdec
\emph on
speexenc
-\begin_inset LatexCommand index
-name "speexenc"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+speexenc
+\end_layout
\end_inset
@@ -1525,18 +1658,27 @@ The value '-' for input_file or output_file corresponds respectively to
\end_layout
\begin_layout Description
---narrowband\InsetSpace ~
+--narrowband
+\begin_inset space ~
+\end_inset
+
(-n) Tell Speex to treat the input as narrowband (8 kHz).
This is the default
\end_layout
\begin_layout Description
---wideband\InsetSpace ~
+--wideband
+\begin_inset space ~
+\end_inset
+
(-w) Tell Speex to treat the input as wideband (16 kHz)
\end_layout
\begin_layout Description
---ultra-wideband\InsetSpace ~
+--ultra-wideband
+\begin_inset space ~
+\end_inset
+
(-u) Tell Speex to treat the input as
\begin_inset Quotes eld
\end_inset
@@ -1549,12 +1691,18 @@ ultra-wideband
\end_layout
\begin_layout Description
---quality\InsetSpace ~
+--quality
+\begin_inset space ~
+\end_inset
+
n Set the encoding quality (0-10), default is 8
\end_layout
\begin_layout Description
---bitrate\InsetSpace ~
+--bitrate
+\begin_inset space ~
+\end_inset
+
n Encoding bit-rate (use bit-rate n or lower)
\end_layout
@@ -1563,7 +1711,10 @@ n Encoding bit-rate (use bit-rate n or lower)
\end_layout
\begin_layout Description
---abr\InsetSpace ~
+--abr
+\begin_inset space ~
+\end_inset
+
n Enable ABR (Average Bit-Rate) at n kbps, disabled by default
\end_layout
@@ -1576,12 +1727,18 @@ n Enable ABR (Average Bit-Rate) at n kbps, disabled by default
\end_layout
\begin_layout Description
---nframes\InsetSpace ~
+--nframes
+\begin_inset space ~
+\end_inset
+
n Pack n frames in each Ogg packet (this saves space at low bit-rates)
\end_layout
\begin_layout Description
---comp\InsetSpace ~
+--comp
+\begin_inset space ~
+\end_inset
+
n Set encoding speed/quality tradeoff.
The higher the value of n, the slower the encoding (default is 3)
\end_layout
@@ -1591,12 +1748,18 @@ n Set encoding speed/quality tradeoff.
\end_layout
\begin_layout Description
---help\InsetSpace ~
+--help
+\begin_inset space ~
+\end_inset
+
(-h) Print the help
\end_layout
\begin_layout Description
---version\InsetSpace ~
+--version
+\begin_inset space ~
+\end_inset
+
(-v) Print version information
\end_layout
@@ -1625,7 +1788,10 @@ Raw input options
\end_layout
\begin_layout Description
---rate\InsetSpace ~
+--rate
+\begin_inset space ~
+\end_inset
+
n Sampling rate for raw input
\end_layout
@@ -1653,8 +1819,12 @@ n Sampling rate for raw input
\emph on
speexdec
-\begin_inset LatexCommand index
-name "speexdec"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+speexdec
+\end_layout
\end_inset
@@ -1709,12 +1879,18 @@ The value '-' for input_file or output_file corresponds respectively to
\end_layout
\begin_layout Description
---rate\InsetSpace ~
+--rate
+\begin_inset space ~
+\end_inset
+
n Force decoding at n Hz sampling rate
\end_layout
\begin_layout Description
---packet-loss\InsetSpace ~
+--packet-loss
+\begin_inset space ~
+\end_inset
+
n Simulate n % random packet loss
\end_layout
@@ -1723,18 +1899,25 @@ n Simulate n % random packet loss
\end_layout
\begin_layout Description
---help\InsetSpace ~
+--help
+\begin_inset space ~
+\end_inset
+
(-h) Print the help
\end_layout
\begin_layout Description
---version\InsetSpace ~
+--version
+\begin_inset space ~
+\end_inset
+
(-v) Print version information
\end_layout
\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
-\newpage
\end_layout
@@ -1744,13 +1927,18 @@ Using the Speex Codec API (
libspeex
\emph default
-\begin_inset LatexCommand index
-name "libspeex"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+libspeex
+\end_layout
\end_inset
)
-\begin_inset LatexCommand label
+\begin_inset CommandInset label
+LatexCommand label
name "sec:Programming-with-Speex"
\end_inset
@@ -1781,7 +1969,8 @@ calls using the same state from multiple threads must be protected by mutexes
\series default
.
Examples of code can also be found in Appendix
-\begin_inset LatexCommand ref
+\begin_inset CommandInset ref
+LatexCommand ref
reference "sec:Sample-code"
\end_inset
@@ -1792,7 +1981,8 @@ reference "sec:Sample-code"
\begin_layout Section
Encoding
-\begin_inset LatexCommand label
+\begin_inset CommandInset label
+LatexCommand label
name "sub:Encoding"
\end_inset
@@ -1809,7 +1999,7 @@ In order to encode speech using Speex, one first needs to:
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
#include <speex/speex.h>
\end_layout
@@ -1822,12 +2012,12 @@ Then in the code, a Speex bit-packing struct must be declared, along with
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
SpeexBits bits;
\end_layout
-\begin_layout Standard
+\begin_layout Plain Layout
void *enc_state;
\end_layout
@@ -1839,12 +2029,12 @@ The two are initialized by:
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
speex_bits_init(&bits);
\end_layout
-\begin_layout Standard
+\begin_layout Plain Layout
enc_state = speex_encoder_init(&speex_nb_mode);
\end_layout
@@ -1882,7 +2072,7 @@ samples
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
speex_encoder_ctl(enc_state,SPEEX_GET_FRAME_SIZE,&frame_size);
\end_layout
@@ -1909,7 +2099,7 @@ frame_size
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
speex_encoder_ctl(enc_state,SPEEX_SET_QUALITY,&quality);
\end_layout
@@ -1923,7 +2113,8 @@ quality
is an integer value ranging from 0 to 10 (inclusively).
The mapping between quality and bit-rate is described in Fig.
-\begin_inset LatexCommand ref
+\begin_inset CommandInset ref
+LatexCommand ref
reference "cap:quality_vs_bps"
\end_inset
@@ -1940,17 +2131,17 @@ Once the initialization is done, for every input frame:
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
speex_bits_reset(&bits);
\end_layout
-\begin_layout Standard
+\begin_layout Plain Layout
speex_encode_int(enc_state, input_frame, &bits);
\end_layout
-\begin_layout Standard
+\begin_layout Plain Layout
nbBytes = speex_bits_write(&bits, byte_ptr, MAX_NB_BYTES);
\end_layout
@@ -2040,12 +2231,12 @@ After you're done with the encoding, free all resources with:
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
speex_bits_destroy(&bits);
\end_layout
-\begin_layout Standard
+\begin_layout Plain Layout
speex_encoder_destroy(enc_state);
\end_layout
@@ -2062,7 +2253,8 @@ That's about it for the encoder.
\begin_layout Section
Decoding
-\begin_inset LatexCommand label
+\begin_inset CommandInset label
+LatexCommand label
name "sub:Decoding"
\end_inset
@@ -2076,7 +2268,7 @@ In order to decode speech using Speex, you first need to:
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
#include <speex/speex.h>
\end_layout
@@ -2088,7 +2280,7 @@ You also need to declare a Speex bit-packing struct
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
SpeexBits bits;
\end_layout
@@ -2100,7 +2292,7 @@ and a Speex decoder state
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
void *dec_state;
\end_layout
@@ -2112,12 +2304,12 @@ The two are initialized by:
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
speex_bits_init(&bits);
\end_layout
-\begin_layout Standard
+\begin_layout Plain Layout
dec_state = speex_decoder_init(&speex_nb_mode);
\end_layout
@@ -2154,7 +2346,7 @@ samples
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
speex_decoder_ctl(dec_state, SPEEX_GET_FRAME_SIZE, &frame_size);
\end_layout
@@ -2175,7 +2367,7 @@ There is also a parameter that can be set for the decoder: whether or not
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
speex_decoder_ctl(dec_state, SPEEX_SET_ENH, &enh);
\end_layout
@@ -2203,12 +2395,12 @@ Again, once the decoder initialization is done, for every input frame:
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
speex_bits_read_from(&bits, input_bytes, nbBytes);
\end_layout
-\begin_layout Standard
+\begin_layout Plain Layout
speex_decode_int(dec_state, &bits, output_frame);
\end_layout
@@ -2256,12 +2448,12 @@ speex_decode()
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
speex_bits_destroy(&bits);
\end_layout
-\begin_layout Standard
+\begin_layout Plain Layout
speex_decoder_destroy(dec_state);
\end_layout
@@ -2273,7 +2465,8 @@ speex_decoder_destroy(dec_state);
\begin_layout Section
Codec Options (speex_*_ctl)
-\begin_inset LatexCommand label
+\begin_inset CommandInset label
+LatexCommand label
name "sub:Codec-Options"
\end_inset
@@ -2319,12 +2512,12 @@ ioctl
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
void speex_encoder_ctl(void *encoder, int request, void *ptr);
\end_layout
-\begin_layout Standard
+\begin_layout Plain Layout
void speex_decoder_ctl(void *encoder, int request, void *ptr);
\end_layout
@@ -2354,7 +2547,7 @@ Here is a list of the values allowed for the requests.
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
void *
\end_layout
@@ -2366,7 +2559,7 @@ void *
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
_ctl()
\end_layout
@@ -2383,7 +2576,7 @@ not type safe
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -2395,7 +2588,7 @@ spx_int32_t
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
int32_t
\end_layout
@@ -2411,8 +2604,12 @@ SPEEX_SET_ENH
\end_inset
Set perceptual enhancer
-\begin_inset LatexCommand index
-name "perceptual enhancement"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+perceptual enhancement
+\end_layout
\end_inset
@@ -2421,7 +2618,7 @@ name "perceptual enhancement"
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -2441,7 +2638,7 @@ SPEEX_GET_ENH
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -2458,7 +2655,7 @@ SPEEX_GET_FRAME_SIZE Get the number of samples per frame for the current
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -2478,7 +2675,7 @@ SPEEX_SET_QUALITY
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -2498,7 +2695,7 @@ SPEEX_GET_QUALITY
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -2518,7 +2715,7 @@ SPEEX_SET_MODE
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -2538,7 +2735,7 @@ SPEEX_GET_MODE
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -2558,7 +2755,7 @@ SPEEX_SET_VBR
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -2574,8 +2771,12 @@ SPEEX_GET_VBR
\end_inset
Get variable bit-rate
-\begin_inset LatexCommand index
-name "variable bit-rate"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+variable bit-rate
+\end_layout
\end_inset
@@ -2584,7 +2785,7 @@ name "variable bit-rate"
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -2620,7 +2821,7 @@ SPEEX_SET_COMPLEXITY
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -2640,7 +2841,7 @@ SPEEX_GET_COMPLEXITY
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -2660,7 +2861,7 @@ SPEEX_SET_BITRATE
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -2676,7 +2877,7 @@ SPEEX_GET_BITRATE Get the current bit-rate in use (
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -2692,7 +2893,7 @@ SPEEX_SET_SAMPLING_RATE Set real sampling rate (
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -2708,7 +2909,7 @@ SPEEX_GET_SAMPLING_RATE Get real sampling rate (
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -2729,8 +2930,12 @@ SPEEX_SET_VAD
\end_inset
Set voice activity detection
-\begin_inset LatexCommand index
-name "voice activity detection"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+voice activity detection
+\end_layout
\end_inset
@@ -2739,7 +2944,7 @@ name "voice activity detection"
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -2759,7 +2964,7 @@ SPEEX_GET_VAD
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -2775,8 +2980,12 @@ SPEEX_SET_DTX
\end_inset
Set discontinuous transmission
-\begin_inset LatexCommand index
-name "discontinuous transmission"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+discontinuous transmission
+\end_layout
\end_inset
@@ -2785,7 +2994,7 @@ name "discontinuous transmission"
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -2805,7 +3014,7 @@ SPEEX_GET_DTX
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -2821,8 +3030,12 @@ SPEEX_SET_ABR
\end_inset
Set average bit-rate
-\begin_inset LatexCommand index
-name "average bit-rate"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+average bit-rate
+\end_layout
\end_inset
@@ -2831,7 +3044,7 @@ name "average bit-rate"
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -2851,7 +3064,7 @@ SPEEX_GET_ABR
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -2872,7 +3085,7 @@ SPEEX_SET_PLC_TUNING
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -2892,7 +3105,7 @@ SPEEX_GET_PLC_TUNING
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -2912,7 +3125,7 @@ SPEEX_SET_VBR_MAX_BITRATE
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -2932,7 +3145,7 @@ SPEEX_GET_VBR_MAX_BITRATE
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -2948,7 +3161,7 @@ SPEEX_SET_HIGHPASS Set the high-pass filter on (1) or off (0) (
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -2964,7 +3177,7 @@ SPEEX_GET_HIGHPASS Get the current high-pass filter status (
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -2990,7 +3203,8 @@ spx_int32_t
\begin_layout Section
Mode queries
-\begin_inset LatexCommand label
+\begin_inset CommandInset label
+LatexCommand label
name "sub:Mode-queries"
\end_inset
@@ -3008,7 +3222,7 @@ er_ctl calls.
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
void speex_mode_query(SpeexMode *mode, int request, void *ptr);
\end_layout
@@ -3039,8 +3253,12 @@ ptr
\begin_layout Section
Packing and in-band signalling
-\begin_inset LatexCommand index
-name "in-band signalling"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+in-band signalling
+\end_layout
\end_inset
@@ -3059,7 +3277,8 @@ Sometimes it is desirable to pack more than one frame per packet (or other
mechanism, it is possible to include a terminator code.
That terminator consists of the code 15 (decimal) encoded with 5 bits,
as shown in Table
-\begin_inset LatexCommand ref
+\begin_inset CommandInset ref
+LatexCommand ref
reference "cap:quality_vs_bps"
\end_inset
@@ -3091,7 +3310,8 @@ pseudo-frames
of mode 14 which contain a 4-bit message type code, followed by the message.
Table
-\begin_inset LatexCommand ref
+\begin_inset CommandInset ref
+LatexCommand ref
reference "cap:In-band-signalling-codes"
\end_inset
@@ -3110,11 +3330,11 @@ wide false
sideways false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
\begin_inset ERT
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
\backslash
@@ -3127,43 +3347,43 @@ begin{center}
\begin_inset Tabular
<lyxtabular version="3" rows="17" columns="3">
<features>
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Code
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Size (bits)
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Content
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
@@ -3172,7 +3392,7 @@ Content
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
1
\end_layout
@@ -3181,18 +3401,18 @@ Content
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Asks decoder to set perceptual enhancement off (0) or on(1)
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
1
\end_layout
@@ -3201,7 +3421,7 @@ Asks decoder to set perceptual enhancement off (0) or on(1)
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
1
\end_layout
@@ -3210,7 +3430,7 @@ Asks decoder to set perceptual enhancement off (0) or on(1)
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Asks (if 1) the encoder to be less
\begin_inset Quotes eld
\end_inset
@@ -3225,11 +3445,11 @@ aggressive
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
2
\end_layout
@@ -3238,7 +3458,7 @@ aggressive
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
@@ -3247,18 +3467,18 @@ aggressive
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Asks encoder to switch to mode N
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
3
\end_layout
@@ -3267,7 +3487,7 @@ Asks encoder to switch to mode N
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
@@ -3276,18 +3496,18 @@ Asks encoder to switch to mode N
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Asks encoder to switch to mode N for low-band
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
@@ -3296,7 +3516,7 @@ Asks encoder to switch to mode N for low-band
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
@@ -3305,18 +3525,18 @@ Asks encoder to switch to mode N for low-band
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Asks encoder to switch to mode N for high-band
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
5
\end_layout
@@ -3325,7 +3545,7 @@ Asks encoder to switch to mode N for high-band
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
@@ -3334,18 +3554,18 @@ Asks encoder to switch to mode N for high-band
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Asks encoder to switch to quality N for VBR
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
6
\end_layout
@@ -3354,7 +3574,7 @@ Asks encoder to switch to quality N for VBR
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
@@ -3363,18 +3583,18 @@ Asks encoder to switch to quality N for VBR
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Request acknowledge (0=no, 1=all, 2=only for in-band data)
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
7
\end_layout
@@ -3383,7 +3603,7 @@ Request acknowledge (0=no, 1=all, 2=only for in-band data)
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
@@ -3392,18 +3612,18 @@ Request acknowledge (0=no, 1=all, 2=only for in-band data)
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Asks encoder to set CBR (0), VAD(1), DTX(3), VBR(5), VBR+DTX(7)
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
8
\end_layout
@@ -3412,7 +3632,7 @@ Asks encoder to set CBR (0), VAD(1), DTX(3), VBR(5), VBR+DTX(7)
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
8
\end_layout
@@ -3421,18 +3641,18 @@ Asks encoder to set CBR (0), VAD(1), DTX(3), VBR(5), VBR+DTX(7)
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Transmit (8-bit) character to the other end
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
9
\end_layout
@@ -3441,7 +3661,7 @@ Transmit (8-bit) character to the other end
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
8
\end_layout
@@ -3450,18 +3670,18 @@ Transmit (8-bit) character to the other end
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Intensity stereo information
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
10
\end_layout
@@ -3470,7 +3690,7 @@ Intensity stereo information
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
16
\end_layout
@@ -3479,18 +3699,18 @@ Intensity stereo information
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Announce maximum bit-rate acceptable (N in bytes/second)
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
11
\end_layout
@@ -3499,7 +3719,7 @@ Announce maximum bit-rate acceptable (N in bytes/second)
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
16
\end_layout
@@ -3508,18 +3728,18 @@ Announce maximum bit-rate acceptable (N in bytes/second)
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
reserved
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
12
\end_layout
@@ -3528,7 +3748,7 @@ reserved
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
32
\end_layout
@@ -3537,18 +3757,18 @@ reserved
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Acknowledge receiving packet N
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
13
\end_layout
@@ -3557,7 +3777,7 @@ Acknowledge receiving packet N
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
32
\end_layout
@@ -3566,18 +3786,18 @@ Acknowledge receiving packet N
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
reserved
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
14
\end_layout
@@ -3586,7 +3806,7 @@ reserved
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
64
\end_layout
@@ -3595,36 +3815,36 @@ reserved
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
reserved
\end_layout
\end_inset
</cell>
</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
15
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
64
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
reserved
\end_layout
@@ -3639,7 +3859,7 @@ reserved
\begin_inset ERT
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
\backslash
@@ -3651,12 +3871,13 @@ end{center}
\end_layout
-\begin_layout Standard
+\begin_layout Plain Layout
\begin_inset Caption
-\begin_layout Standard
+\begin_layout Plain Layout
In-band signalling codes
-\begin_inset LatexCommand label
+\begin_inset CommandInset label
+LatexCommand label
name "cap:In-band-signalling-codes"
\end_inset
@@ -3678,7 +3899,9 @@ name "cap:In-band-signalling-codes"
Finally, applications may define custom in-band messages using mode 13.
The size of the message in bytes is encoded with 5 bits, so that the decoder
can skip it if it doesn't know how to interpret it.
-\newpage
+\begin_inset Newpage newpage
+\end_inset
+
\end_layout
@@ -3718,7 +3941,8 @@ calls using the same state from multiple threads must be protected by mutexes
\begin_layout Section
Preprocessor
-\begin_inset LatexCommand label
+\begin_inset CommandInset label
+LatexCommand label
name "sub:Preprocessor"
\end_inset
@@ -3729,8 +3953,12 @@ name "sub:Preprocessor"
\begin_layout Standard
\noindent
In order to use the Speex preprocessor
-\begin_inset LatexCommand index
-name "preprocessor"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+preprocessor
+\end_layout
\end_inset
@@ -3739,7 +3967,7 @@ name "preprocessor"
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
#include <speex/speex_preprocess.h>
\end_layout
@@ -3756,7 +3984,7 @@ Then, a preprocessor state can be created as:
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
SpeexPreprocessState *preprocess_state = speex_preprocess_state_init(frame_size,
sampling_rate);
@@ -3789,7 +4017,7 @@ For each input frame, you need to call:
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
speex_preprocess_run(preprocess_state, audio_frame);
\end_layout
@@ -3815,7 +4043,7 @@ audio_frame
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
speex_preprocess_estimate_update(preprocess_state, audio_frame);
\end_layout
@@ -3840,7 +4068,7 @@ The behaviour of the preprocessor can be changed using:
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
speex_preprocess_ctl(preprocess_state, request, ptr);
\end_layout
@@ -3854,7 +4082,8 @@ speex_preprocess_ctl(preprocess_state, request, ptr);
\noindent
which is used in the same way as the encoder and decoder equivalent.
Options are listed in Section
-\begin_inset LatexCommand ref
+\begin_inset CommandInset ref
+LatexCommand ref
reference "sub:Preprocessor-options"
\end_inset
@@ -3871,7 +4100,7 @@ The preprocessor state can be destroyed using:
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
speex_preprocess_state_destroy(preprocess_state);
\end_layout
@@ -3883,7 +4112,8 @@ speex_preprocess_state_destroy(preprocess_state);
\begin_layout Subsection
Preprocessor options
-\begin_inset LatexCommand label
+\begin_inset CommandInset label
+LatexCommand label
name "sub:Preprocessor-options"
\end_inset
@@ -3903,7 +4133,7 @@ SPEEX_PREPROCESS_SET_DENOISE Turns denoising on(1) or off(2) (
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -3919,7 +4149,7 @@ SPEEX_PREPROCESS_GET_DENOISE Get denoising status (
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -3936,7 +4166,7 @@ SPEEX_PREPROCESS_SET_AGC Turns automatic gain control (AGC) on(1) or off(2)
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -3952,7 +4182,7 @@ SPEEX_PREPROCESS_GET_AGC Get AGC status (
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -3969,7 +4199,7 @@ SPEEX_PREPROCESS_SET_VAD Turns voice activity detector (VAD) on(1) or off(2)
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -3985,7 +4215,7 @@ SPEEX_PREPROCESS_GET_VAD Get VAD status (
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -4010,7 +4240,7 @@ SPEEX_PREPROCESS_SET_DEREVERB Turns reverberation removal on(1) or off(2)
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -4026,7 +4256,7 @@ SPEEX_PREPROCESS_GET_DEREVERB Get reverberation removal status (
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -4075,7 +4305,7 @@ SPEEX_PREPROCESS_SET_NOISE_SUPPRESS Set maximum attenuation of the noise
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -4092,7 +4322,7 @@ SPEEX_PREPROCESS_GET_NOISE_SUPPRESS Get maximum attenuation of the noise
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -4109,7 +4339,7 @@ SPEEX_PREPROCESS_SET_ECHO_SUPPRESS Set maximum attenuation of the residual
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -4126,7 +4356,7 @@ SPEEX_PREPROCESS_GET_ECHO_SUPPRESS Set maximum attenuation of the residual
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -4143,7 +4373,7 @@ SPEEX_PREPROCESS_SET_ECHO_SUPPRESS_ACTIVE Set maximum attenuation of the
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -4160,7 +4390,7 @@ SPEEX_PREPROCESS_GET_ECHO_SUPPRESS_ACTIVE Set maximum attenuation of the
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
spx_int32_t
\end_layout
@@ -4181,7 +4411,8 @@ SPEEX_PREPROCESS_GET_ECHO_STATE Get the associated echo canceller (pointer)
\begin_layout Section
Echo Cancellation
-\begin_inset LatexCommand label
+\begin_inset CommandInset label
+LatexCommand label
name "sub:Echo-Cancellation"
\end_inset
@@ -4191,14 +4422,22 @@ name "sub:Echo-Cancellation"
\begin_layout Standard
The Speex library now includes an echo cancellation
-\begin_inset LatexCommand index
-name "echo cancellation"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+echo cancellation
+\end_layout
\end_inset
algorithm suitable for Acoustic Echo Cancellation
-\begin_inset LatexCommand index
-name "acoustic echo cancellation"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+acoustic echo cancellation
+\end_layout
\end_inset
@@ -4211,7 +4450,7 @@ name "acoustic echo cancellation"
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
#include <speex/speex_echo.h>
\end_layout
@@ -4230,7 +4469,7 @@ Then, an echo canceller state can be created by:
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
SpeexEchoState *echo_state = speex_echo_state_init(frame_size, filter_length);
\end_layout
@@ -4255,8 +4494,12 @@ filter_length
tail length
\shape default
-\begin_inset LatexCommand index
-name "tail length"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+tail length
+\end_layout
\end_inset
@@ -4280,7 +4523,7 @@ Once the echo canceller state is created, audio can be processed by:
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
speex_echo_cancellation(echo_state, input_frame, echo_frame, output_frame);
\end_layout
@@ -4335,17 +4578,17 @@ lstparams "breaklines=true"
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
write_to_soundcard(echo_frame, frame_size);
\end_layout
-\begin_layout Standard
+\begin_layout Plain Layout
read_from_soundcard(input_frame, frame_size);
\end_layout
-\begin_layout Standard
+\begin_layout Plain Layout
speex_echo_cancellation(echo_state, input_frame, echo_frame, output_frame);
\end_layout
@@ -4358,7 +4601,8 @@ speex_echo_cancellation(echo_state, input_frame, echo_frame, output_frame);
\begin_layout Standard
If you wish to further reduce the echo present in the signal, you can do
so by associating the echo canceller to the preprocessor (see Section
-\begin_inset LatexCommand ref
+\begin_inset CommandInset ref
+LatexCommand ref
reference "sub:Preprocessor"
\end_inset
@@ -4370,7 +4614,7 @@ lstparams "breaklines=true"
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
speex_preprocess_ctl(preprocess_state, SPEEX_PREPROCESS_SET_ECHO_STATE,echo_stat
e);
@@ -4407,7 +4651,7 @@ select()
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
speex_echo_playback(echo_state, echo_frame);
\end_layout
@@ -4427,7 +4671,7 @@ every time an audio frame is played.
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
speex_echo_capture(echo_state, input_frame, output_frame);
\end_layout
@@ -4470,7 +4714,7 @@ The echo cancellation state can be destroyed with:
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
speex_echo_state_destroy(echo_state);
\end_layout
@@ -4490,7 +4734,7 @@ It is also possible to reset the state of the echo canceller so it can be
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
speex_echo_state_reset(echo_state);
\end_layout
@@ -4583,7 +4827,7 @@ Echo Cancellation Demystified
\begin_inset Foot
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
http://www.embeddedstar.com/articles/2003/7/article20030720-1.html
\end_layout
@@ -4614,7 +4858,7 @@ lstparams "language=Matlab"
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
echo_diagnostic('aec_rec.sw', 'aec_play.sw', 'aec_diagnostic.sw', 1024);
\end_layout
@@ -4643,7 +4887,7 @@ lstparams "breaklines=true"
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
#include <speex/speex_jitter.h>
\end_layout
@@ -4659,7 +4903,7 @@ lstparams "breaklines=true"
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
JitterBuffer *state = jitter_buffer_init(step);
\end_layout
@@ -4675,7 +4919,7 @@ where the
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
step
\end_layout
@@ -4699,7 +4943,7 @@ The jitter buffer API is based on the
inline true
status open
-\begin_layout Standard
+\begin_layout Plain Layout
JitterBufferPacket
\end_layout
@@ -4711,33 +4955,33 @@ JitterBufferPacket
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
typedef struct {
\end_layout
-\begin_layout Standard
+\begin_layout Plain Layout
char *data; /* Data bytes contained in the packet */
\end_layout
-\begin_layout Standard
+\begin_layout Plain Layout
spx_uint32_t len; /* Length of the packet in bytes */
\end_layout
-\begin_layout Standard
+\begin_layout Plain Layout
spx_uint32_t timestamp; /* Timestamp for the packet */
\end_layout
-\begin_layout Standard
+\begin_layout Plain Layout
spx_uint32_t span; /* Time covered by the packet (timestamp units)
*/
\end_layout
-\begin_layout Standard
+\begin_layout Plain Layout
} JitterBufferPacket;
\end_layout
@@ -4762,17 +5006,17 @@ When a packet arrives, it need to be inserter into the jitter buffer by:
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
JitterBufferPacket packet;
\end_layout
-\begin_layout Standard
+\begin_layout Plain Layout
/* Fill in each field in the packet struct */
\end_layout
-\begin_layout Standard
+\begin_layout Plain Layout
jitter_buffer_put(state, &packet);
\end_layout
@@ -4789,12 +5033,12 @@ When the decoder is ready to decode a packet the packet to be decoded can
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
int start_offset;
\end_layout
-\begin_layout Standard
+\begin_layout Plain Layout
err = jitter_buffer_get(state, &packet, desired_span, &start_offset);
\end_layout
@@ -4810,7 +5054,7 @@ If
inline true
status open
-\begin_layout Standard
+\begin_layout Plain Layout
jitter_buffer_put()
\end_layout
@@ -4822,7 +5066,7 @@ jitter_buffer_put()
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
jitter_buffer_get()
\end_layout
@@ -4845,7 +5089,7 @@ Because the jitter buffer is designed not to use an explicit timer, it needs
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
jitter_buffer_tick(state);
\end_layout
@@ -4864,7 +5108,7 @@ This needs to be done periodically in the playing thread.
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
jitter_buffer_remaining_span(state, remaining);
\end_layout
@@ -4883,7 +5127,7 @@ The second argument is used to specify that we are still holding data that
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
desired_span
\end_layout
@@ -4895,7 +5139,7 @@ desired_span
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
jitter_buffer_get()
\end_layout
@@ -4907,7 +5151,7 @@ jitter_buffer_get()
inline true
status open
-\begin_layout Standard
+\begin_layout Plain Layout
remaining=64
\end_layout
@@ -4931,7 +5175,7 @@ Speex includes a resampling modules.
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
#include <speex/speex_resampler.h>
\end_layout
@@ -4951,12 +5195,12 @@ For each stream that is to be resampled, it is necessary to create a resampler
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
SpeexResamplerState *resampler;
\end_layout
-\begin_layout Standard
+\begin_layout Plain Layout
resampler = speex_resampler_init(nb_channels, input_rate, output_rate, quality,
&err);
@@ -4973,7 +5217,7 @@ where
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
nb_channels
\end_layout
@@ -4986,7 +5230,7 @@ ved),
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
input_rate
\end_layout
@@ -4998,7 +5242,7 @@ input_rate
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
output_rate
\end_layout
@@ -5010,7 +5254,7 @@ output_rate
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
quality
\end_layout
@@ -5037,7 +5281,7 @@ The actual resampling is performed using
inline false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
err = speex_resampler_process_int(resampler, channelID, in, &in_length,
out, &out_length);
@@ -5050,7 +5294,7 @@ where
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
channelID
\end_layout
@@ -5069,7 +5313,7 @@ in
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
out
\end_layout
@@ -5082,7 +5326,7 @@ out
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
in_length
\end_layout
@@ -5094,7 +5338,7 @@ in_length
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
out_length
\end_layout
@@ -5111,7 +5355,7 @@ out_length
inline true
status open
-\begin_layout Standard
+\begin_layout Plain Layout
speex_resampler_process_float()
\end_layout
@@ -5128,7 +5372,7 @@ It is also possible to process multiple channels at once.
inline true
status open
-\begin_layout Standard
+\begin_layout Plain Layout
speex_resampler_process_interleaved_float()
\end_layout
@@ -5141,7 +5385,7 @@ speex_resampler_process_interleaved_float()
inline true
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
channelID
\end_layout
@@ -5166,7 +5410,7 @@ The resampler allows changing the quality and input/output sampling frequencies
inline true
status open
-\begin_layout Standard
+\begin_layout Plain Layout
speex_resampler_set_quality()
\end_layout
@@ -5178,7 +5422,7 @@ speex_resampler_set_quality()
inline true
status open
-\begin_layout Standard
+\begin_layout Plain Layout
speex_resampler_set_rate()
\end_layout
@@ -5199,7 +5443,7 @@ When resampling a file, it is often desirable to have the output file perfectly
inline true
status open
-\begin_layout Standard
+\begin_layout Plain Layout
speex_resampler_skip_zeros()
\end_layout
@@ -5219,7 +5463,7 @@ before
inline true
status open
-\begin_layout Standard
+\begin_layout Plain Layout
speex_resampler_destroy()
\end_layout
@@ -5237,28 +5481,37 @@ Ring Buffer
In some cases, it is necessary to interface components that use different
block sizes.
For example, it is possible that the soundcard does not support reading/writing
- in blocks of 20\InsetSpace ~
-ms or sometimes, complicated resampling ratios mean that
- the blocks don't always have the same time.
+ in blocks of 20
+\begin_inset space ~
+\end_inset
+
+ms or sometimes, complicated resampling ratios mean that the blocks don't
+ always have the same time.
In thoses cases, it is often necessary to buffer a bit of audio using a
ring buffer.
\end_layout
\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
-\newpage
\end_layout
\begin_layout Chapter
Formats and standards
-\begin_inset LatexCommand index
-name "standards"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+standards
+\end_layout
\end_inset
-\begin_inset LatexCommand label
+\begin_inset CommandInset label
+LatexCommand label
name "sec:Formats-and-standards"
\end_inset
@@ -5290,7 +5543,7 @@ At the minimum, all narrowband modes of operation MUST be supported at the
\begin_inset Foot
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
The wideband bit-stream contains an embedded narrowband bit-stream which
can be decoded alone
\end_layout
@@ -5313,8 +5566,12 @@ For encoders, at least one narrowband or wideband mode MUST be supported.
\begin_layout Section
RTP
-\begin_inset LatexCommand index
-name "RTP"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+RTP
+\end_layout
\end_inset
@@ -5323,14 +5580,20 @@ name "RTP"
\begin_layout Standard
The RTP payload draft is included in appendix
-\begin_inset LatexCommand ref
+\begin_inset CommandInset ref
+LatexCommand ref
reference "sec:IETF-draft"
\end_inset
and the latest version is available at
-\begin_inset LatexCommand url
-target "http://www.speex.org/drafts/latest"
+\begin_inset Flex URL
+status collapsed
+
+\begin_layout Plain Layout
+
+http://www.speex.org/drafts/latest
+\end_layout
\end_inset
@@ -5355,8 +5618,12 @@ audio/speex
\begin_layout Section
Ogg
-\begin_inset LatexCommand index
-name "Ogg"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Ogg
+\end_layout
\end_inset
@@ -5367,7 +5634,8 @@ name "Ogg"
Speex bit-streams can be stored in Ogg files.
In this case, the first packet of the Ogg file contains the Speex header
described in table
-\begin_inset LatexCommand ref
+\begin_inset CommandInset ref
+LatexCommand ref
reference "cap:ogg_speex_header"
\end_inset
@@ -5386,9 +5654,18 @@ speex_string
\family typewriter
Speex
\family default
-\InsetSpace ~
-\InsetSpace ~
-\InsetSpace ~
+
+\begin_inset space ~
+\end_inset
+
+
+\begin_inset space ~
+\end_inset
+
+
+\begin_inset space ~
+\end_inset
+
\begin_inset Quotes erd
\end_inset
@@ -5465,11 +5742,11 @@ wide true
sideways false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
\begin_inset ERT
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
\backslash
@@ -5482,43 +5759,43 @@ begin{center}
\begin_inset Tabular
<lyxtabular version="3" rows="16" columns="3">
<features>
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Field
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Type
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Size
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
speex_string
\end_layout
@@ -5527,7 +5804,7 @@ speex_string
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
char[]
\end_layout
@@ -5536,18 +5813,18 @@ char[]
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
8
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
speex_version
\end_layout
@@ -5556,7 +5833,7 @@ speex_version
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
char[]
\end_layout
@@ -5565,18 +5842,18 @@ char[]
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
20
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
speex_version_id
\end_layout
@@ -5585,7 +5862,7 @@ speex_version_id
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
int
\end_layout
@@ -5594,18 +5871,18 @@ int
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
header_size
\end_layout
@@ -5614,7 +5891,7 @@ header_size
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
int
\end_layout
@@ -5623,18 +5900,18 @@ int
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
rate
\end_layout
@@ -5643,7 +5920,7 @@ rate
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
int
\end_layout
@@ -5652,18 +5929,18 @@ int
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
mode
\end_layout
@@ -5672,7 +5949,7 @@ mode
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
int
\end_layout
@@ -5681,18 +5958,18 @@ int
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
mode_bitstream_version
\end_layout
@@ -5701,7 +5978,7 @@ mode_bitstream_version
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
int
\end_layout
@@ -5710,18 +5987,18 @@ int
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
nb_channels
\end_layout
@@ -5730,7 +6007,7 @@ nb_channels
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
int
\end_layout
@@ -5739,18 +6016,18 @@ int
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
bitrate
\end_layout
@@ -5759,7 +6036,7 @@ bitrate
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
int
\end_layout
@@ -5768,18 +6045,18 @@ int
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
frame_size
\end_layout
@@ -5788,7 +6065,7 @@ frame_size
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
int
\end_layout
@@ -5797,18 +6074,18 @@ int
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
vbr
\end_layout
@@ -5817,7 +6094,7 @@ vbr
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
int
\end_layout
@@ -5826,18 +6103,18 @@ int
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
frames_per_packet
\end_layout
@@ -5846,7 +6123,7 @@ frames_per_packet
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
int
\end_layout
@@ -5855,18 +6132,18 @@ int
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
extra_headers
\end_layout
@@ -5875,7 +6152,7 @@ extra_headers
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
int
\end_layout
@@ -5884,18 +6161,18 @@ int
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
reserved1
\end_layout
@@ -5904,7 +6181,7 @@ reserved1
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
int
\end_layout
@@ -5913,36 +6190,36 @@ int
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
\end_inset
</cell>
</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
reserved2
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
int
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
@@ -5957,7 +6234,7 @@ int
\begin_inset ERT
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
\backslash
@@ -5969,12 +6246,13 @@ end{center}
\end_layout
-\begin_layout Standard
+\begin_layout Plain Layout
\begin_inset Caption
-\begin_layout Standard
+\begin_layout Plain Layout
Ogg/Speex header packet
-\begin_inset LatexCommand label
+\begin_inset CommandInset label
+LatexCommand label
name "cap:ogg_speex_header"
\end_inset
@@ -5996,7 +6274,7 @@ name "cap:ogg_speex_header"
\begin_inset ERT
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
\backslash
@@ -6010,13 +6288,18 @@ clearpage
\begin_layout Chapter
Introduction to CELP Coding
-\begin_inset LatexCommand index
-name "CELP"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+CELP
+\end_layout
\end_inset
-\begin_inset LatexCommand label
+\begin_inset CommandInset label
+LatexCommand label
name "sec:Introduction-to-CELP"
\end_inset
@@ -6036,7 +6319,8 @@ Do not meddle in the affairs of poles, for they are subtle and quick to
Speex is based on CELP, which stands for Code Excited Linear Prediction.
This section attempts to introduce the principles behind CELP, so if you
are already familiar with CELP, you can safely skip to section
-\begin_inset LatexCommand ref
+\begin_inset CommandInset ref
+LatexCommand ref
reference "sec:Speex-narrowband-mode"
\end_inset
@@ -6099,7 +6383,8 @@ The source-filter model of speech production assumes that the vocal cords
The source-filter model is usually tied with the use of Linear prediction.
The CELP model is based on source-filter model, as can be seen from the
CELP decoder illustrated in Figure
-\begin_inset LatexCommand ref
+\begin_inset CommandInset ref
+LatexCommand ref
reference "fig:The-CELP-model"
\end_inset
@@ -6114,11 +6399,11 @@ wide false
sideways false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
\begin_inset ERT
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
\backslash
@@ -6139,7 +6424,7 @@ begin{center}
\begin_inset ERT
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
\backslash
@@ -6151,12 +6436,13 @@ end{center}
\end_layout
-\begin_layout Standard
+\begin_layout Plain Layout
\begin_inset Caption
-\begin_layout Standard
+\begin_layout Plain Layout
The CELP model of speech synthesis (decoder)
-\begin_inset LatexCommand label
+\begin_inset CommandInset label
+LatexCommand label
name "fig:The-CELP-model"
\end_inset
@@ -6176,8 +6462,12 @@ name "fig:The-CELP-model"
\begin_layout Section
Linear Prediction (LPC)
-\begin_inset LatexCommand index
-name "linear prediction"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+linear prediction
+\end_layout
\end_inset
@@ -6285,8 +6575,12 @@ with
\end_inset
, the auto-correlation
-\begin_inset LatexCommand index
-name "auto-correlation"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+auto-correlation
+\end_layout
\end_inset
@@ -6312,8 +6606,12 @@ Because
\end_inset
is Hermitian Toeplitz, the Levinson-Durbin
-\begin_inset LatexCommand index
-name "Levinson-Durbin"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Levinson-Durbin
+\end_layout
\end_inset
@@ -6349,8 +6647,12 @@ name "Levinson-Durbin"
\begin_layout Section
Pitch Prediction
-\begin_inset LatexCommand index
-name "pitch"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+pitch
+\end_layout
\end_inset
@@ -6451,14 +6753,22 @@ X(z)=\frac{C(z)}{A(z)\left(1-\beta z^{-T}\right)}\]
\begin_layout Section
Noise Weighting
-\begin_inset LatexCommand index
-name "error weighting"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+error weighting
+\end_layout
\end_inset
-\begin_inset LatexCommand index
-name "analysis-by-synthesis"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+analysis-by-synthesis
+\end_layout
\end_inset
@@ -6558,14 +6868,16 @@ The weighting filter is applied to the error signal used to optimize the
function.
Fig.
-\begin_inset LatexCommand ref
+\begin_inset CommandInset ref
+LatexCommand ref
reference "cap:Standard-noise-shaping"
\end_inset
illustrates the noise shaping that results from Eq.
-\begin_inset LatexCommand ref
+\begin_inset CommandInset ref
+LatexCommand ref
reference "eq:gamma-weighting"
\end_inset
@@ -6588,11 +6900,11 @@ wide false
sideways false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
\begin_inset ERT
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
\backslash
@@ -6613,7 +6925,7 @@ begin{center}
\begin_inset ERT
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
\backslash
@@ -6625,13 +6937,14 @@ end{center}
\end_layout
-\begin_layout Standard
+\begin_layout Plain Layout
\begin_inset Caption
-\begin_layout Standard
+\begin_layout Plain Layout
Standard noise shaping in CELP.
Arbitrary y-axis offset.
-\begin_inset LatexCommand label
+\begin_inset CommandInset label
+LatexCommand label
name "cap:Standard-noise-shaping"
\end_inset
@@ -6680,374 +6993,26 @@ In order to achieve real-time encoding using limited computing resources,
\end_layout
\begin_layout Standard
-
-\newpage
-
-\end_layout
-
-\begin_layout Chapter
-Speex narrowband mode
-\begin_inset LatexCommand label
-name "sec:Speex-narrowband-mode"
-
-\end_inset
-
-
-\begin_inset LatexCommand index
-name "narrowband"
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-This section looks at how Speex works for narrowband (
-\begin_inset Formula $8\:\mathrm{kHz}$
-\end_inset
-
- sampling rate) operation.
- The frame size for this mode is
-\begin_inset Formula $20\:\mathrm{ms}$
-\end_inset
-
-, corresponding to 160 samples.
- Each frame is also subdivided into 4 sub-frames of 40 samples each.
-\end_layout
-
-\begin_layout Standard
-Also many design decisions were based on the original goals and assumptions:
-\end_layout
-
-\begin_layout Itemize
-Minimizing the amount of information extracted from past frames (for robustness
- to packet loss)
-\end_layout
-
-\begin_layout Itemize
-Dynamically-selectable codebooks (LSP, pitch and innovation)
-\end_layout
-
-\begin_layout Itemize
-sub-vector fixed (innovation) codebooks
-\end_layout
-
-\begin_layout Section
-Whole-Frame Analysis
-\begin_inset LatexCommand index
-name "linear prediction"
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-In narrowband, Speex frames are 20 ms long (160 samples) and are subdivided
- in 4 sub-frames of 5 ms each (40 samples).
- For most narrowband bit-rates (8 kbps and above), the only parameters encoded
- at the frame level are the Line Spectral Pairs (LSP) and a global excitation
- gain
-\begin_inset Formula $g_{frame}$
-\end_inset
-
-, as shown in Fig.
-
-\begin_inset LatexCommand ref
-reference "cap:Frame-open-loop-analysis"
-
-\end_inset
-
-.
- All other parameters are encoded at the sub-frame level.
-\end_layout
-
-\begin_layout Standard
-Linear prediction analysis is performed once per frame using an asymmetric
- Hamming window centered on the fourth sub-frame.
- Because linear prediction coefficients (LPC) are not robust to quantization,
- they are first are converted to line spectral pairs (LSP)
-\begin_inset LatexCommand index
-name "line spectral pair"
-
-\end_inset
-
-.
- The LSP's are considered to be associated to the
-\begin_inset Formula $4^{th}$
-\end_inset
-
- sub-frames and the LSP's associated to the first 3 sub-frames are linearly
- interpolated using the current and previous LSP coefficients.
- The LSP coefficients and converted back to the LPC filter
-\begin_inset Formula $\hat{A}(z)$
-\end_inset
-
-.
- The non-quantized interpolated filter is denoted
-\begin_inset Formula $A(z)$
-\end_inset
-
- and can be used for the weighting filter
-\begin_inset Formula $W(z)$
-\end_inset
-
- because it does not need to be available to the decoder.
-
-\end_layout
-
-\begin_layout Standard
-To make Speex more robust to packet loss, no prediction is applied on the
- LSP coefficients prior to quantization.
- The LSPs are encoded using vector quantization (VQ) with 30 bits for higher
- quality modes and 18 bits for lower quality.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Standard
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-
-\backslash
-begin{center}
-\end_layout
-
-\end_inset
-
-
-\begin_inset Graphics
- filename speex_analysis.eps
- width 35page%
-
-\end_inset
-
-
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-
-\backslash
-end{center}
-\end_layout
-
+\begin_inset Newpage newpage
\end_inset
\end_layout
-\begin_layout Standard
-\begin_inset Caption
-
-\begin_layout Standard
-Frame open-loop analysis
-\begin_inset LatexCommand label
-name "cap:Frame-open-loop-analysis"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
+\begin_layout Chapter
+The Speex Decoder Specification
\end_layout
\begin_layout Section
-Sub-Frame Analysis-by-Synthesis
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Standard
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-
-\backslash
-begin{center}
-\end_layout
-
-\end_inset
-
-
-\begin_inset Graphics
- filename speex_abs.eps
- lyxscale 75
- width 40page%
-
-\end_inset
-
-
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-
-\backslash
-end{center}
-\end_layout
-
-\end_inset
-
-
+Narrowband decoder
\end_layout
\begin_layout Standard
-\begin_inset Caption
-
-\begin_layout Standard
-Analysis-by-synthesis closed-loop optimization on a sub-frame.
-\begin_inset LatexCommand label
-name "cap:Sub-frame-AbS"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
+<Insert decoder figure here>
\end_layout
-\begin_layout Standard
-The analysis-by-synthesis (AbS) encoder loop is described in Fig.
-
-\begin_inset LatexCommand ref
-reference "cap:Sub-frame-AbS"
-
-\end_inset
-
-.
- There are three main aspects where Speex significantly differs from most
- other CELP codecs.
- First, while most recent CELP codecs make use of fractional pitch estimation
- with a single gain, Speex uses an integer to encode the pitch period, but
- uses a 3-tap predictor (3 gains).
- The adaptive codebook contribution
-\begin_inset Formula $e_{a}[n]$
-\end_inset
-
- can thus be expressed as:
-\begin_inset Formula \begin{equation}
-e_{a}[n]=g_{0}e[n-T-1]+g_{1}e[n-T]+g_{2}e[n-T+1]\label{eq:adaptive-3tap}\end{equation}
-
-\end_inset
-
-where
-\begin_inset Formula $g_{0}$
-\end_inset
-
-,
-\begin_inset Formula $g_{1}$
-\end_inset
-
- and
-\begin_inset Formula $g_{2}$
-\end_inset
-
- are the jointly quantized pitch gains and
-\begin_inset Formula $e[n]$
-\end_inset
-
- is the codec excitation memory.
- It is worth noting that when the pitch is smaller than the sub-frame size,
- we repeat the excitation at a period
-\begin_inset Formula $T$
-\end_inset
-
-.
- For example, when
-\begin_inset Formula $n-T+1\geq0$
-\end_inset
-
-, we use
-\begin_inset Formula $n-2T+1$
-\end_inset
-
- instead.
- In most modes, the pitch period is encoded with 7 bits in the
-\begin_inset Formula $\left[17,144\right]$
-\end_inset
-
- range and the
-\begin_inset Formula $\beta_{i}$
-\end_inset
-
- coefficients are vector-quantized using 7 bits at higher bit-rates (15
- kbps narrowband and above) and 5 bits at lower bit-rates (11 kbps narrowband
- and below).
-\end_layout
-
-\begin_layout Standard
-Many current CELP codecs use moving average (MA) prediction to encode the
- fixed codebook gain.
- This provides slightly better coding at the expense of introducing a dependency
- on previously encoded frames.
- A second difference is that Speex encodes the fixed codebook gain as the
- product of the global excitation gain
-\begin_inset Formula $g_{frame}$
-\end_inset
-
- with a sub-frame gain corrections
-\begin_inset Formula $g_{subf}$
-\end_inset
-
-.
- This increases robustness to packet loss by eliminating the inter-frame
- dependency.
- The sub-frame gain correction is encoded before the fixed codebook is searched
- (not closed-loop optimized) and uses between 0 and 3 bits per sub-frame,
- depending on the bit-rate.
-\end_layout
-
-\begin_layout Standard
-The third difference is that Speex uses sub-vector quantization of the innovatio
-n (fixed codebook) signal instead of an algebraic codebook.
- Each sub-frame is divided into sub-vectors of lengths ranging between 5
- and 20 samples.
- Each sub-vector is chosen from a bitrate-dependent codebook and all sub-vectors
- are concatenated to form a sub-frame.
- As an example, the 3.95 kbps mode uses a sub-vector size of 20 samples with
- 32 entries in the codebook (5 bits).
- This means that the innovation is encoded with 10 bits per sub-frame, or
- 2000 bps.
- On the other hand, the 18.2 kbps mode uses a sub-vector size of 5 samples
- with 256 entries in the codebook (8 bits), so the innovation uses 64 bits
- per sub-frame, or 12800 bps.
-
-\end_layout
-
-\begin_layout Section
-Bit allocation
+\begin_layout Subsection
+Narrowband modes
\end_layout
\begin_layout Standard
@@ -7055,7 +7020,8 @@ There are 7 different narrowband bit-rates defined for Speex, ranging from
250 bps to 24.6 kbps, although the modes below 5.9 kbps should not be used
for speech.
The bit-allocation for each mode is detailed in table
-\begin_inset LatexCommand ref
+\begin_inset CommandInset ref
+LatexCommand ref
reference "cap:bits-narrowband"
\end_inset
@@ -7068,7 +7034,7 @@ reference "cap:bits-narrowband"
All frame-based parameters are packed before sub-frame parameters.
The parameters for a certain sub-frame are all packed before the following
sub-frame is packed.
- Note that the
+ The
\begin_inset Quotes eld
\end_inset
@@ -7087,11 +7053,11 @@ wide true
sideways false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
\begin_inset ERT
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
\backslash
@@ -7104,123 +7070,123 @@ begin{center}
\begin_inset Tabular
<lyxtabular version="3" rows="12" columns="11">
<features>
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
Parameter
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Update rate
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
1
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
2
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
3
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
5
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
6
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
7
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
8
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Wideband bit
\end_layout
@@ -7229,7 +7195,7 @@ Wideband bit
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
frame
\end_layout
@@ -7238,7 +7204,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
1
\end_layout
@@ -7247,7 +7213,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
1
\end_layout
@@ -7256,7 +7222,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
1
\end_layout
@@ -7265,7 +7231,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
1
\end_layout
@@ -7274,7 +7240,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
1
\end_layout
@@ -7283,25 +7249,25 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
1
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
1
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
1
\end_layout
@@ -7310,18 +7276,18 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
1
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Mode ID
\end_layout
@@ -7330,7 +7296,7 @@ Mode ID
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
frame
\end_layout
@@ -7339,7 +7305,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
@@ -7348,7 +7314,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
@@ -7357,7 +7323,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
@@ -7366,7 +7332,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
@@ -7375,7 +7341,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
@@ -7384,25 +7350,25 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
@@ -7411,18 +7377,18 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
LSP
\end_layout
@@ -7431,7 +7397,7 @@ LSP
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
frame
\end_layout
@@ -7440,7 +7406,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
@@ -7449,7 +7415,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
18
\end_layout
@@ -7458,7 +7424,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
18
\end_layout
@@ -7467,7 +7433,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
18
\end_layout
@@ -7476,7 +7442,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
18
\end_layout
@@ -7485,25 +7451,25 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
30
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
30
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
30
\end_layout
@@ -7512,18 +7478,18 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
18
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
OL pitch
\end_layout
@@ -7532,7 +7498,7 @@ OL pitch
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
frame
\end_layout
@@ -7541,7 +7507,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
@@ -7550,7 +7516,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
7
\end_layout
@@ -7559,7 +7525,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
7
\end_layout
@@ -7568,7 +7534,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
@@ -7577,7 +7543,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
@@ -7586,25 +7552,25 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
@@ -7613,18 +7579,18 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
7
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
OL pitch gain
\end_layout
@@ -7633,7 +7599,7 @@ OL pitch gain
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
frame
\end_layout
@@ -7642,7 +7608,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
@@ -7651,7 +7617,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
@@ -7660,7 +7626,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
@@ -7669,7 +7635,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
@@ -7678,7 +7644,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
@@ -7687,25 +7653,25 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
@@ -7714,18 +7680,18 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
OL Exc gain
\end_layout
@@ -7734,7 +7700,7 @@ OL Exc gain
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
frame
\end_layout
@@ -7743,7 +7709,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
@@ -7752,7 +7718,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
5
\end_layout
@@ -7761,7 +7727,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
5
\end_layout
@@ -7770,7 +7736,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
5
\end_layout
@@ -7779,7 +7745,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
5
\end_layout
@@ -7788,25 +7754,25 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
5
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
5
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
5
\end_layout
@@ -7815,18 +7781,18 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
5
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Fine pitch
\end_layout
@@ -7835,7 +7801,7 @@ Fine pitch
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
sub-frame
\end_layout
@@ -7844,7 +7810,7 @@ sub-frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
@@ -7853,7 +7819,7 @@ sub-frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
@@ -7862,7 +7828,7 @@ sub-frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
@@ -7871,7 +7837,7 @@ sub-frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
7
\end_layout
@@ -7880,7 +7846,7 @@ sub-frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
7
\end_layout
@@ -7889,25 +7855,25 @@ sub-frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
7
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
7
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
7
\end_layout
@@ -7916,18 +7882,18 @@ sub-frame
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Pitch gain
\end_layout
@@ -7936,7 +7902,7 @@ Pitch gain
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
sub-frame
\end_layout
@@ -7945,7 +7911,7 @@ sub-frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
@@ -7954,7 +7920,7 @@ sub-frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
@@ -7963,7 +7929,7 @@ sub-frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
5
\end_layout
@@ -7972,7 +7938,7 @@ sub-frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
5
\end_layout
@@ -7981,7 +7947,7 @@ sub-frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
5
\end_layout
@@ -7990,25 +7956,25 @@ sub-frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
7
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
7
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
7
\end_layout
@@ -8017,18 +7983,18 @@ sub-frame
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Innovation gain
\end_layout
@@ -8037,7 +8003,7 @@ Innovation gain
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
sub-frame
\end_layout
@@ -8046,7 +8012,7 @@ sub-frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
@@ -8055,7 +8021,7 @@ sub-frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
1
\end_layout
@@ -8064,7 +8030,7 @@ sub-frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
@@ -8073,7 +8039,7 @@ sub-frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
1
\end_layout
@@ -8082,7 +8048,7 @@ sub-frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
1
\end_layout
@@ -8091,25 +8057,25 @@ sub-frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
3
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
3
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
3
\end_layout
@@ -8118,209 +8084,209 @@ sub-frame
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
\end_inset
</cell>
</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Innovation VQ
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
sub-frame
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
16
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
20
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
35
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
48
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
64
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
96
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
10
\end_layout
\end_inset
</cell>
</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Total
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
frame
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
5
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
43
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
119
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
160
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
220
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
300
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
364
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
492
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
79
\end_layout
@@ -8335,7 +8301,7 @@ frame
\begin_inset ERT
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
\backslash
@@ -8347,12 +8313,13 @@ end{center}
\end_layout
-\begin_layout Standard
+\begin_layout Plain Layout
\begin_inset Caption
-\begin_layout Standard
+\begin_layout Plain Layout
Bit allocation for narrowband modes
-\begin_inset LatexCommand label
+\begin_inset CommandInset label
+LatexCommand label
name "cap:bits-narrowband"
\end_inset
@@ -8370,16 +8337,475 @@ name "cap:bits-narrowband"
\end_layout
+\begin_layout Subsection
+LSP decoding
+\end_layout
+
+\begin_layout Standard
+Depending on the mode, LSP parameters are encoded using either 18 bits or
+ 30 bits.
+\end_layout
+
+\begin_layout Standard
+Interpolation
+\end_layout
+
+\begin_layout Standard
+Safe margin
+\end_layout
+
+\begin_layout Subsection
+Adaptive codebook
+\end_layout
+
+\begin_layout Standard
+Decode period (constant, offset, per sub-frame)
+\end_layout
+
+\begin_layout Subsection
+Innovation codebook
+\end_layout
+
+\begin_layout Standard
+Split codebook, size and entries depend on bit-rate
+\end_layout
+
+\begin_layout Standard
+a 5-bit gain is encoder on a per-frame basis
+\end_layout
+
+\begin_layout Standard
+Depending on the mode, higher resolution per sub-frame
+\end_layout
+
+\begin_layout Standard
+innovation sub-vectors concatenated, gain applied
+\end_layout
+
+\begin_layout Subsection
+Perceptual enhancement
+\end_layout
+
+\begin_layout Standard
+Optional, implementation-defined.
+
+\end_layout
+
+\begin_layout Section
+Wideband embedded decoder
+\end_layout
+
+\begin_layout Standard
+QMF filter.
+ Narrowband signal decoded using narrowband decoder
+\end_layout
+
+\begin_layout Standard
+For the high band, the decoder is similar to the narrowband decoder, with
+ the main difference being that there is no adaptive codebook.
+\end_layout
+
+\begin_layout Standard
+Gain is per-subframe
+\end_layout
+
+\begin_layout Chapter
+Speex narrowband mode
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Speex-narrowband-mode"
+
+\end_inset
+
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+narrowband
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+This section looks at how Speex works for narrowband (
+\begin_inset Formula $8\:\mathrm{kHz}$
+\end_inset
+
+ sampling rate) operation.
+ The frame size for this mode is
+\begin_inset Formula $20\:\mathrm{ms}$
+\end_inset
+
+, corresponding to 160 samples.
+ Each frame is also subdivided into 4 sub-frames of 40 samples each.
+\end_layout
+
+\begin_layout Standard
+Also many design decisions were based on the original goals and assumptions:
+\end_layout
+
+\begin_layout Itemize
+Minimizing the amount of information extracted from past frames (for robustness
+ to packet loss)
+\end_layout
+
+\begin_layout Itemize
+Dynamically-selectable codebooks (LSP, pitch and innovation)
+\end_layout
+
+\begin_layout Itemize
+sub-vector fixed (innovation) codebooks
+\end_layout
+
+\begin_layout Section
+Whole-Frame Analysis
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+linear prediction
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+In narrowband, Speex frames are 20 ms long (160 samples) and are subdivided
+ in 4 sub-frames of 5 ms each (40 samples).
+ For most narrowband bit-rates (8 kbps and above), the only parameters encoded
+ at the frame level are the Line Spectral Pairs (LSP) and a global excitation
+ gain
+\begin_inset Formula $g_{frame}$
+\end_inset
+
+, as shown in Fig.
+
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "cap:Frame-open-loop-analysis"
+
+\end_inset
+
+.
+ All other parameters are encoded at the sub-frame level.
+\end_layout
+
+\begin_layout Standard
+Linear prediction analysis is performed once per frame using an asymmetric
+ Hamming window centered on the fourth sub-frame.
+ Because linear prediction coefficients (LPC) are not robust to quantization,
+ they are first are converted to line spectral pairs (LSP)
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+line spectral pair
+\end_layout
+
+\end_inset
+
+.
+ The LSP's are considered to be associated to the
+\begin_inset Formula $4^{th}$
+\end_inset
+
+ sub-frames and the LSP's associated to the first 3 sub-frames are linearly
+ interpolated using the current and previous LSP coefficients.
+ The LSP coefficients and converted back to the LPC filter
+\begin_inset Formula $\hat{A}(z)$
+\end_inset
+
+.
+ The non-quantized interpolated filter is denoted
+\begin_inset Formula $A(z)$
+\end_inset
+
+ and can be used for the weighting filter
+\begin_inset Formula $W(z)$
+\end_inset
+
+ because it does not need to be available to the decoder.
+
+\end_layout
+
+\begin_layout Standard
+To make Speex more robust to packet loss, no prediction is applied on the
+ LSP coefficients prior to quantization.
+ The LSPs are encoded using vector quantization (VQ) with 30 bits for higher
+ quality modes and 18 bits for lower quality.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+
+\begin_inset Graphics
+ filename speex_analysis.eps
+ width 35page%
+
+\end_inset
+
+
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Frame open-loop analysis
+\begin_inset CommandInset label
+LatexCommand label
+name "cap:Frame-open-loop-analysis"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Sub-Frame Analysis-by-Synthesis
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+
+\begin_inset Graphics
+ filename speex_abs.eps
+ lyxscale 75
+ width 40page%
+
+\end_inset
+
+
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Analysis-by-synthesis closed-loop optimization on a sub-frame.
+\begin_inset CommandInset label
+LatexCommand label
+name "cap:Sub-frame-AbS"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The analysis-by-synthesis (AbS) encoder loop is described in Fig.
+
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "cap:Sub-frame-AbS"
+
+\end_inset
+
+.
+ There are three main aspects where Speex significantly differs from most
+ other CELP codecs.
+ First, while most recent CELP codecs make use of fractional pitch estimation
+ with a single gain, Speex uses an integer to encode the pitch period, but
+ uses a 3-tap predictor (3 gains).
+ The adaptive codebook contribution
+\begin_inset Formula $e_{a}[n]$
+\end_inset
+
+ can thus be expressed as:
+\begin_inset Formula \begin{equation}
+e_{a}[n]=g_{0}e[n-T-1]+g_{1}e[n-T]+g_{2}e[n-T+1]\label{eq:adaptive-3tap}\end{equation}
+
+\end_inset
+
+where
+\begin_inset Formula $g_{0}$
+\end_inset
+
+,
+\begin_inset Formula $g_{1}$
+\end_inset
+
+ and
+\begin_inset Formula $g_{2}$
+\end_inset
+
+ are the jointly quantized pitch gains and
+\begin_inset Formula $e[n]$
+\end_inset
+
+ is the codec excitation memory.
+ It is worth noting that when the pitch is smaller than the sub-frame size,
+ we repeat the excitation at a period
+\begin_inset Formula $T$
+\end_inset
+
+.
+ For example, when
+\begin_inset Formula $n-T+1\geq0$
+\end_inset
+
+, we use
+\begin_inset Formula $n-2T+1$
+\end_inset
+
+ instead.
+ In most modes, the pitch period is encoded with 7 bits in the
+\begin_inset Formula $\left[17,144\right]$
+\end_inset
+
+ range and the
+\begin_inset Formula $\beta_{i}$
+\end_inset
+
+ coefficients are vector-quantized using 7 bits at higher bit-rates (15
+ kbps narrowband and above) and 5 bits at lower bit-rates (11 kbps narrowband
+ and below).
+\end_layout
+
+\begin_layout Standard
+Many current CELP codecs use moving average (MA) prediction to encode the
+ fixed codebook gain.
+ This provides slightly better coding at the expense of introducing a dependency
+ on previously encoded frames.
+ A second difference is that Speex encodes the fixed codebook gain as the
+ product of the global excitation gain
+\begin_inset Formula $g_{frame}$
+\end_inset
+
+ with a sub-frame gain corrections
+\begin_inset Formula $g_{subf}$
+\end_inset
+
+.
+ This increases robustness to packet loss by eliminating the inter-frame
+ dependency.
+ The sub-frame gain correction is encoded before the fixed codebook is searched
+ (not closed-loop optimized) and uses between 0 and 3 bits per sub-frame,
+ depending on the bit-rate.
+\end_layout
+
+\begin_layout Standard
+The third difference is that Speex uses sub-vector quantization of the innovatio
+n (fixed codebook) signal instead of an algebraic codebook.
+ Each sub-frame is divided into sub-vectors of lengths ranging between 5
+ and 20 samples.
+ Each sub-vector is chosen from a bitrate-dependent codebook and all sub-vectors
+ are concatenated to form a sub-frame.
+ As an example, the 3.95 kbps mode uses a sub-vector size of 20 samples with
+ 32 entries in the codebook (5 bits).
+ This means that the innovation is encoded with 10 bits per sub-frame, or
+ 2000 bps.
+ On the other hand, the 18.2 kbps mode uses a sub-vector size of 5 samples
+ with 256 entries in the codebook (8 bits), so the innovation uses 64 bits
+ per sub-frame, or 12800 bps.
+
+\end_layout
+
+\begin_layout Section
+Bit-rates
+\end_layout
+
\begin_layout Standard
So far, no MOS (Mean Opinion Score
-\begin_inset LatexCommand index
-name "mean opinion score"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+mean opinion score
+\end_layout
\end_inset
) subjective evaluation has been performed for Speex.
In order to give an idea of the quality achievable with it, table
-\begin_inset LatexCommand ref
+\begin_inset CommandInset ref
+LatexCommand ref
reference "cap:quality_vs_bps"
\end_inset
@@ -8393,8 +8819,12 @@ reference "cap:quality_vs_bps"
Note that the complexity is only approximate (within 0.5 mflops and using
the lowest complexity setting).
Decoding requires approximately 0.5 mflops
-\begin_inset LatexCommand index
-name "complexity"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+complexity
+\end_layout
\end_inset
@@ -8408,11 +8838,11 @@ wide true
sideways false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
\begin_inset ERT
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
\backslash
@@ -8425,37 +8855,41 @@ begin{center}
\begin_inset Tabular
<lyxtabular version="3" rows="17" columns="5">
<features>
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Mode
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Quality
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Bit-rate
-\begin_inset LatexCommand index
-name "bit-rate"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+bit-rate
+\end_layout
\end_inset
@@ -8464,13 +8898,17 @@ name "bit-rate"
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
mflops
-\begin_inset LatexCommand index
-name "complexity"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+complexity
+\end_layout
\end_inset
@@ -8479,21 +8917,21 @@ name "complexity"
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Quality/description
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
@@ -8502,7 +8940,7 @@ Quality/description
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
-
\end_layout
@@ -8511,7 +8949,7 @@ Quality/description
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
250
\end_layout
@@ -8520,7 +8958,7 @@ Quality/description
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
@@ -8529,18 +8967,18 @@ Quality/description
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
No transmission (DTX)
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
1
\end_layout
@@ -8549,7 +8987,7 @@ No transmission (DTX)
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
@@ -8558,7 +8996,7 @@ No transmission (DTX)
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
2,150
\end_layout
@@ -8567,7 +9005,7 @@ No transmission (DTX)
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
6
\end_layout
@@ -8576,18 +9014,18 @@ No transmission (DTX)
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Vocoder (mostly for comfort noise)
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
2
\end_layout
@@ -8596,7 +9034,7 @@ Vocoder (mostly for comfort noise)
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
2
\end_layout
@@ -8605,7 +9043,7 @@ Vocoder (mostly for comfort noise)
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
5,950
\end_layout
@@ -8614,7 +9052,7 @@ Vocoder (mostly for comfort noise)
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
9
\end_layout
@@ -8623,18 +9061,18 @@ Vocoder (mostly for comfort noise)
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Very noticeable artifacts/noise, good intelligibility
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
3
\end_layout
@@ -8643,7 +9081,7 @@ Very noticeable artifacts/noise, good intelligibility
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
3-4
\end_layout
@@ -8652,7 +9090,7 @@ Very noticeable artifacts/noise, good intelligibility
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
8,000
\end_layout
@@ -8661,7 +9099,7 @@ Very noticeable artifacts/noise, good intelligibility
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
10
\end_layout
@@ -8670,18 +9108,18 @@ Very noticeable artifacts/noise, good intelligibility
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Artifacts/noise sometimes noticeable
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
@@ -8690,7 +9128,7 @@ Artifacts/noise sometimes noticeable
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
5-6
\end_layout
@@ -8699,7 +9137,7 @@ Artifacts/noise sometimes noticeable
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
11,000
\end_layout
@@ -8708,7 +9146,7 @@ Artifacts/noise sometimes noticeable
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
14
\end_layout
@@ -8717,18 +9155,18 @@ Artifacts/noise sometimes noticeable
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Artifacts usually noticeable only with headphones
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
5
\end_layout
@@ -8737,7 +9175,7 @@ Artifacts usually noticeable only with headphones
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
7-8
\end_layout
@@ -8746,7 +9184,7 @@ Artifacts usually noticeable only with headphones
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
15,000
\end_layout
@@ -8755,7 +9193,7 @@ Artifacts usually noticeable only with headphones
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
11
\end_layout
@@ -8764,18 +9202,18 @@ Artifacts usually noticeable only with headphones
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Need good headphones to tell the difference
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
6
\end_layout
@@ -8784,7 +9222,7 @@ Need good headphones to tell the difference
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
9
\end_layout
@@ -8793,7 +9231,7 @@ Need good headphones to tell the difference
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
18,200
\end_layout
@@ -8802,7 +9240,7 @@ Need good headphones to tell the difference
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
17.5
\end_layout
@@ -8811,18 +9249,18 @@ Need good headphones to tell the difference
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Hard to tell the difference even with good headphones
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
7
\end_layout
@@ -8831,7 +9269,7 @@ Hard to tell the difference even with good headphones
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
10
\end_layout
@@ -8840,7 +9278,7 @@ Hard to tell the difference even with good headphones
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
24,600
\end_layout
@@ -8849,7 +9287,7 @@ Hard to tell the difference even with good headphones
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
14.5
\end_layout
@@ -8858,18 +9296,18 @@ Hard to tell the difference even with good headphones
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Completely transparent for voice, good quality music
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
8
\end_layout
@@ -8878,7 +9316,7 @@ Completely transparent for voice, good quality music
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
1
\end_layout
@@ -8887,7 +9325,7 @@ Completely transparent for voice, good quality music
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
3,950
\end_layout
@@ -8896,7 +9334,7 @@ Completely transparent for voice, good quality music
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
10.5
\end_layout
@@ -8905,18 +9343,18 @@ Completely transparent for voice, good quality music
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Very noticeable artifacts/noise, good intelligibility
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
9
\end_layout
@@ -8925,7 +9363,7 @@ Very noticeable artifacts/noise, good intelligibility
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
-
\end_layout
@@ -8934,7 +9372,7 @@ Very noticeable artifacts/noise, good intelligibility
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
-
\end_layout
@@ -8943,7 +9381,7 @@ Very noticeable artifacts/noise, good intelligibility
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
-
\end_layout
@@ -8952,18 +9390,18 @@ Very noticeable artifacts/noise, good intelligibility
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
reserved
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
10
\end_layout
@@ -8972,7 +9410,7 @@ reserved
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
-
\end_layout
@@ -8981,7 +9419,7 @@ reserved
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
-
\end_layout
@@ -8990,7 +9428,7 @@ reserved
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
-
\end_layout
@@ -8999,18 +9437,18 @@ reserved
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
reserved
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
11
\end_layout
@@ -9019,7 +9457,7 @@ reserved
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
-
\end_layout
@@ -9028,7 +9466,7 @@ reserved
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
-
\end_layout
@@ -9037,7 +9475,7 @@ reserved
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
-
\end_layout
@@ -9046,18 +9484,18 @@ reserved
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
reserved
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
12
\end_layout
@@ -9066,7 +9504,7 @@ reserved
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
-
\end_layout
@@ -9075,7 +9513,7 @@ reserved
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
-
\end_layout
@@ -9084,7 +9522,7 @@ reserved
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
-
\end_layout
@@ -9093,18 +9531,18 @@ reserved
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
reserved
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
13
\end_layout
@@ -9113,7 +9551,7 @@ reserved
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
-
\end_layout
@@ -9122,7 +9560,7 @@ reserved
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
-
\end_layout
@@ -9131,7 +9569,7 @@ reserved
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
-
\end_layout
@@ -9140,18 +9578,18 @@ reserved
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Application-defined, interpreted by callback or skipped
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
14
\end_layout
@@ -9160,7 +9598,7 @@ Application-defined, interpreted by callback or skipped
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
-
\end_layout
@@ -9169,7 +9607,7 @@ Application-defined, interpreted by callback or skipped
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
-
\end_layout
@@ -9178,7 +9616,7 @@ Application-defined, interpreted by callback or skipped
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
-
\end_layout
@@ -9187,54 +9625,54 @@ Application-defined, interpreted by callback or skipped
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Speex in-band signaling
\end_layout
\end_inset
</cell>
</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
15
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
-
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
-
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
-
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Terminator code
\end_layout
@@ -9249,7 +9687,7 @@ Terminator code
\begin_inset ERT
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
\backslash
@@ -9261,12 +9699,13 @@ end{center}
\end_layout
-\begin_layout Standard
+\begin_layout Plain Layout
\begin_inset Caption
-\begin_layout Standard
+\begin_layout Plain Layout
Quality versus bit-rate
-\begin_inset LatexCommand label
+\begin_inset CommandInset label
+LatexCommand label
name "cap:quality_vs_bps"
\end_inset
@@ -9286,8 +9725,12 @@ name "cap:quality_vs_bps"
\begin_layout Section
Perceptual enhancement
-\begin_inset LatexCommand index
-name "perceptual enhancement"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+perceptual enhancement
+\end_layout
\end_inset
@@ -9341,20 +9784,26 @@ where
\end_layout
\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
-\newpage
\end_layout
\begin_layout Chapter
Speex wideband mode (sub-band CELP)
-\begin_inset LatexCommand index
-name "wideband"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+wideband
+\end_layout
\end_inset
-\begin_inset LatexCommand label
+\begin_inset CommandInset label
+LatexCommand label
name "sec:Speex-wideband-mode"
\end_inset
@@ -9376,8 +9825,12 @@ irror
f
\emph default
ilter
-\begin_inset LatexCommand index
-name "quadrature mirror filter"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+quadrature mirror filter
+\end_layout
\end_inset
@@ -9385,7 +9838,8 @@ name "quadrature mirror filter"
The 16 kHz signal is thus divided into two 8 kHz signals, one representing
the low band (0-4 kHz), the other the high band (4-8 kHz).
The low band is encoded with the narrowband mode described in section
-\begin_inset LatexCommand ref
+\begin_inset CommandInset ref
+LatexCommand ref
reference "sec:Speex-narrowband-mode"
\end_inset
@@ -9448,14 +9902,16 @@ Bit allocation
For the wideband mode, the entire narrowband frame is packed before the
high-band is encoded.
The narrowband part of the bit-stream is as defined in table
-\begin_inset LatexCommand ref
+\begin_inset CommandInset ref
+LatexCommand ref
reference "cap:bits-narrowband"
\end_inset
.
The high-band follows, as described in table
-\begin_inset LatexCommand ref
+\begin_inset CommandInset ref
+LatexCommand ref
reference "cap:bits-wideband"
\end_inset
@@ -9463,7 +9919,8 @@ reference "cap:bits-wideband"
.
For wideband, the mode ID is the same as the Speex quality setting and
is defined in table
-\begin_inset LatexCommand ref
+\begin_inset CommandInset ref
+LatexCommand ref
reference "tab:wideband-quality"
\end_inset
@@ -9482,11 +9939,11 @@ wide true
sideways false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
\begin_inset ERT
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
\backslash
@@ -9499,83 +9956,83 @@ begin{center}
\begin_inset Tabular
<lyxtabular version="3" rows="7" columns="7">
<features>
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
Parameter
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Update rate
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
1
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
2
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
3
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Wideband bit
\end_layout
@@ -9584,7 +10041,7 @@ Wideband bit
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
frame
\end_layout
@@ -9593,7 +10050,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
1
\end_layout
@@ -9602,7 +10059,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
1
\end_layout
@@ -9611,7 +10068,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
1
\end_layout
@@ -9620,27 +10077,27 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
1
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
1
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Mode ID
\end_layout
@@ -9649,7 +10106,7 @@ Mode ID
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
frame
\end_layout
@@ -9658,7 +10115,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
3
\end_layout
@@ -9667,7 +10124,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
3
\end_layout
@@ -9676,7 +10133,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
3
\end_layout
@@ -9685,27 +10142,27 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
3
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
3
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
LSP
\end_layout
@@ -9714,7 +10171,7 @@ LSP
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
frame
\end_layout
@@ -9723,7 +10180,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
@@ -9732,7 +10189,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
12
\end_layout
@@ -9741,7 +10198,7 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
12
\end_layout
@@ -9750,27 +10207,27 @@ frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
12
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
12
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Excitation gain
\end_layout
@@ -9779,7 +10236,7 @@ Excitation gain
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
sub-frame
\end_layout
@@ -9788,7 +10245,7 @@ sub-frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
@@ -9797,7 +10254,7 @@ sub-frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
5
\end_layout
@@ -9806,7 +10263,7 @@ sub-frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
@@ -9815,146 +10272,146 @@ sub-frame
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
\end_inset
</cell>
</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Excitation VQ
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
sub-frame
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
20
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
40
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
80
\end_layout
\end_inset
</cell>
</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Total
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
frame
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
36
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
112
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
192
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
352
\end_layout
@@ -9969,7 +10426,7 @@ frame
\begin_inset ERT
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
\backslash
@@ -9981,12 +10438,13 @@ end{center}
\end_layout
-\begin_layout Standard
+\begin_layout Plain Layout
\begin_inset Caption
-\begin_layout Standard
+\begin_layout Plain Layout
Bit allocation for high-band in wideband mode
-\begin_inset LatexCommand label
+\begin_inset CommandInset label
+LatexCommand label
name "cap:bits-wideband"
\end_inset
@@ -10011,11 +10469,11 @@ wide true
sideways false
status open
-\begin_layout Standard
+\begin_layout Plain Layout
\begin_inset ERT
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
\backslash
@@ -10028,26 +10486,30 @@ begin{center}
\begin_inset Tabular
<lyxtabular version="3" rows="12" columns="3">
<features>
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Mode/Quality
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Bit-rate
-\begin_inset LatexCommand index
-name "bit-rate"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+bit-rate
+\end_layout
\end_inset
@@ -10056,21 +10518,21 @@ name "bit-rate"
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Quality/description
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
0
\end_layout
@@ -10079,7 +10541,7 @@ Quality/description
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
3,950
\end_layout
@@ -10088,18 +10550,18 @@ Quality/description
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Barely intelligible (mostly for comfort noise)
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
1
\end_layout
@@ -10108,27 +10570,27 @@ Barely intelligible (mostly for comfort noise)
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
5,750
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Very noticeable artifacts/noise, poor intelligibility
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
2
\end_layout
@@ -10137,7 +10599,7 @@ Very noticeable artifacts/noise, poor intelligibility
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
7,750
\end_layout
@@ -10146,18 +10608,18 @@ Very noticeable artifacts/noise, poor intelligibility
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Very noticeable artifacts/noise, good intelligibility
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
3
\end_layout
@@ -10166,7 +10628,7 @@ Very noticeable artifacts/noise, good intelligibility
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
9,800
\end_layout
@@ -10175,18 +10637,18 @@ Very noticeable artifacts/noise, good intelligibility
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Artifacts/noise sometimes annoying
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
4
\end_layout
@@ -10195,7 +10657,7 @@ Artifacts/noise sometimes annoying
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
12,800
\end_layout
@@ -10204,18 +10666,18 @@ Artifacts/noise sometimes annoying
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Artifacts/noise usually noticeable
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
5
\end_layout
@@ -10224,7 +10686,7 @@ Artifacts/noise usually noticeable
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
16,800
\end_layout
@@ -10233,18 +10695,18 @@ Artifacts/noise usually noticeable
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Artifacts/noise sometimes noticeable
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
6
\end_layout
@@ -10253,7 +10715,7 @@ Artifacts/noise sometimes noticeable
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
20,600
\end_layout
@@ -10262,18 +10724,18 @@ Artifacts/noise sometimes noticeable
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Need good headphones to tell the difference
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
7
\end_layout
@@ -10282,7 +10744,7 @@ Need good headphones to tell the difference
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
23,800
\end_layout
@@ -10291,18 +10753,18 @@ Need good headphones to tell the difference
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Need good headphones to tell the difference
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
8
\end_layout
@@ -10311,7 +10773,7 @@ Need good headphones to tell the difference
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
27,800
\end_layout
@@ -10320,18 +10782,18 @@ Need good headphones to tell the difference
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Hard to tell the difference even with good headphones
\end_layout
\end_inset
</cell>
</row>
-<row topline="true">
+<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
9
\end_layout
@@ -10340,7 +10802,7 @@ Hard to tell the difference even with good headphones
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
34,200
\end_layout
@@ -10349,36 +10811,36 @@ Hard to tell the difference even with good headphones
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Hard to tell the difference even with good headphones
\end_layout
\end_inset
</cell>
</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
10
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
42,200
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
+\begin_layout Plain Layout
Completely transparent for voice, good quality music
\end_layout
@@ -10393,7 +10855,7 @@ Completely transparent for voice, good quality music
\begin_inset ERT
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
\backslash
@@ -10405,12 +10867,13 @@ end{center}
\end_layout
-\begin_layout Standard
+\begin_layout Plain Layout
\begin_inset Caption
-\begin_layout Standard
+\begin_layout Plain Layout
Quality versus bit-rate for the wideband encoder
-\begin_inset LatexCommand label
+\begin_inset CommandInset label
+LatexCommand label
name "tab:wideband-quality"
\end_inset
@@ -10432,7 +10895,7 @@ name "tab:wideband-quality"
\begin_inset ERT
status open
-\begin_layout Standard
+\begin_layout Plain Layout
\backslash
@@ -10448,7 +10911,7 @@ clearpage
\begin_inset ERT
status collapsed
-\begin_layout Standard
+\begin_layout Plain Layout
\backslash
@@ -10463,7 +10926,8 @@ clearpage
\begin_layout Chapter
\start_of_appendix
Sample code
-\begin_inset LatexCommand label
+\begin_inset CommandInset label
+LatexCommand label
name "sec:Sample-code"
\end_inset
@@ -10477,11 +10941,15 @@ This section shows sample code for encoding and decoding speech using the
The commands can be used to encode and decode a file by calling:
\family typewriter
-\newline
+\begin_inset Newline newline
+\end_inset
+
% sampleenc in_file.sw | sampledec out_file.sw
\family default
-\newline
+\begin_inset Newline newline
+\end_inset
+
where both files are raw (no header) files encoded at 16 bits per sample
(in the machine natural endianness).
\end_layout
@@ -10501,8 +10969,10 @@ not
\end_layout
\begin_layout Standard
-\begin_inset Include \lstinputlisting{sampleenc.c}[caption={Source code for sampleenc},label={sampleenc-source-code},numbers=left,numberstyle={\footnotesize}]
-preview false
+\begin_inset CommandInset include
+LatexCommand lstinputlisting
+filename "sampleenc.c"
+lstparams "caption={Source code for sampleenc},label={sampleenc-source-code},numbers=left,numberstyle={\\footnotesize}"
\end_inset
@@ -10524,8 +10994,10 @@ not
\end_layout
\begin_layout Standard
-\begin_inset Include \lstinputlisting{sampledec.c}[caption={Source code for sampledec},label={sampledec-source-code},numbers=left,numberstyle={\footnotesize}]
-preview false
+\begin_inset CommandInset include
+LatexCommand lstinputlisting
+filename "sampledec.c"
+lstparams "caption={Source code for sampledec},label={sampledec-source-code},numbers=left,numberstyle={\\footnotesize}"
\end_inset
@@ -10533,8 +11005,9 @@ preview false
\end_layout
\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
-\newpage
\end_layout
@@ -10543,8 +11016,10 @@ Jitter Buffer for Speex
\end_layout
\begin_layout Standard
-\begin_inset Include \lstinputlisting{../speexclient/speex_jitter_buffer.c}[caption={Example of using the jitter buffer for Speex packets},label={example-speex-jitter},numbers=left,numberstyle={\footnotesize}]
-preview false
+\begin_inset CommandInset include
+LatexCommand lstinputlisting
+filename "../speexclient/speex_jitter_buffer.c"
+lstparams "caption={Example of using the jitter buffer for Speex packets},label={example-speex-jitter},numbers=left,numberstyle={\\footnotesize}"
\end_inset
@@ -10552,14 +11027,16 @@ preview false
\end_layout
\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
-\newpage
\end_layout
\begin_layout Chapter
IETF RTP Profile
-\begin_inset LatexCommand label
+\begin_inset CommandInset label
+LatexCommand label
name "sec:IETF-draft"
\end_inset
@@ -10568,8 +11045,9 @@ name "sec:IETF-draft"
\end_layout
\begin_layout Standard
-\begin_inset Include \verbatiminput{draft-ietf-avt-rtp-speex-01-tmp.txt}
-preview false
+\begin_inset CommandInset include
+LatexCommand verbatiminput
+filename "draft-ietf-avt-rtp-speex-01-tmp.txt"
\end_inset
@@ -10577,14 +11055,16 @@ preview false
\end_layout
\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
-\newpage
\end_layout
\begin_layout Chapter
Speex License
-\begin_inset LatexCommand label
+\begin_inset CommandInset label
+LatexCommand label
name "sec:Speex-License"
\end_inset
@@ -10593,8 +11073,9 @@ name "sec:Speex-License"
\end_layout
\begin_layout Standard
-\begin_inset Include \verbatiminput{../COPYING}
-preview false
+\begin_inset CommandInset include
+LatexCommand verbatiminput
+filename "../COPYING"
\end_inset
@@ -10602,8 +11083,9 @@ preview false
\end_layout
\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
-\newpage
\end_layout
@@ -11096,7 +11578,8 @@ n.
\end_layout
\begin_layout Standard
-\begin_inset LatexCommand printindex
+\begin_inset CommandInset index_print
+LatexCommand printindex
\end_inset