00001 #ifndef __J2K__BTYPES_HPP__
00002 #define __J2K__BTYPES_HPP__
00003
00004 #define BTYPES_ENDIAN_BIG 1
00005
00006
00007
00008
00009
00010 typedef signed char int8_t;
00011 typedef signed short int16_t;
00012 typedef signed long int32_t;
00013
00014 typedef unsigned char uint8_t;
00015 typedef unsigned short uint16_t;
00016 typedef unsigned long uint32_t;
00017
00018 typedef float float32_t;
00019 typedef double float64_t;
00020
00021 typedef union {
00022 uint16_t uint16;
00023 struct {
00024 #ifdef BTYPES_ENDIAN_BIG
00025 uint8_t hi;
00026 uint8_t lo;
00027 #else
00028 #ifdef BTYPES_ENDIAN_LITTLE
00029 uint8_t lo;
00030 uint8_t hi;
00031 #else
00032 #error "ENDIAN NOT DEFINED"
00033 #endif
00034 #endif
00035 } uint8;
00036 } uint16hilo_t;
00037
00038 typedef uint32_t addr_t;
00039
00040 #include <j2k/Fred/Boolean.hpp>
00041
00042 #define UINT8_MAX 0xffu
00043 #define UINT16_MAX 0xffffu
00044 #define UINT32_MAX 0xffffffffu
00045 #define INT8_MAX 0x7f
00046 #define INT16_MAX 0x7fff
00047 #define INT32_MAX 0x7fffffff
00048
00049 #endif
00050