• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 /*
19 
20  Pathname: s_TNSfilt.h
21 
22 ------------------------------------------------------------------------------
23  REVISION HISTORY
24 
25  Description: Added lpc, start, & size, so the data from
26  tns_inv_subblock can be shared with tns_decode_subblock.
27 
28  Description: Removed lpc to save 2KB of memory (on 32-bit machines.)
29  This change requires tns_decode_coef.c to perform calculations in place.
30 
31  Description: Removed start & size.  start_band and stop_band can simply
32  take on a new meaning after this function.  (coef index, rather than
33  scalefactor band index.)
34 
35  Description: Had to add "start_coef" and "stop_coef" in order to preserve
36  values "start_band" and "stop_band."  This required a change to
37  tns_setup_filter.c also.
38 
39  Description: Had to add element "q_lpc" to store the q-format of the lpc
40  coefficients passed via "coef."
41 
42  Description: Moved lpc_coef array up to the s_TNS_frame_info.h structure.
43 
44  Description:
45  (1) Modified to include the lines...
46 
47     #ifdef __cplusplus
48     extern "C" {
49     #endif
50 
51     #ifdef __cplusplus
52     }
53     #endif
54 
55  (2) Updated the copyright header.
56 
57  Who:                       Date:
58  Description:
59 ------------------------------------------------------------------------------
60  INCLUDE DESCRIPTION
61 
62  This include file defines the structure, s_TNSfilt
63 
64 ------------------------------------------------------------------------------
65 */
66 
67 /*----------------------------------------------------------------------------
68 ; CONTINUE ONLY IF NOT ALREADY DEFINED
69 ----------------------------------------------------------------------------*/
70 #ifndef S_TNSFILT_H
71 #define S_TNSFILT_H
72 
73 #ifdef __cplusplus
74 extern "C"
75 {
76 #endif
77 
78     /*----------------------------------------------------------------------------
79     ; INCLUDES
80     ----------------------------------------------------------------------------*/
81 #include "pv_audio_type_defs.h"
82 #include "e_tns_const.h"
83 
84     /*----------------------------------------------------------------------------
85     ; MACROS
86     ; Define module specific macros here
87     ----------------------------------------------------------------------------*/
88 
89     /*----------------------------------------------------------------------------
90     ; DEFINES
91     ; Include all pre-processor statements here.
92     ----------------------------------------------------------------------------*/
93 
94     /*----------------------------------------------------------------------------
95     ; EXTERNAL VARIABLES REFERENCES
96     ; Declare variables used in this module but defined elsewhere
97     ----------------------------------------------------------------------------*/
98 
99     /*----------------------------------------------------------------------------
100     ; SIMPLE TYPEDEF'S
101     ----------------------------------------------------------------------------*/
102 
103     /*----------------------------------------------------------------------------
104     ; ENUMERATED TYPEDEF'S
105     ----------------------------------------------------------------------------*/
106 
107     /*----------------------------------------------------------------------------
108     ; STRUCTURES TYPEDEF'S
109     ----------------------------------------------------------------------------*/
110 
111     typedef struct
112     {
113         Int start_band;
114         Int stop_band;
115         Int start_coef;
116         Int stop_coef;
117         UInt order;
118         Int direction;
119         Int q_lpc;
120 
121     } TNSfilt;
122 
123     /*----------------------------------------------------------------------------
124     ; GLOBAL FUNCTION DEFINITIONS
125     ; Function Prototype declaration
126     ----------------------------------------------------------------------------*/
127 
128 #ifdef __cplusplus
129 }
130 #endif
131 
132 #endif /* S_TNSFILT_H */
133