spreproc.h revision b841f14f8e51f2365945281fbfa54ef6a1b1b5a6
1/* ------------------------------------------------------------------
2 * Copyright (C) 1998-2009 PacketVideo
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13 * express or implied.
14 * See the License for the specific language governing permissions
15 * and limitations under the License.
16 * -------------------------------------------------------------------
17 */
18/****************************************************************************************
19Portions of this file are derived from the following 3GPP standard:
20
21    3GPP TS 26.073
22    ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
23    Available from http://www.3gpp.org
24
25(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
26Permission to distribute, modify and use this file under the standard license
27terms listed above has been obtained from the copyright holder.
28****************************************************************************************/
29/*
30------------------------------------------------------------------------------
31
32
33
34 Filename: /audio/gsm_amr/c/include/spreproc.h
35
36     Date: 02/06/2002
37
38------------------------------------------------------------------------------
39 REVISION HISTORY
40
41 Description: Placed header file in the proper template format.
42
43 Description:  Replaced "int" and/or "char" with OSCL defined types.
44
45 Description: Moved _cplusplus #ifdef after Include section.
46
47 Description:
48
49------------------------------------------------------------------------------
50 INCLUDE DESCRIPTION
51
52 This file contains all the constant definitions and prototype definitions
53 needed by the file, spreproc.c
54
55------------------------------------------------------------------------------
56*/
57
58/*----------------------------------------------------------------------------
59; CONTINUE ONLY IF NOT ALREADY DEFINED
60----------------------------------------------------------------------------*/
61#ifndef spreproc_h
62#define spreproc_h "$Id $"
63
64/*----------------------------------------------------------------------------
65; INCLUDES
66----------------------------------------------------------------------------*/
67#include "cnst.h"
68#include "mode.h"
69#include "typedef.h"
70
71/*--------------------------------------------------------------------------*/
72#ifdef __cplusplus
73extern "C"
74{
75#endif
76
77    /*----------------------------------------------------------------------------
78    ; MACROS
79    ; Define module specific macros here
80    ----------------------------------------------------------------------------*/
81
82    /*----------------------------------------------------------------------------
83    ; DEFINES
84    ; Include all pre-processor statements here.
85    ----------------------------------------------------------------------------*/
86
87    /*----------------------------------------------------------------------------
88    ; EXTERNAL VARIABLES REFERENCES
89    ; Declare variables used in this module but defined elsewhere
90    ----------------------------------------------------------------------------*/
91
92    /*----------------------------------------------------------------------------
93    ; SIMPLE TYPEDEF'S
94    ----------------------------------------------------------------------------*/
95
96    /*----------------------------------------------------------------------------
97    ; ENUMERATED TYPEDEF'S
98    ----------------------------------------------------------------------------*/
99
100    /*----------------------------------------------------------------------------
101    ; STRUCTURES TYPEDEF'S
102    ----------------------------------------------------------------------------*/
103
104    /*----------------------------------------------------------------------------
105    ; GLOBAL FUNCTION DEFINITIONS
106    ; Function Prototype declaration
107    ----------------------------------------------------------------------------*/
108    void subframePreProc(
109        enum Mode mode,            /* i  : coder mode                            */
110        const Word16 gamma1[],     /* i  : spectral exp. factor 1                */
111        const Word16 gamma1_12k2[],/* i  : spectral exp. factor 1 for EFR        */
112        const Word16 gamma2[],     /* i  : spectral exp. factor 2                */
113        Word16 *A,                 /* i  : A(z) unquantized for the 4 subframes  */
114        Word16 *Aq,                /* i  : A(z)   quantized for the 4 subframes  */
115        Word16 *speech,            /* i  : speech segment                        */
116        Word16 *mem_err,           /* i  : pointer to error signal               */
117        Word16 *mem_w0,            /* i  : memory of weighting filter            */
118        Word16 *zero,              /* i  : pointer to zero vector                */
119        Word16 ai_zero[],          /* o  : history of weighted synth. filter     */
120        Word16 exc[],              /* o  : long term prediction residual         */
121        Word16 h1[],               /* o  : impulse response                      */
122        Word16 xn[],               /* o  : target vector for pitch search        */
123        Word16 res2[],             /* o  : long term prediction residual         */
124        Word16 error[]             /* o  : error of LPC synthesis filter         */
125    );
126
127    /*----------------------------------------------------------------------------
128    ; END
129    ----------------------------------------------------------------------------*/
130#ifdef __cplusplus
131}
132#endif
133
134#endif /* spreproc_h */
135
136