• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  ** Copyright 2003-2010, VisualOn, Inc.
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 express or implied.
13  ** See the License for the specific language governing permissions and
14  ** limitations under the License.
15  */
16 /*******************************************************************************
17 	File:		tns_param.h
18 
19 	Content:	TNS parameters
20 
21 *******************************************************************************/
22 
23 /*
24    TNS parameters
25  */
26 #ifndef _TNS_PARAM_H
27 #define _TNS_PARAM_H
28 
29 #include "tns.h"
30 
31 typedef struct{
32   Word32 samplingRate;
33   Word16 maxBandLong;
34   Word16 maxBandShort;
35 }TNS_MAX_TAB_ENTRY;
36 
37 typedef struct{
38     Word32 bitRateFrom;
39     Word32 bitRateTo;
40     const TNS_CONFIG_TABULATED *paramMono_Long;  /* contains TNS parameters */
41     const TNS_CONFIG_TABULATED *paramMono_Short;
42     const TNS_CONFIG_TABULATED *paramStereo_Long;
43     const TNS_CONFIG_TABULATED *paramStereo_Short;
44 }TNS_INFO_TAB;
45 
46 
47 void GetTnsParam(TNS_CONFIG_TABULATED *tnsConfigTab,
48                  Word32 bitRate, Word16 channels, Word16 blockType);
49 
50 void GetTnsMaxBands(Word32 samplingRate, Word16 blockType, Word16* tnsMaxSfb);
51 
52 #endif /* _TNS_PARAM_H */
53