1 /*
2 * The components of this software package from Cadence Design Systems,
3 * Inc. are subject to the licenses below. By using the software package,
4 * you agree to the legal terms of each license.
5 *
6 * Copyright (c) 1999-2018 Cadence Design Systems, Inc.
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining
9 * a copy of this software and associated documentation files (the
10 * "Software"), to deal in the Software without restriction, including
11 * without limitation the rights to use, copy, modify, merge, publish,
12 * distribute, sublicense, and/or sell copies of the Software, and to
13 * permit persons to whom the Software is furnished to do so, subject to
14 * the following conditions:
15 *
16 * The above copyright notice and this permission notice shall be included
17 * in all copies or substantial portions of the Software.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
22 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
23 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
24 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
25 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 */
27 
28 #ifndef  __XA_TYPE_DEF_H__
29 #define  __XA_TYPE_DEF_H__
30 
31 /****************************************************************************/
32 /*     types               type define    prefix        examples      bytes */
33 /************************  ***********    ******    ****************  ***** */
34 typedef char             WORD8   ;/* b       WORD8    b_name     1   */
35 typedef char         *   pWORD8  ;/* pb      pWORD8   pb_nmae    1   */
36 typedef unsigned char           UWORD8  ;/* ub      UWORD8   ub_count   1   */
37 typedef unsigned char       *   pUWORD8 ;/* pub     pUWORD8  pub_count  1   */
38 
39 typedef signed short            WORD16  ;/* s       WORD16   s_count    2   */
40 typedef signed short        *   pWORD16 ;/* ps      pWORD16  ps_count   2   */
41 typedef unsigned short          UWORD16 ;/* us      UWORD16  us_count   2   */
42 typedef unsigned short      *   pUWORD16;/* pus     pUWORD16 pus_count  2   */
43 
44 #if !defined(WORD24_H)
45 #define WORD24_H
46 typedef signed long              WORD24  ;/* k       WORD24   k_count    3   */
47 typedef signed long          *   pWORD24 ;/* pk      pWORD24  pk_count   3   */
48 typedef unsigned long            UWORD24 ;/* uk      UWORD24  uk_count   3   */
49 typedef unsigned long        *   pUWORD24;/* puk     pUWORD24 puk_count  3   */
50 #endif /* WORD24_H */
51 
52 typedef signed int              WORD32  ;/* i       WORD32   i_count    4   */
53 typedef signed int          *   pWORD32 ;/* pi      pWORD32  pi_count   4   */
54 typedef unsigned int            UWORD32 ;/* ui      UWORD32  ui_count   4   */
55 typedef unsigned int        *   pUWORD32;/* pui     pUWORD32 pui_count  4   */
56 
57 typedef signed long long        WORD40  ;/* m       WORD40   m_count    5   */
58 typedef signed long long    *   pWORD40 ;/* pm      pWORD40  pm_count   5   */
59 typedef unsigned long long      UWORD40 ;/* um      UWORD40  um_count   5   */
60 typedef unsigned long long  *   pUWORD40;/* pum     pUWORD40 pum_count  5   */
61 
62 typedef signed long long        WORD64  ;/* h       WORD64   h_count    8   */
63 typedef signed long long    *   pWORD64 ;/* ph      pWORD64  ph_count   8   */
64 typedef unsigned long long      UWORD64 ;/* uh      UWORD64  uh_count   8   */
65 typedef unsigned long long  *   pUWORD64;/* puh     pUWORD64 puh_count  8   */
66 
67 typedef float                   FLOAT32 ;/* f       FLOAT32  f_count    4   */
68 typedef float               *   pFLOAT32;/* pf      pFLOAT32 pf_count   4   */
69 typedef double                  FLOAT64 ;/* d       UFLOAT64 d_count    8   */
70 typedef double              *   pFlOAT64;/* pd      pFLOAT64 pd_count   8   */
71 
72 typedef void                    VOID    ;/* v       VOID     v_flag     4   */
73 typedef void                *   pVOID   ;/* pv      pVOID    pv_flag    4   */
74 
75 /* variable size types: platform optimized implementation */
76 typedef signed int              BOOL    ;/* bool    BOOL     bool_true      */
77 typedef unsigned int            UBOOL   ;/* ubool   BOOL     ubool_true     */
78 typedef signed int              FLAG    ;/* flag    FLAG     flag_false     */
79 typedef unsigned int            UFLAG   ;/* uflag   FLAG     uflag_false    */
80 typedef signed int              LOOPIDX ;/* lp      LOOPIDX  lp_index       */
81 typedef unsigned int            ULOOPIDX;/* ulp     SLOOPIDX ulp_index      */
82 typedef signed int              WORD    ;/* lp      LOOPIDX  lp_index       */
83 typedef unsigned int            UWORD   ;/* ulp     SLOOPIDX ulp_index      */
84 
85 typedef LOOPIDX                 LOOPINDEX; /* lp    LOOPIDX  lp_index       */
86 typedef ULOOPIDX                ULOOPINDEX;/* ulp   SLOOPIDX ulp_index      */
87 
88 #define PLATFORM_INLINE __inline
89 
90 typedef struct xa_codec_opaque { WORD32 _; } *xa_codec_handle_t;
91 
92 typedef int XA_ERRORCODE;
93 
94 typedef XA_ERRORCODE xa_codec_func_t(xa_codec_handle_t p_xa_module_obj,
95 				     WORD32            i_cmd,
96 				     WORD32            i_idx,
97 				     pVOID             pv_value);
98 
99 #endif /* __XA_TYPE_DEF_H__ */
100