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:		qc_main.h
     18 
     19 	Content:	Quantizing & coding functions
     20 
     21 *******************************************************************************/
     22 
     23 #ifndef _QC_MAIN_H
     24 #define _QC_MAIN_H
     25 
     26 #include "qc_data.h"
     27 #include "interface.h"
     28 #include "memalign.h"
     29 
     30 /* Quantizing & coding stage */
     31 
     32 Word16 QCOutNew(QC_OUT *hQC, Word16 nChannels, VO_MEM_OPERATOR *pMemOP);
     33 
     34 void QCOutDelete(QC_OUT *hQC, VO_MEM_OPERATOR *pMemOP);
     35 
     36 Word16 QCNew(QC_STATE *hQC, VO_MEM_OPERATOR *pMemOP);
     37 
     38 Word16 QCInit(QC_STATE *hQC,
     39               struct QC_INIT *init);
     40 
     41 void QCDelete(QC_STATE *hQC, VO_MEM_OPERATOR *pMemOP);
     42 
     43 
     44 Word16 QCMain(QC_STATE *hQC,
     45               ELEMENT_BITS* elBits,
     46               ATS_ELEMENT* adjThrStateElement,
     47               PSY_OUT_CHANNEL psyOutChannel[MAX_CHANNELS], /* may be modified in-place */
     48               PSY_OUT_ELEMENT* psyOutElement,
     49               QC_OUT_CHANNEL  qcOutChannel[MAX_CHANNELS],   /* out                      */
     50               QC_OUT_ELEMENT* qcOutElement,
     51               Word16 nChannels,
     52 			  Word16 ancillaryDataBytes);     /* returns error code       */
     53 
     54 void updateBitres(QC_STATE* qcKernel,
     55                   QC_OUT* qcOut);
     56 
     57 Word16 FinalizeBitConsumption(QC_STATE *hQC,
     58                               QC_OUT* qcOut);
     59 
     60 Word16 AdjustBitrate(QC_STATE *hQC,
     61                      Word32 bitRate,
     62                      Word32 sampleRate);
     63 
     64 #endif /* _QC_MAIN_H */
     65