~ubuntu-branches/ubuntu/vivid/linphone/vivid

« back to all changes in this revision

Viewing changes to speex/libspeex/cb_search.h

  • Committer: Bazaar Package Importer
  • Author(s): Samuel Mimram
  • Date: 2006-11-15 10:34:50 UTC
  • mfrom: (1.2.1 upstream) (2.1.8 feisty)
  • Revision ID: james.westby@ubuntu.com-20061115103450-qgafwcks2lkhctlj
* New upstream release.
* Enable video support.
* Fix mismatched #endif in mscommon.h, closes: #398307.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 2002 Jean-Marc Valin & David Rowe
2
 
   File: cb_search.c
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_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_sig_t *r,
58
 
SpeexBits *bits,
59
 
char *stack,
60
 
int   complexity
61
 
);
62
 
 
63
 
void split_cb_shape_sign_unquant(
64
 
spx_sig_t *exc,
65
 
const void *par,                      /* non-overlapping codebook */
66
 
int   nsf,                      /* number of samples in subframe */
67
 
SpeexBits *bits,
68
 
char *stack
69
 
);
70
 
 
71
 
 
72
 
void noise_codebook_quant(
73
 
spx_sig_t target[],                     /* target vector */
74
 
spx_coef_t ak[],                        /* LPCs for this subframe */
75
 
spx_coef_t awk1[],                      /* Weighted LPCs for this subframe */
76
 
spx_coef_t awk2[],                      /* Weighted LPCs for this subframe */
77
 
const void *par,                      /* Codebook/search parameters*/
78
 
int   p,                        /* number of LPC coeffs */
79
 
int   nsf,                      /* number of samples in subframe */
80
 
spx_sig_t *exc,
81
 
spx_sig_t *r,
82
 
SpeexBits *bits,
83
 
char *stack,
84
 
int   complexity
85
 
);
86
 
 
87
 
 
88
 
void noise_codebook_unquant(
89
 
spx_sig_t *exc,
90
 
const void *par,                      /* non-overlapping codebook */
91
 
int   nsf,                      /* number of samples in subframe */
92
 
SpeexBits *bits,
93
 
char *stack
94
 
);
95
 
 
96
 
#endif