adj_thr_data.h revision 956c553ab0ce72f8074ad0fda2ffd66a0305700c
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:		adj_thr_data.h
18
19	Content:	Threshold compensation parameter
20
21*******************************************************************************/
22
23#ifndef __ADJ_THR_DATA_H
24#define __ADJ_THR_DATA_H
25
26#include "typedef.h"
27#include "psy_const.h"
28#include "line_pe.h"
29
30typedef struct {
31   Word16 clipSaveLow, clipSaveHigh;
32   Word16 minBitSave, maxBitSave;
33   Word16 clipSpendLow, clipSpendHigh;
34   Word16 minBitSpend, maxBitSpend;
35} BRES_PARAM;
36
37typedef struct {
38   UWord8 modifyMinSnr;
39   Word16 startSfbL, startSfbS;
40} AH_PARAM;
41
42typedef struct {
43  Word32 maxRed;
44  Word32 startRatio, maxRatio;
45  Word32 redRatioFac;
46  Word32 redOffs;
47} MINSNR_ADAPT_PARAM;
48
49typedef struct {
50  /* parameters for bitreservoir control */
51  Word16 peMin, peMax;
52  /* constant offset to pe               */
53  Word16  peOffset;
54  /* avoid hole parameters               */
55  AH_PARAM ahParam;
56  /* paramters for adaptation of minSnr */
57  MINSNR_ADAPT_PARAM minSnrAdaptParam;
58  /* values for correction of pe */
59  Word16 peLast;
60  Word16 dynBitsLast;
61  Word16 peCorrectionFactor;
62} ATS_ELEMENT;
63
64typedef struct {
65  BRES_PARAM   bresParamLong, bresParamShort; /* Word16 size: 2*8 */
66  ATS_ELEMENT  adjThrStateElem;               /* Word16 size: 19 */
67} ADJ_THR_STATE;
68
69#endif
70