Commit b469e601 authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

cwrs documentation

parent 24c25a23
...@@ -370,7 +370,14 @@ The search is performed by alg_quant() (<xref target="vq.c">vq.c</xref>). ...@@ -370,7 +370,14 @@ The search is performed by alg_quant() (<xref target="vq.c">vq.c</xref>).
<section anchor="Index Encoding" title="Index Encoding"> <section anchor="Index Encoding" title="Index Encoding">
<t> <t>
Derf?? The index is encoded by encode_pulses() (<xref target="cwrs.c">cwrs.c</xref>). The best PVQ codeword is encoded by encode_pulses() (<xref target="cwrs.c">cwrs.c</xref>).
The codeword is converted to a unique index in the same way as specified in
<xref target="PVQ"></xref>. The indexing is based on the calculation of V(N,K) (denoted N(L,K) in <xref target="PVQ"></xref>), which is the number of possible combinations of K pulses
in N samples. The number of combinations can be computed recursively as
V(N,K) = V(N+1,K) + V(N,K+1) + V(N+1,K+1), with V(N,0) = 1 and V(0,K) = 0 for K != 0.
There are many different ways to compute V(N,K), including pre-compute tables and direct
use of the recursive formulation. The reference implementation applies the recursive
formulation one line (or column) at a time to save on memory use.
</t> </t>
</section> </section>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment