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

gitlab.com/quite/celt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJean-Marc Valin <jean-marc.valin@octasic.com>2009-06-12 19:49:28 +0400
committerJean-Marc Valin <jean-marc.valin@octasic.com>2009-06-12 19:49:28 +0400
commit59f676875013a6ffbcb02fb7f4421145ccbfc98a (patch)
tree3669b773599145146892c0d93ca1e74891a64040 /doc
parentf1b5006d8c0b4fc1c136bb485d8ae3b100f69dc3 (diff)
ietf doc: better description of the bitstream
Diffstat (limited to 'doc')
-rw-r--r--doc/ietf/draft-valin-celt-codec.xml59
1 files changed, 58 insertions, 1 deletions
diff --git a/doc/ietf/draft-valin-celt-codec.xml b/doc/ietf/draft-valin-celt-codec.xml
index ec78d5e..92c3477 100644
--- a/doc/ietf/draft-valin-celt-codec.xml
+++ b/doc/ietf/draft-valin-celt-codec.xml
@@ -162,12 +162,68 @@ mode data. This data includes:
<section anchor="CELT Encoder" title="CELT Encoder">
-<t>Insert encoder overview</t>
+<!--Insert encoder overview-->
<t>The top-level function for encoding a CELT frame in the reference implementation is
celt_encode() (<xref target="celt.c">celt.c</xref>).
</t>
+<!--
+<texttable anchor="bitstream">
+ <ttcol align='center'>Parameter(s)</ttcol>
+ <ttcol align='center'>Condition</ttcol>
+ <ttcol align='center'>Synbol(s)</ttcol>
+ <c>Feature flags</c><c>Always</c><c>2-4 bits</c>
+ <c>Pitch period</c><c>P=1</c><c>1 Integer (8-9 bits)</c>
+ <c>Transient scalefactor</c><c>S=1</c><c>2 bits</c>
+ <c>Coarse energy</c><c>Always</c><c>one symbol per band</c>
+ <c>Fine energy</c><c>Always</c><c>one symbol per band</c>
+ <c>PVQ indices</c><c>Always</c><c>one symbol per band</c>
+ <c>Remaining fine energy</c><c>bits available</c><c>one bit per band</c>
+</texttable>
+-->
+
+<t>
+The CELT codec does not use a standard <spanx style="emph">bit-packer</spanx>,
+but rather uses a range coder to pack both integers and entropy-coded symbols.
+The bit-stream generated by the encoder contains (in the same order) the
+following symbols:
+</t>
+
+<t>
+<list style="symbols">
+<t>Feature flags (2-4 bits)</t>
+<t>if P=1
+ <list style="symbols">
+ <t>Pitch period</t>
+ </list></t>
+<t>if S=1
+ <list style="symbols">
+ <t>Transient scalefactor</t>
+ <t>if scalefactor=(1 or 2) AND more than 2 short MDCTs
+ <list style="symbols">
+ <t>ID of block before transient</t>
+ </list></t>
+ <t>if scalefactor=3
+ <list style="symbols">
+ <t>Transient time</t>
+ </list></t>
+ </list></t>
+<t>Coarse energy encoding (for each band)</t>
+<t>Fine energy encoding (for each band)</t>
+<t>For each band
+ <list style="symbols">
+ <t>if P=1 and band is at the beginning of a pitch band
+ <list>
+ <t>Pitch gain bit</t>
+ </list></t>
+ <t>PVQ indices</t>
+ </list></t>
+<t>More fine energy (using all remaining bits)</t>
+</list>
+</t>
+
+<!--
<figure>
<artwork>
+-----------------+---------------------+------------------------------+
@@ -180,6 +236,7 @@ celt_encode() (<xref target="celt.c">celt.c</xref>).
</artwork>
<postamble>Fields within parentheses are not included in every packet</postamble>
</figure>
+-->
<section anchor="pre-emphasis" title="Pre-emphasis">