00001 /* --------------------------------------------------------------------------- 00002 Phission : 00003 Realtime Vision Processing System 00004 00005 Copyright (C) 2003-2006 Philip D.S. Thoren (pthoren@cs.uml.edu) 00006 University of Massachusetts at Lowell, 00007 Laboratory for Artificial Intelligence and Robotics 00008 00009 This file is part of Phission. 00010 00011 Phission is free software; you can redistribute it and/or modify 00012 it under the terms of the GNU Lesser General Public License as published by 00013 the Free Software Foundation; either version 2 of the License, or 00014 (at your option) any later version. 00015 00016 Phission is distributed in the hope that it will be useful, 00017 but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 GNU Lesser General Public License for more details. 00020 00021 You should have received a copy of the GNU Lesser General Public License 00022 along with Phission; if not, write to the Free Software 00023 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00024 00025 ---------------------------------------------------------------------------*/ 00026 #ifndef _PHBACKCOMPATIBILITY_H 00027 #define _PHBACKCOMPATIBILITY_H 00028 00029 /* ------------------------------------------------------------------------ */ 00034 /* ------------------------------------------------------------------------ */ 00035 #ifndef phALLOW_OLD_MACROS 00036 00048 #define phALLOW_OLD_MACROS 0 00049 #endif 00050 00051 /* ------------------------------------------------------------------------ */ 00052 /* This ifdef,def,undef,etc. stuff is to keep the compiler from 00053 * complaining about DELETE being redefined (exists in winnt.h). 00054 * Our DELETE is special */ 00055 /* ------------------------------------------------------------------------ */ 00056 #if phALLOW_OLD_MACROS 00057 00058 #ifdef DELETE 00059 #define FOO_DELETE DELETE 00060 #undef DELETE 00061 #endif 00062 00063 #define DELETE phDELETE 00064 00065 #ifdef FOO_DELETE 00066 #undef DELETE 00067 #define DELETE FOO_DELETE 00068 #endif 00069 00070 //#define FREE phFree 00071 //#define DELETEARR phDELETEARR 00072 #define AUTO_ALLOC phDALLOC 00073 00074 #define CHECK_RC phCHECK_RC 00075 #define PROGRESS phPROGRESS 00076 #define PRINT phPRINT 00077 #define ERROR_PRINT phERROR_PRINT 00078 #define ERR_PRINT phERR_PRINT 00079 #define PRINT_RC phPRINT_RC 00080 #define CONT_RC phCONT_RC 00081 #define CHECK_NULLPTR phCHECK_NULLPTR 00082 #define PRINT_PTR phPRINT_PTR 00083 #define CONT_NULLPTR phCONT_NULLPTR 00084 #define PRINT_NULLPTR phPRINT_NULLPTR 00085 #define THISCHK phTHISCHK 00086 #define CHECK_PTR phCHECK_PTR 00087 #define CHECK_NULLPTR phCHECK_NULLPTR 00088 #endif /* #if phALLOC_OLD_MACROS() */ 00089 00090 #if phALLOW_OLD_MACROS 00091 #define SUCCESS 0 00092 #define FAIL -1 00093 #endif /* #if phALLOW_OLD_MACROS */ 00094 00095 #if 0 00096 /* ---------------------------------------------------------------------- */ 00099 typedef struct phPixel_u 00100 { 00101 int r; 00102 int g; 00103 int b; 00104 00105 union { 00106 int b; 00107 int g; 00108 int r; 00109 } bgr; 00110 00111 union { 00112 int v[3]; 00113 } array; 00114 00115 } phPixel; 00116 00117 /* ------------------------------------------------------------------------ */ 00120 typedef struct phPixel15_t 00121 { 00122 uint8_t r : 5; 00123 uint8_t g : 5; 00124 uint8_t b : 5; 00125 00126 union { 00127 uint8_t r : 5; 00128 uint8_t g : 5; 00129 uint8_t b : 5; 00130 } rgb; 00131 00132 union { 00133 uint8_t b : 5; 00134 uint8_t g : 5; 00135 uint8_t r : 5; 00136 } bgr; 00137 00138 } phPixel15; 00139 00140 /* ------------------------------------------------------------------------ */ 00143 typedef struct phPixel16_t 00144 { 00145 uint8_t r : 5; 00146 uint8_t g : 6; 00147 uint8_t b : 5; 00148 00149 union { 00150 uint8_t r : 5; 00151 uint8_t g : 6; 00152 uint8_t b : 5; 00153 } rgb; 00154 00155 union { 00156 uint8_t b : 5; 00157 uint8_t g : 6; 00158 uint8_t r : 5; 00159 } bgr; 00160 00161 } phPixel16; 00162 00163 /* ------------------------------------------------------------------------ */ 00166 typedef struct phPixel24_t 00167 { 00168 uint8_t r; 00169 uint8_t g; 00170 uint8_t b; 00171 00172 union { 00173 uint8_t r; 00174 uint8_t g; 00175 uint8_t b; 00176 } rgb; 00177 00178 union { 00179 uint8_t b; 00180 uint8_t g; 00181 uint8_t r; 00182 } bgr; 00183 00184 union { 00185 uint8_t v[3]; 00186 } array; 00187 00188 } phPixel24; 00189 00190 /* ------------------------------------------------------------------------ */ 00193 typedef struct phPixel32_t 00194 { 00195 uint8_t r; 00196 uint8_t g; 00197 uint8_t b; 00198 uint8_t a; 00199 00200 union { 00201 uint8_t r; 00202 uint8_t g; 00203 uint8_t b; 00204 uint8_t a; 00205 } rgba; 00206 00207 union { 00208 uint8_t a; 00209 uint8_t b; 00210 uint8_t g; 00211 uint8_t r; 00212 } abgr; 00213 00214 union { 00215 uint8_t b; 00216 uint8_t g; 00217 uint8_t r; 00218 uint8_t a; 00219 } bgra; 00220 00221 union { 00222 uint8_t v[4]; 00223 } array; 00224 00225 } phPixel32; 00226 #endif 00227 /* end \addtogroup Misc */ 00229 00230 #endif /* _PHBACKCOMPATIBILITY_H */
Copyright (C) 2002 - 2007 |
Philip D.S. Thoren ( pthoren@users.sourceforge.net ) University Of Massachusetts at Lowell Robotics Lab |