blob: 26266acca057d4203e3f2d6f54e470344c7e3782 [file] [log] [blame]
James Dong17299ab2010-05-14 15:45:22 -07001/*
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
31typedef struct{
32 Word32 samplingRate;
33 Word16 maxBandLong;
34 Word16 maxBandShort;
35}TNS_MAX_TAB_ENTRY;
36
37typedef 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
47void GetTnsParam(TNS_CONFIG_TABULATED *tnsConfigTab,
48 Word32 bitRate, Word16 channels, Word16 blockType);
49
50void GetTnsMaxBands(Word32 samplingRate, Word16 blockType, Word16* tnsMaxSfb);
51
52#endif /* _TNS_PARAM_H */