24 #define TIL_Lookup PXL_Lookup
25 #define TIL_Fill PXL_Fill
26 #define TIL_FillParms PXL_FillParms
27 #define TIL_Pixel PXL_Pixel
28 #define TIL_Convert PXL_Convert
38 #define TIL_MAX_THREADS 32
40 #define TIL_DEFAULT_TILE_SIZE 320
42 #define TIL_DEFAULT_INT8_SIZE (TIL_DEFAULT_TILE_SIZE*TIL_DEFAULT_TILE_SIZE)
43 #define TIL_DEFAULT_INT16_SIZE (TIL_DEFAULT_INT8_SIZE * 2)
44 #define TIL_DEFAULT_FLOAT32_SIZE (TIL_DEFAULT_INT8_SIZE * 4)
47 #define TILE_LOCK_WRITE 0
48 #define TILE_LOCK_READ_ONLY 1
65 #define TIL_DataFormat PXL_DataFormat
66 #define TILE_INT8 PXL_INT8
67 #define TILE_INT16 PXL_INT16
68 #define TILE_INT32 PXL_INT32
69 #define TILE_FLOAT32 PXL_FLOAT32
70 #define TILE_FLOAT16 PXL_FLOAT16
71 #define TILE_MAX_DATA_FORMAT PXL_MAX_DATA_FORMAT
73 #define TIL_Packing PXL_Packing
160 #define TILE_WHITE_8 UCHAR_MAX
161 #define TILE_WHITE_16 USHRT_MAX
162 #define TILE_WHITE_32 UINT_MAX
164 #define TILE_CACHE_MANAGER_MAX_LOCKS 4096
166 #define PLANE_MAX_ARRAY_SIZE 4096
167 #define PLANE_MAX_VECTOR_SIZE 4
169 #define PROXY_TABLE_SIZE 309
170 #define POOL_TABLE_SIZE 509
176 #define FOR_EACH_TILE(list,tile, i) \
177 for(i=0, tile=list->myItems[0]; i<PLANE_MAX_VECTOR_SIZE; \
178 i++, tile=list->myItems[SYSmin(i, PLANE_MAX_VECTOR_SIZE-1)])\
181 #define GET_TILE(list,tile,i) \
182 for(tile=0, i=0, tile=list->myItems[0]; i<PLANE_MAX_VECTOR_SIZE; \
183 i++, tile=list->myItems[SYSmin(i, PLANE_MAX_VECTOR_SIZE-1)]) \
186 #define GET_UNCOOKED_TILE(list,tile,i) \
187 for(tile=0, i=0, tile=list->myItems[0]; \
188 i<PLANE_MAX_VECTOR_SIZE; \
189 i++, tile=list->myItems[SYSmin(i, PLANE_MAX_VECTOR_SIZE-1)])\
190 if(tile && !tile->isCooked()) break;
192 #define FOR_EACH_UNCOOKED_TILE(list,tile,i) \
193 for(i=0, tile=list->myItems[0]; i<PLANE_MAX_VECTOR_SIZE; \
194 i++, tile=list->myItems[SYSmin(i, PLANE_MAX_VECTOR_SIZE-1)])\
195 if(tile && !tile->isCooked())
197 #define FOR_EACH_UNCOOKED_PAIR(outlist, inlist, out, in, i) \
198 for(i=0, out=outlist->myItems[0], in=inlist->myItems[0]; \
199 i<PLANE_MAX_VECTOR_SIZE; \
200 i++, out=outlist->myItems[SYSmin(i,PLANE_MAX_VECTOR_SIZE-1)],\
201 in=inlist->myItems[SYSmin(i, PLANE_MAX_VECTOR_SIZE-1)]) \
202 if(out && in && !out->isCooked())
205 #define TILE_INPUT1(list,a) { \
206 a = list->myItems[0]; }
208 #define TILE_INPUT2(list,a,b) { \
209 a = list->myItems[0]; \
210 b = list->myItems[1]; }
212 #define TILE_INPUT3(list,a,b,c) { \
213 a = list->myItems[0]; \
214 b = list->myItems[1]; \
215 c = list->myItems[2]; }
217 #define TILE_INPUT4(list,a,b,c,d) { \
218 a = list->myItems[0]; \
219 b = list->myItems[1]; \
220 c = list->myItems[2]; \
221 d = list->myItems[3]; }
225 #define TILE_SCALAR(list,a) { \
226 a = list->myItems[0]; \
227 if(a && a->isCooked()) a = 0; \
230 #define TILE_VECTOR2(list,a,b) { \
231 a = list->myItems[0]; \
232 b = list->myItems[1]; \
233 if(a && a->isCooked()) a = 0; \
234 if(b && b->isCooked()) b = 0; \
237 #define TILE_VECTOR3(list,a,b,c) { \
238 a = list->myItems[0]; \
239 b = list->myItems[1]; \
240 c = list->myItems[2]; \
241 if(a && a->isCooked()) a = 0; \
242 if(b && b->isCooked()) b = 0; \
243 if(c && c->isCooked()) c = 0; \
246 #define TILE_VECTOR4(list,a,b,c,d){ \
247 a = list->myItems[0]; \
248 b = list->myItems[1]; \
249 c = list->myItems[2]; \
250 d = list->myItems[3]; \
251 if(a && a->isCooked()) a = 0; \
252 if(b && b->isCooked()) b = 0; \
253 if(c && c->isCooked()) c = 0; \
254 if(d && d->isCooked()) d = 0; \
259 #ifdef TIL_DEBUG_LOCK_BLOCKING
260 #define TIL_LOCK(loc) TILlock(loc, __FILE__ ":", __LINE__)
261 #define TIL_UNLOCK(loc) loc.unlock()
262 #define TILwait(n) TILwaitF(n, __FILE__ ":", __LINE__)
264 #define TIL_LOCK(loc) loc.lock()
265 #define TIL_UNLOCK(loc) loc.unlock()
266 #define TILwait(n) TILwaitF(n)
287 unsigned &ib,
unsigned &iw,
bool &fast);
289 unsigned ib,
unsigned iw,
294 float &black,
float &white);
317 float sc,
float sh,
float gamma,
318 const char *lut,
float aspect,
320 bool use8bit,
bool hard_accel,
321 bool hardlut,
bool frag_shader);
339 operator void *() {
return myAligned; }
340 operator const void *() {
return myAligned; }
373 #endif // TIL_DEFINES_H
int PXLpackingComponents(PXL_Packing p)
TIL_API void TILgetBWPoints(TIL_DataFormat d, float b, float w, unsigned &ib, unsigned &iw, bool &fast)
int TILpackingComponents(PXL_Packing p)
unsigned int PXLwhitePoint(PXL_DataFormat dt)
TIL_API bool TILemulationNeeded(int comp, float b, float w, float sc, float sh, float gamma, const char *lut, float aspect, TIL_DataFormat type, bool use8bit, bool hard_accel, bool hardlut, bool frag_shader)
TIL_API bool TILcopyOrRefCompName(const char *&dname, const char *name)
TIL_API bool TILcopyOrRefPlaneName(const char *&dname, const char *name)
int TILpackingDepth(PXL_Packing p)
TIL_API bool TILcheckConstant(void *idata, TIL_DataFormat format, int xres, int yres)
unsigned int TILwhitePoint(PXL_DataFormat dt)
TIL_API void TILinitNameRefs()
GLint GLint GLsizei GLint GLenum format
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
int PXLpackingDepth(PXL_Packing p)
TIL_API void TILclearTotalWait()
TIL_API void TILgetFloatBWPoints(TIL_DataFormat d, unsigned ib, unsigned iw, float &b, float &w)
GLuint const GLchar * name
int TILformatDepth(PXL_DataFormat d)
GLboolean GLboolean GLboolean b
TIL_API void TILwaitF(int n, const char *file=0, int line=0)
TIL_API double TILgetTotalWait()
int PXLformatDepth(PXL_DataFormat d)
TIL_API void TILprintLockBlockStats()
TIL_API void TILparsePlaneName(const char *name, UT_String &pname, int &arrayindex)
GLubyte GLubyte GLubyte GLubyte w
TIL_API TIL_DataFormat TILformatConvert(IMG_DataType)
TIL_API void TILgetBestFormat(TIL_DataFormat d1, float b1, float w1, TIL_DataFormat d2, float b2, float w2, TIL_DataFormat &best, float &black, float &white)
til_AlignedBlock * myNext
TIL_API void TILlock(UT_Lock &lock, const char *file=0, int line=0)