Home | History | Annotate | Download | only in src
      1 /* ------------------------------------------------------------------
      2  * Copyright (C) 1998-2009 PacketVideo
      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
     13  * express or implied.
     14  * See the License for the specific language governing permissions
     15  * and limitations under the License.
     16  * -------------------------------------------------------------------
     17  */
     18 /*
     19 
     20  Pathname: ps_decode_bs_utils.h
     21 
     22 ------------------------------------------------------------------------------
     23  REVISION HISTORY
     24 
     25  Who:                   Date:
     26  Description:
     27 
     28 ------------------------------------------------------------------------------
     29  INCLUDE DESCRIPTION
     30 
     31  Header file for functions differential_Decoding(), limitMinMax(),
     32                            GetNrBitsAvailable(), map34IndexTo20()
     33 
     34 
     35 ------------------------------------------------------------------------------
     36 */
     37 
     38 /*----------------------------------------------------------------------------
     39 ; CONTINUE ONLY IF NOT ALREADY DEFINED
     40 ----------------------------------------------------------------------------*/
     41 #ifndef PS_DECODE_BS_UTILS_H
     42 #define PS_DECODE_BS_UTILS_H
     43 
     44 /*----------------------------------------------------------------------------
     45 ; INCLUDES
     46 ----------------------------------------------------------------------------*/
     47 #include "pv_audio_type_defs.h"
     48 #include "s_ps_dec.h"
     49 #include "s_bit_buffer.h"
     50 
     51 /*----------------------------------------------------------------------------
     52 ; MACROS
     53 ; Define module specific macros here
     54 ----------------------------------------------------------------------------*/
     55 
     56 /*----------------------------------------------------------------------------
     57 ; DEFINES
     58 ; Include all pre-processor statements here.
     59 ----------------------------------------------------------------------------*/
     60 
     61 /*----------------------------------------------------------------------------
     62 ; EXTERNAL VARIABLES REFERENCES
     63 ; Declare variables used in this module but defined elsewhere
     64 ----------------------------------------------------------------------------*/
     65 
     66 /*----------------------------------------------------------------------------
     67 ; SIMPLE TYPEDEF'S
     68 ----------------------------------------------------------------------------*/
     69 
     70 /*----------------------------------------------------------------------------
     71 ; ENUMERATED TYPEDEF'S
     72 ----------------------------------------------------------------------------*/
     73 
     74 /*----------------------------------------------------------------------------
     75 ; STRUCTURES TYPEDEF'S
     76 ----------------------------------------------------------------------------*/
     77 
     78 /*----------------------------------------------------------------------------
     79 ; GLOBAL FUNCTION DEFINITIONS
     80 ; Function Prototype declaration
     81 ----------------------------------------------------------------------------*/
     82 
     83 #ifdef __cplusplus
     84 extern "C"
     85 {
     86 #endif
     87 
     88     void differential_Decoding(Int32 enable,
     89     Int32 *aIndex,
     90     Int32 *aPrevFrameIndex,
     91     Int32 DtDf,
     92     Int32 nrElements,
     93     Int32 stride,
     94     Int32 minIdx,
     95     Int32 maxIdx);
     96 
     97     Int32 limitMinMax(Int32 i,
     98                       Int32 min,
     99                       Int32 max);
    100 
    101     Int32 GetNrBitsAvailable(HANDLE_BIT_BUFFER hBitBuf);
    102 
    103     void map34IndexTo20(Int32 *aIndex);
    104 
    105 #ifdef __cplusplus
    106 }
    107 #endif
    108 
    109 /*----------------------------------------------------------------------------
    110 ; END
    111 ----------------------------------------------------------------------------*/
    112 #endif  /* PS_DECODE_BS_UTILS_H */
    113