Main Page | Class List | Directories | File List | Class Members | File Members

cb_search.h

Go to the documentation of this file.
00001 /* Copyright (C) 2002 Jean-Marc Valin & David Rowe
00002    File: cb_search.h
00003    Overlapped codebook search
00004 
00005    Redistribution and use in source and binary forms, with or without
00006    modification, are permitted provided that the following conditions
00007    are met:
00008    
00009    - Redistributions of source code must retain the above copyright
00010    notice, this list of conditions and the following disclaimer.
00011    
00012    - Redistributions in binary form must reproduce the above copyright
00013    notice, this list of conditions and the following disclaimer in the
00014    documentation and/or other materials provided with the distribution.
00015    
00016    - Neither the name of the Xiph.org Foundation nor the names of its
00017    contributors may be used to endorse or promote products derived from
00018    this software without specific prior written permission.
00019    
00020    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00021    ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00022    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
00023    A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR
00024    CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00025    EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00026    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00027    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
00028    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00029    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00030    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00031 */
00032 
00033 #ifndef CB_SEARCH_H
00034 #define CB_SEARCH_H
00035 
00036 #include <speex/speex_bits.h>
00037 #include "misc.h"
00038 
00039 typedef struct split_cb_params {
00040    int     subvect_size;
00041    int     nb_subvect;
00042    const signed char  *shape_cb;
00043    int     shape_bits;
00044    int     have_sign;
00045 } split_cb_params;
00046 
00047 
00048 void split_cb_search_shape_sign(
00049 spx_sig_t target[],                     /* target vector */
00050 spx_coef_t ak[],                        /* LPCs for this subframe */
00051 spx_coef_t awk1[],                      /* Weighted LPCs for this subframe */
00052 spx_coef_t awk2[],                      /* Weighted LPCs for this subframe */
00053 const void *par,                      /* Codebook/search parameters*/
00054 int   p,                        /* number of LPC coeffs */
00055 int   nsf,                      /* number of samples in subframe */
00056 spx_sig_t *exc,
00057 spx_sig_t *r,
00058 SpeexBits *bits,
00059 char *stack,
00060 int   complexity
00061 );
00062 
00063 void split_cb_shape_sign_unquant(
00064 spx_sig_t *exc,
00065 const void *par,                      /* non-overlapping codebook */
00066 int   nsf,                      /* number of samples in subframe */
00067 SpeexBits *bits,
00068 char *stack
00069 );
00070 
00071 
00072 void noise_codebook_quant(
00073 spx_sig_t target[],                     /* target vector */
00074 spx_coef_t ak[],                        /* LPCs for this subframe */
00075 spx_coef_t awk1[],                      /* Weighted LPCs for this subframe */
00076 spx_coef_t awk2[],                      /* Weighted LPCs for this subframe */
00077 const void *par,                      /* Codebook/search parameters*/
00078 int   p,                        /* number of LPC coeffs */
00079 int   nsf,                      /* number of samples in subframe */
00080 spx_sig_t *exc,
00081 spx_sig_t *r,
00082 SpeexBits *bits,
00083 char *stack,
00084 int   complexity
00085 );
00086 
00087 
00088 void noise_codebook_unquant(
00089 spx_sig_t *exc,
00090 const void *par,                      /* non-overlapping codebook */
00091 int   nsf,                      /* number of samples in subframe */
00092 SpeexBits *bits,
00093 char *stack
00094 );
00095 
00096 #endif

Generated on Sun Feb 27 16:36:11 2005 for speex by  doxygen 1.4.1