Home | History | Annotate | Download | only in aacdec
      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: ./c/include/pv_audio_type_defs.h
     21 
     22 ------------------------------------------------------------------------------
     23  REVISION HISTORY
     24 
     25  Description:  Removed errant semicolons from #define statements
     26 
     27  Description:
     28         1. Modified ifndef STD_TYPE_DEFS_H with
     29            #ifndef PV_AUDIO_TYPE_DEFS_H to avoid double definition
     30                if file was already included
     31         2. Merged cai if-def structures and C++ definition
     32             3. Updated copyright notice
     33 
     34  Description:  Added dependency on OSCL libraries
     35 
     36  Description:
     37 ------------------------------------------------------------------------------
     38  INCLUDE DESCRIPTION
     39 
     40  This file was derived from a number of standards bodies. The type
     41  definitions below were created from some of the best practices observed
     42  in the standards bodies.
     43 
     44  This file is dependent on limits.h for defining the bit widths. In an
     45  ANSI C environment limits.h is expected to always be present and contain
     46  the following definitions:
     47 
     48      SCHAR_MIN
     49      SCHAR_MAX
     50      UCHAR_MAX
     51 
     52      INT_MAX
     53      INT_MIN
     54      UINT_MAX
     55 
     56      SHRT_MIN
     57      SHRT_MAX
     58      USHRT_MAX
     59 
     60      LONG_MIN
     61      LONG_MAX
     62      ULONG_MAX
     63 
     64 ------------------------------------------------------------------------------
     65 */
     66 
     67 #ifndef PV_AUDIO_TYPE_DEFS_H
     68 #define PV_AUDIO_TYPE_DEFS_H
     69 
     70 #include <stdint.h>
     71 
     72 typedef int8_t        Char;
     73 
     74 typedef uint8_t       UChar;
     75 
     76 
     77 
     78 /*----------------------------------------------------------------------------
     79 ; Define generic signed and unsigned int
     80 ----------------------------------------------------------------------------*/
     81 #ifndef Int
     82 typedef signed int  Int;
     83 #endif
     84 
     85 #ifndef UInt
     86 typedef unsigned int    UInt;
     87 #endif
     88 
     89 
     90 /*----------------------------------------------------------------------------
     91 ; Define 16 bit signed and unsigned words
     92 ----------------------------------------------------------------------------*/
     93 
     94 
     95 #ifndef Int16
     96 typedef int16_t       Int16;
     97 #endif
     98 
     99 #ifndef INT16_MIN
    100 #define INT16_MIN   (-32768)
    101 #endif
    102 
    103 #ifndef INT16_MAX
    104 #define INT16_MAX   32767
    105 #endif
    106 
    107 #ifndef UInt16
    108 typedef uint16_t      UInt16;
    109 
    110 #endif
    111 
    112 
    113 /*----------------------------------------------------------------------------
    114 ; Define 32 bit signed and unsigned words
    115 ----------------------------------------------------------------------------*/
    116 
    117 
    118 #ifndef Int32
    119 typedef int32_t       Int32;
    120 #endif
    121 
    122 #ifndef INT32_MIN
    123 #define INT32_MIN   (-2147483647 - 1)
    124 #endif
    125 #ifndef INT32_MAX
    126 #define INT32_MAX   2147483647
    127 #endif
    128 
    129 #ifndef UInt32
    130 typedef uint32_t      UInt32;
    131 #endif
    132 
    133 #ifndef UINT32_MIN
    134 #define UINT32_MIN  0
    135 #endif
    136 #ifndef UINT32_MAX
    137 #define UINT32_MAX  0xffffffff
    138 #endif
    139 
    140 
    141 /*----------------------------------------------------------------------------
    142 ; Define 64 bit signed and unsigned words
    143 ----------------------------------------------------------------------------*/
    144 
    145 
    146 /*----------------------------------------------------------------------------
    147 ; Define boolean type
    148 ----------------------------------------------------------------------------*/
    149 #ifndef Bool
    150 typedef Int     Bool;
    151 #endif
    152 #ifndef FALSE
    153 #define FALSE       0
    154 #endif
    155 
    156 #ifndef TRUE
    157 #define TRUE        1
    158 #endif
    159 
    160 #ifndef OFF
    161 #define OFF     0
    162 #endif
    163 #ifndef ON
    164 #define ON      1
    165 #endif
    166 
    167 #ifndef NO
    168 #define NO      0
    169 #endif
    170 #ifndef YES
    171 #define YES     1
    172 #endif
    173 
    174 #ifndef SUCCESS
    175 #define SUCCESS     0
    176 #endif
    177 
    178 #ifndef  NULL
    179 #define  NULL       0
    180 #endif
    181 
    182 
    183 #endif  /* PV_AUDIO_TYPE_DEFS_H */
    184