1/******************************************************************************
2 *
3 * Copyright (C) 2018 The Android Open Source Project
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at:
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *****************************************************************************
18 * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
19*/
20
21#ifndef IMPD_TYPE_DEF_H
22#define IMPD_TYPE_DEF_H
23
24/****************************************************************************/
25/*     types               type define    prefix        examples      bytes */
26/************************  ***********    ******    ****************  ***** */
27typedef char CHAR8;   /* c       CHAR8    c_name     1   */
28typedef char* pCHAR8; /* pc      pCHAR8   pc_nmae    1   */
29
30typedef signed char WORD8;   /* b       WORD8    b_name     1   */
31typedef signed char* pWORD8; /* pb      pWORD8   pb_nmae    1   */
32
33typedef unsigned char UWORD8;   /* ub      UWORD8   ub_count   1   */
34typedef unsigned char* pUWORD8; /* pub     pUWORD8  pub_count  1   */
35
36typedef signed short WORD16;      /* s       WORD16   s_count    2   */
37typedef signed short* pWORD16;    /* ps      pWORD16  ps_count   2   */
38typedef unsigned short UWORD16;   /* us      UWORD16  us_count   2   */
39typedef unsigned short* pUWORD16; /* pus     pUWORD16 pus_count  2   */
40
41typedef signed int WORD24;      /* k       WORD24   k_count    3   */
42typedef signed int* pWORD24;    /* pk      pWORD24  pk_count   3   */
43typedef unsigned int UWORD24;   /* uk      UWORD24  uk_count   3   */
44typedef unsigned int* pUWORD24; /* puk     pUWORD24 puk_count  3   */
45
46typedef signed int WORD32;      /* i       WORD32   i_count    4   */
47typedef signed int* pWORD32;    /* pi      pWORD32  pi_count   4   */
48typedef unsigned int UWORD32;   /* ui      UWORD32  ui_count   4   */
49typedef unsigned int* pUWORD32; /* pui     pUWORD32 pui_count  4   */
50
51#ifdef WIN32
52#ifndef ECLIPSE
53typedef signed __int64 WORD40;      /* m       WORD40   m_count        5   */
54typedef signed __int64* pWORD40;    /* pm      pWORD40  pm_count   5   */
55typedef unsigned __int64 UWORD40;   /* um      UWORD40  um_count   5   */
56typedef unsigned __int64* pUWORD40; /* pum     pUWORD40 pum_count  5   */
57
58typedef signed __int64 WORD64;      /* h       WORD64   h_count        8   */
59typedef signed __int64* pWORD64;    /* ph      pWORD64  ph_count   8   */
60typedef unsigned __int64 UWORD64;   /* uh      UWORD64  uh_count   8   */
61typedef unsigned __int64* pUWORD64; /* puh     pUWORD64 puh_count  8   */
62#else
63typedef signed long long WORD40;      /* m       WORD40   m_count        5   */
64typedef signed long long* pWORD40;    /* pm      pWORD40  pm_count   5   */
65typedef unsigned long long UWORD40;   /* um      UWORD40  um_count   5   */
66typedef unsigned long long* pUWORD40; /* pum     pUWORD40 pum_count  5   */
67
68typedef signed long long WORD64;      /* h       WORD64   h_count        8   */
69typedef signed long long* pWORD64;    /* ph      pWORD64  ph_count   8   */
70typedef unsigned long long UWORD64;   /* uh      UWORD64  uh_count   8   */
71typedef unsigned long long* pUWORD64; /* puh     pUWORD64 puh_count  8   */
72#endif
73#else
74
75typedef signed long long WORD40;      /* m       WORD40   m_count        5   */
76typedef signed long long* pWORD40;    /* pm      pWORD40  pm_count   5   */
77typedef unsigned long long UWORD40;   /* um      UWORD40  um_count   5   */
78typedef unsigned long long* pUWORD40; /* pum     pUWORD40 pum_count  5   */
79
80typedef signed long long WORD64;      /* h       WORD64   h_count        8   */
81typedef signed long long* pWORD64;    /* ph      pWORD64  ph_count   8   */
82typedef unsigned long long UWORD64;   /* uh      UWORD64  uh_count   8   */
83typedef unsigned long long* pUWORD64; /* puh     pUWORD64 puh_count  8   */
84
85#endif
86
87typedef float FLOAT32;    /* f       FLOAT32  f_count    4   */
88typedef float* pFLOAT32;  /* pf      pFLOAT32 pf_count   4   */
89typedef double FLOAT64;   /* d       UFLOAT64 d_count    8   */
90typedef double* pFlOAT64; /* pd      pFLOAT64 pd_count   8   */
91
92typedef void VOID;   /* v       VOID     v_flag     4   */
93typedef void* pVOID; /* pv      pVOID    pv_flag    4   */
94
95/* variable size types: platform optimized implementation */
96typedef signed int BOOL;       /* bool    BOOL     bool_true      */
97typedef unsigned int UBOOL;    /* ubool   BOOL     ubool_true     */
98typedef signed int FLAG;       /* flag    FLAG     flag_false     */
99typedef unsigned int UFLAG;    /* uflag   FLAG     uflag_false    */
100typedef signed int LOOPIDX;    /* lp      LOOPIDX  lp_index       */
101typedef unsigned int ULOOPIDX; /* ulp     SLOOPIDX ulp_index      */
102typedef signed int WORD;       /* lp      LOOPIDX  lp_index       */
103typedef unsigned int UWORD;    /* ulp     SLOOPIDX ulp_index      */
104
105typedef LOOPIDX LOOPINDEX;   /* lp    LOOPIDX  lp_index       */
106typedef ULOOPIDX ULOOPINDEX; /* ulp   SLOOPIDX ulp_index      */
107
108#define SIZE_T size_t
109
110#define PLATFORM_INLINE __inline
111
112#endif
113