00001
00019 #ifndef _Q_DivXPortable_h
00020 #define _Q_DivXPortable_h
00021
00022
00023 #define __ALIGNED
00024
00025 #if defined(WIN32) || defined(DOXYGEN)
00026
00027
00028
00029 #ifndef NULL
00030 #ifdef __cplusplus
00031 #define NULL 0
00032 #else
00033 #define NULL ((void *)0)
00034 #endif
00035 #endif
00036
00037 typedef char int8_t;
00038 typedef unsigned char uint8_t;
00039 typedef short int16_t;
00040 typedef unsigned short uint16_t;
00041 typedef int int32_t;
00042 typedef unsigned int uint32_t;
00043 typedef __int64 int64_t;
00044 typedef unsigned __int64 uint64_t;
00045
00046 #define SU_MALLOC_ALIGN_SIZE 64
00047
00048
00049 #undef __ALIGNED
00050
00051 #define __ALIGNED __declspec(align(128))
00052
00053
00054 #elif defined (TARGET_PS2)
00055
00056 typedef char int8_t;
00057 typedef unsigned char uint8_t;
00058 typedef short int16_t;
00059 typedef unsigned short uint16_t;
00060 typedef int int32_t;
00061 typedef unsigned int uint32_t;
00062 typedef signed long int64_t;
00063 typedef unsigned long uint64_t;
00064
00065 #define SU_MALLOC_ALIGN_SIZE 32
00066
00067 #elif defined (ARCH_BSP_V60)
00068
00069 #include <inttypes.h>
00070 #define memcpy unaligned_memcpy
00071 #define SU_MALLOC_ALIGN_SIZE 128
00072
00073 #elif defined (ARCH_TI_C6000)
00074 #define ARCH_TI
00075
00076 #define __inline
00077 #define SU_MALLOC_ALIGN_SIZE 64
00078
00079 typedef char int8_t;
00080 #define __int8_t_defined
00081 typedef unsigned char uint8_t;
00082 typedef short int16_t;
00083 typedef unsigned short uint16_t;
00084 typedef int int32_t;
00085 typedef unsigned int uint32_t;
00086 typedef double int64_t;
00087 typedef double uint64_t;
00088
00089 #elif defined (ARCH_TI_C5000)
00090 #define ARCH_TI
00091 #define __inline
00092 #define SU_MALLOC_ALIGN_SIZE 64
00093
00094 typedef char int8_t;
00095 #define __int8_t_defined
00096 typedef unsigned char uint8_t;
00097 typedef short int16_t;
00098 typedef unsigned short uint16_t;
00099 typedef int int32_t;
00100 typedef unsigned int uint32_t;
00101 #error The following two typedefs are almost certainly incorrect and need review.
00102 typedef double int64_t;
00103 typedef double uint64_t;
00104
00105 #elif defined (__CYGWIN__)
00106 #include "sys/types.h"
00107 #define SU_MALLOC_ALIGN_SIZE 128
00108
00109 #elif defined (LINUX)
00110
00111 #include <inttypes.h>
00112 #define SU_MALLOC_ALIGN_SIZE 128
00113 #undef __ALIGNED
00114 #define __ALIGNED __attribute__((__aligned__(16)))
00115
00116 #else // WIN32
00117
00118 #include <inttypes.h>
00119 #define SU_MALLOC_ALIGN_SIZE 128
00120
00121 #endif
00122
00123 #ifdef WIN32
00124 #define CONSTANT_64BIT(X) X ## i64
00125 #else
00126 #define CONSTANT_64BIT(X) X ## LL
00127 #endif
00128
00129 #endif // _Q_DivXPortable_h