ietf doc: better description of the bitstream
This commit is contained in:
parent
f1b5006d8c
commit
59f6768750
1 changed files with 58 additions and 1 deletions
|
@ -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">
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue