Debian Codegraph @

3rdparty/iaxclient/lib/libspeex/cb_search.h

raw symbols SCIP
1 /* Copyright (C) 2002 Jean-Marc Valin & David Rowe
2 File: cb_search.h
3 Overlapped codebook search
4
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions
7 are met:
8
9 - Redistributions of source code must retain the above copyright
10 notice, this list of conditions and the following disclaimer.
11
12 - Redistributions in binary form must reproduce the above copyright
13 notice, this list of conditions and the following disclaimer in the
14 documentation and/or other materials provided with the distribution.
15
16 - Neither the name of the Xiph.org Foundation nor the names of its
17 contributors may be used to endorse or promote products derived from
18 this software without specific prior written permission.
19
20 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
24 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33 #ifndef CB_SEARCH_H
34 #define CB_SEARCH_H
35
36 #include <speex/speex_bits.h>
37 #include "misc.h"
38
39 typedef struct split_cb_params {
40 int subvect_size;
41 int nb_subvect;
42 const signed char *shape_cb;
43 int shape_bits;
44 int have_sign;
45 } split_cb_params;
46
47
48 void split_cb_search_shape_sign(
49 spx_sig_t target[], /* target vector */
50 spx_coef_t ak[], /* LPCs for this subframe */
51 spx_coef_t awk1[], /* Weighted LPCs for this subframe */
52 spx_coef_t awk2[], /* Weighted LPCs for this subframe */
53 const void *par, /* Codebook/search parameters*/
54 int p, /* number of LPC coeffs */
55 int nsf, /* number of samples in subframe */
56 spx_sig_t *exc,
57 spx_word16_t *r,
58 SpeexBits *bits,
59 char *stack,
60 int complexity,
61 int update_target
62 );
63
64 void split_cb_shape_sign_unquant(
65 spx_sig_t *exc,
66 const void *par, /* non-overlapping codebook */
67 int nsf, /* number of samples in subframe */
68 SpeexBits *bits,
69 char *stack
70 );
71
72
73 void noise_codebook_quant(
74 spx_sig_t target[], /* target vector */
75 spx_coef_t ak[], /* LPCs for this subframe */
76 spx_coef_t awk1[], /* Weighted LPCs for this subframe */
77 spx_coef_t awk2[], /* Weighted LPCs for this subframe */
78 const void *par, /* Codebook/search parameters*/
79 int p, /* number of LPC coeffs */
80 int nsf, /* number of samples in subframe */
81 spx_sig_t *exc,
82 spx_word16_t *r,
83 SpeexBits *bits,
84 char *stack,
85 int complexity,
86 int update_target
87 );
88
89
90 void noise_codebook_unquant(
91 spx_sig_t *exc,
92 const void *par, /* non-overlapping codebook */
93 int nsf, /* number of samples in subframe */
94 SpeexBits *bits,
95 char *stack
96 );
97
98 #endif