q_pulse.h revision 5d5c3a132bb446ac78a37dfaac24a46cacf0dd73
1
2/*
3 ** Copyright 2003-2010, VisualOn, Inc.
4 **
5 ** Licensed under the Apache License, Version 2.0 (the "License");
6 ** you may not use this file except in compliance with the License.
7 ** You may obtain a copy of the License at
8 **
9 **     http://www.apache.org/licenses/LICENSE-2.0
10 **
11 ** Unless required by applicable law or agreed to in writing, software
12 ** distributed under the License is distributed on an "AS IS" BASIS,
13 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 ** See the License for the specific language governing permissions and
15 ** limitations under the License.
16 */
17
18
19/*--------------------------------------------------------------------------*
20 *                         Q_PULSE.H                                        *
21 *--------------------------------------------------------------------------*
22 * Coding and decoding of algebraic codebook                        *
23 *--------------------------------------------------------------------------*/
24
25#ifndef  __Q_PULSE_H__
26#define  __Q_PULSE_H__
27
28#include "typedef.h"
29
30Word32 quant_1p_N1(                        /* (o) return (N+1) bits           */
31        Word16 pos,                           /* (i) position of the pulse       */
32        Word16 N);                            /* (i) number of bits for position */
33
34Word32 quant_2p_2N1(                       /* (o) return (2*N)+1 bits         */
35        Word16 pos1,                          /* (i) position of the pulse 1     */
36        Word16 pos2,                          /* (i) position of the pulse 2     */
37        Word16 N);                            /* (i) number of bits for position */
38
39Word32 quant_3p_3N1(                       /* (o) return (3*N)+1 bits         */
40        Word16 pos1,                          /* (i) position of the pulse 1     */
41        Word16 pos2,                          /* (i) position of the pulse 2     */
42        Word16 pos3,                          /* (i) position of the pulse 3     */
43        Word16 N);                            /* (i) number of bits for position */
44
45Word32 quant_4p_4N1(                       /* (o) return (4*N)+1 bits         */
46        Word16 pos1,                          /* (i) position of the pulse 1     */
47        Word16 pos2,                          /* (i) position of the pulse 2     */
48        Word16 pos3,                          /* (i) position of the pulse 3     */
49        Word16 pos4,                          /* (i) position of the pulse 4     */
50        Word16 N);                            /* (i) number of bits for position */
51
52Word32 quant_4p_4N(                        /* (o) return 4*N bits             */
53        Word16 pos[],                         /* (i) position of the pulse 1..4  */
54        Word16 N);                            /* (i) number of bits for position */
55
56Word32 quant_5p_5N(                        /* (o) return 5*N bits             */
57        Word16 pos[],                         /* (i) position of the pulse 1..5  */
58        Word16 N);                            /* (i) number of bits for position */
59
60Word32 quant_6p_6N_2(                      /* (o) return (6*N)-2 bits         */
61        Word16 pos[],                         /* (i) position of the pulse 1..6  */
62        Word16 N);                            /* (i) number of bits for position */
63
64
65#endif //__Q_PULSE_H__
66
67