Home | History | Annotate | Download | only in inc
      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.h
     18 
     19 	Content:	Threshold compensation function
     20 
     21 *******************************************************************************/
     22 
     23 #ifndef __ADJ_THR_H
     24 #define __ADJ_THR_H
     25 
     26 #include "adj_thr_data.h"
     27 #include "qc_data.h"
     28 #include "interface.h"
     29 
     30 Word16 bits2pe(const Word16 bits);
     31 
     32 Word32 AdjThrNew(ADJ_THR_STATE** phAdjThr,
     33                  Word32 nElements);
     34 
     35 void AdjThrDelete(ADJ_THR_STATE *hAdjThr);
     36 
     37 void AdjThrInit(ADJ_THR_STATE *hAdjThr,
     38                 const Word32 peMean,
     39                 Word32 chBitrate);
     40 
     41 void AdjustThresholds(ADJ_THR_STATE *adjThrState,
     42                       ATS_ELEMENT* AdjThrStateElement,
     43                       PSY_OUT_CHANNEL psyOutChannel[MAX_CHANNELS],
     44                       PSY_OUT_ELEMENT *psyOutElement,
     45                       Word16 *chBitDistribution,
     46                       Word16 logSfbEnergy[MAX_CHANNELS][MAX_GROUPED_SFB],
     47                       Word16 sfbNRelevantLines[MAX_CHANNELS][MAX_GROUPED_SFB],
     48                       QC_OUT_ELEMENT* qcOE,
     49 					  ELEMENT_BITS* elBits,
     50 					  const Word16 nChannels,
     51                       const Word16 maxBitFac);
     52 
     53 void AdjThrUpdate(ATS_ELEMENT *AdjThrStateElement,
     54                   const Word16 dynBitsUsed);
     55 
     56 
     57 #endif
     58