• 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_TNS_frame_info.h
21 
22 ------------------------------------------------------------------------------
23  REVISION HISTORY
24 
25  Description: Modified to eliminate triple-nested structure, which wasted
26  2 KB of memory.
27 
28  Description:
29  (1) Modified to include the lines...
30 
31     #ifdef __cplusplus
32     extern "C" {
33     #endif
34 
35     #ifdef __cplusplus
36     }
37     #endif
38 
39  (2) Updated the copyright header.
40 
41  Description:
42  (1) Changed hard coded size of arrays from "8" to "TNS_MAX_WIN"
43  (2) Moved elements from s_TNSinfo.h up to the level of TNS_frame_info
44  (3) Added Bool "tns_data_present" for future use.
45  (4) Moved lpc_coef up from s_TNSfilt.h (allowed for use of smaller array.)
46 
47  Description:
48  (1) Removed the array "coef_res", which is now a local variable on the
49  stack inside get_tns.c
50 
51  Who:                       Date:
52  Description:
53 
54 ------------------------------------------------------------------------------
55  INCLUDE DESCRIPTION
56 
57  This include file defines the structure, s_TNS_frame_info
58 
59 ------------------------------------------------------------------------------
60 */
61 
62 /*----------------------------------------------------------------------------
63 ; CONTINUE ONLY IF NOT ALREADY DEFINED
64 ----------------------------------------------------------------------------*/
65 #ifndef S_TNS_FRAME_INFO_H
66 #define S_TNS_FRAME_INFO_H
67 
68 #ifdef __cplusplus
69 extern "C"
70 {
71 #endif
72 
73     /*----------------------------------------------------------------------------
74     ; INCLUDES
75     ----------------------------------------------------------------------------*/
76 #include "pv_audio_type_defs.h"
77 #include "e_tns_const.h"
78 #include "s_tnsfilt.h"
79 
80     /*----------------------------------------------------------------------------
81     ; MACROS
82     ; Define module specific macros here
83     ----------------------------------------------------------------------------*/
84 
85     /*----------------------------------------------------------------------------
86     ; DEFINES
87     ; Include all pre-processor statements here.
88     ----------------------------------------------------------------------------*/
89 
90     /*----------------------------------------------------------------------------
91     ; EXTERNAL VARIABLES REFERENCES
92     ; Declare variables used in this module but defined elsewhere
93     ----------------------------------------------------------------------------*/
94 
95     /*----------------------------------------------------------------------------
96     ; SIMPLE TYPEDEF'S
97     ----------------------------------------------------------------------------*/
98 
99     /*----------------------------------------------------------------------------
100     ; ENUMERATED TYPEDEF'S
101     ----------------------------------------------------------------------------*/
102 
103     /*----------------------------------------------------------------------------
104     ; STRUCTURES TYPEDEF'S
105     ----------------------------------------------------------------------------*/
106     typedef struct
107     {
108         Bool tns_data_present;
109 
110         /* Information about the number of filters for each window. */
111         Int n_filt[TNS_MAX_WIN];
112 
113         /*
114          * Filter Information
115          *
116          * For short windows, there is a maximum of
117          * 1 filter per window (8 total)
118          *
119          * For long windows, there is a maximum of 3 filters
120          *
121          */
122         TNSfilt filt[TNS_MAX_WIN];
123 
124         /*
125          * For short windows, there is a maximum of 8 filters,
126          * each of order 7 (requring 56 Ints)
127          *
128          * For long windows, there is a maximum of 3 filters,
129          * each of order 20 (requiring 60 Ints)
130          *
131          * So, 3*TNS_MAX_ORDER declares an array of sufficient
132          * size (60) for both cases.
133          */
134         Int32 lpc_coef[3*TNS_MAX_ORDER];
135 
136     } TNS_frame_info;
137 
138     /*----------------------------------------------------------------------------
139     ; GLOBAL FUNCTION DEFINITIONS
140     ; Function Prototype declaration
141     ----------------------------------------------------------------------------*/
142 
143 #ifdef __cplusplus
144 }
145 #endif
146 
147 #endif /* S_TNS_FRAME_INFO_H */
148