diff --git a/doc/ietf/draft-valin-celt-codec.xml b/doc/ietf/draft-valin-celt-codec.xml index ec78d5ef..92c3477a 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:
-Insert encoder overview + The top-level function for encoding a CELT frame in the reference implementation is celt_encode() (celt.c). + + + +The CELT codec does not use a standard bit-packer, +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: + + + + +Feature flags (2-4 bits) +if P=1 + + Pitch period + +if S=1 + + Transient scalefactor + if scalefactor=(1 or 2) AND more than 2 short MDCTs + + ID of block before transient + + if scalefactor=3 + + Transient time + + +Coarse energy encoding (for each band) +Fine energy encoding (for each band) +For each band + + if P=1 and band is at the beginning of a pitch band + + Pitch gain bit + + PVQ indices + +More fine energy (using all remaining bits) + + + +