46 #define PkDspyMaxMsgSize 131064 48 #define PkDspyServerMsgOpen (65 + 1) 49 #define PkDspyServerMsgImage (65 + 2) 50 #define PkDspyServerMsgData (65 + 3) 51 #define PkDspyServerMsgQuery (65 + 4) 52 #define PkDspyServerMsgClose (65 + 5) 53 #define PkDspyServerMsgDeepData (65 + 6) 54 #define PkDspyServerMsgActiveRegion (65 + 7) 55 #define PkDspyServerMsgMetadata (65 + 8) 56 #define PkDspyServerMsgMetadataPart (65 + 9) 66 #define PkDspyByteOrderNative PkDspyByteOrderHiLo 67 #elif defined(__mips64) 68 #define PkDspyByteOrderNative PkDspyByteOrderHiLo 69 #elif defined(__sparc) 70 #define PkDspyByteOrderNative PkDspyByteOrderHiLo 71 #elif defined(__alpha) 72 #define PkDspyByteOrderNative PkDspyByteOrderLoHi 73 #elif defined(__ppc__) 74 #define PkDspyByteOrderNative PkDspyByteOrderHiLo 76 #define PkDspyByteOrderNative PkDspyByteOrderLoHi 91 #define PkDspyClassFloat 1 92 #define PkDspyClassInt 2 95 #define PkDspyFloat32 1 96 #define PkDspyUnsigned32 2 97 #define PkDspySigned32 3 98 #define PkDspyUnsigned16 4 99 #define PkDspySigned16 5 100 #define PkDspyUnsigned8 6 101 #define PkDspySigned8 7 102 #define PkDspyArrayBegin 10 103 #define PkDspyArrayEnd 11 105 #define PkDspyMaskType 8191 107 #define PkDspyMaskOrder (PkDspyByteOrderHiLo | PkDspyByteOrderLoHi) 108 #define PkDspyShiftOrder 13 109 #define PkDspyByteOrderHiLo 8192 110 #define PkDspyByteOrderLoHi 16384 116 #define PkDspyOpenPortCount 1024 242 #define PkDspyFlagsWantsScanLineOrder 1 243 #define PkDspyFlagsWantsEmptyBuckets 2 244 #define PkDspyFlagsWantsNullEmptyBuckets 4 356 const char* filename,
int width,
int height,
362 int ymin,
int ymax_plus_one,
int entrysize,
363 const unsigned char* data);
366 int ymin,
int ymax_plus_one,
char* data,
int datasize,
371 int xmax_plus_one,
int ymin,
int ymax_plus_one);
380 const char* filename,
int width,
int height,
420 float* result,
int paramCount,
427 int* result,
int paramCount,
455 const char* filename,
int width,
int height,
int paramCount,
460 int ymax,
int entrysize,
const unsigned char* data);
468 const char* filename,
int width,
int height,
int paramCount,
479 int ymax,
char* data,
int datasize,
int* pixeloffsets,
484 int result = (int)value;
485 result = min > result ? min : result;
486 result = max < result ? max : result;
492 return u < 0.0031308f ? 12.92f * u : 1.055f * powf(u, 0.4167f) - 0.055f;
497 float const s_order[8][8] = {
601 if (dither) value += s_order[dy][dx] + 0.49999f;
602 int result = min + (int)floorf(value);
603 result = min > result ? min : result;
604 result = max < result ? max : result;
PRMANAPI PtDspyError DspyFindIntInParamList(RtConstString const string, int *result, int paramCount, const UserParameter *parameters)
PtDriverVersion
Definition: ndspy.h:389
char const * RtConstString
Definition: ri.h:85
PRMANEXPORT PtDspyError DspyImageDelayClose(PtDspyImageHandle)
PtDspyUnsigned32 ymax
Definition: ndspy.h:289
PtDspySigned32 xmin
Definition: ndspy.h:148
unsigned short PtDspyUnsigned16
Definition: ndspy.h:82
PRMANAPI void DspyError(const char *module, const char *fmt,...)
PtDspyUnsigned32 height
Definition: ndspy.h:269
PtDspySigned32 xmax
Definition: ndspy.h:149
PtDspyServerMessage msg
Definition: ndspy.h:276
char vcount
Definition: ndspy.h:346
char vtype
Definition: ndspy.h:346
int flags
Definition: ndspy.h:247
PRMANAPI PtDspyError DspyRegisterDriver(const char *name, const PtDspyOpenFuncPtr pOpen, const PtDspyWriteFuncPtr pWrite, const PtDspyCloseFuncPtr pClose, const PtDspyQueryFuncPtr pQuery)
float PtDspyFloat32
Definition: ndspy.h:63
PtDspyActiveRegionFuncPtr pActiveRegion
Definition: ndspy.h:402
PtDspyUnsigned32 ymin
Definition: ndspy.h:298
PRMANAPI PtDspyError DspyFindIntsInParamList(RtConstString const string, int *resultCount, int *result, int paramCount, const UserParameter *parameters)
PtDspyUnsigned32 ymax
Definition: ndspy.h:309
PtDspyError(* PtDspyFlushFuncPtr)(PtDspyImageHandle)
Definition: ndspy.h:377
PRMANEXPORT PtDspyError DspyMetadata(PtDspyImageHandle, char *metadata)
PtDspyServerMessage msg
Definition: ndspy.h:266
PtDspyQueryType query
Definition: ndspy.h:317
PtDspyUnsigned32 PtDspyMsgLen
Definition: ndspy.h:88
void * RtPointer
Definition: ri.h:69
#define PRMANAPI
Definition: prmanapi.h:124
PtDspyUnsigned32 id
Definition: ndspy.h:267
PtDspyUnsigned32 formatCount
Definition: ndspy.h:270
PtDspyGridStyle
Definition: ndspy.h:213
PtDspyError(* PtDspyWriteFuncPtr)(PtDspyImageHandle image, int xmin, int xmax_plus_one, int ymin, int ymax_plus_one, int entrysize, const unsigned char *data)
Definition: ndspy.h:361
int zero
Definition: ndspy.h:182
PtDspyUnsigned32 ymax
Definition: ndspy.h:299
PtDspyUnsigned32 xmax
Definition: ndspy.h:297
PtDspyError(* PtDspyCloseFuncPtr)(PtDspyImageHandle)
Definition: ndspy.h:375
PRMAN_INLINE int DspyQuantize(float value, int x, int y, int k, int min, int max, int dither)
Definition: ndspy.h:495
PtDspyUnsigned32 xmax
Definition: ndspy.h:307
PtDspyServerMessage msg
Definition: ndspy.h:315
PtDspyUnsigned32 ymin
Definition: ndspy.h:288
PRMANAPI void DspyMemReverseCopy(unsigned char *t, const unsigned char *s, int len)
void * PtDspyImageHandle
Definition: ndspy.h:250
PtDspyUnsigned32 xmin
Definition: ndspy.h:296
PRMANAPI PtDspyError DspyFindFloatInParamList(RtConstString const string, float *result, int paramCount, const UserParameter *parameters)
int driverWantsToQuantize
Definition: ndspy.h:184
PtDspyError
Definition: ndspy.h:231
#define PRMANEXPORT
Definition: prmanapi.h:94
PtDspyUnsigned32 peakkB
Definition: ndspy.h:189
PRMANEXPORT PtDspyError DspyImageDeepData(PtDspyImageHandle pvImage, int xmin, int xmax, int ymin, int ymax, char *data, int datasize, int *pixeloffsets, int *pixelsizes)
unsigned char PtDspyUnsigned8
Definition: ndspy.h:85
PtDspyError(* PtDspyQueryFuncPtr)(PtDspyImageHandle, PtDspyQueryType, int, void *)
Definition: ndspy.h:387
PRMANAPI PtDspyError DspyFindStringInParamList(RtConstString const string, char **result, int paramCount, const UserParameter *parameters)
PtDspyError(* PtDspyDelayCloseFuncPtr)(PtDspyImageHandle)
Definition: ndspy.h:385
int canCheckpoint
Definition: ndspy.h:162
int nbytes
Definition: ndspy.h:348
PtDspyMetadataFuncPtr pMetadata
Definition: ndspy.h:403
void * PtDspyOutput
Definition: ndspy.h:254
PtDspyServerMessage msg
Definition: ndspy.h:294
PRMANEXPORT PtDspyError DspyImageOpen(PtDspyImageHandle *image, const char *drivername, const char *filename, int width, int height, int paramCount, const UserParameter *parameters, int iFormatCount, PtDspyDevFormat *format, PtFlagStuff *flagstuff)
PtDspyUnsigned32 id
Definition: ndspy.h:277
PRMANAPI PtDspyError DspyReorderFormattingRE(int formatCount, PtDspyDevFormat *format, int outFormatCount, const PtDspyDevFormat *outFormat)
reorder incoming channels to match outFormat's order match incoming channels to outFormat's regex cha...
PRMANEXPORT PtDspyError DspyImageReopen(PtDspyImageHandle image, const char *drivername, const char *filename, int width, int height, int paramCount, const UserParameter *parameters, int iFormatCount, PtDspyDevFormat *format, PtFlagStuff *flagstuff)
PtDspyUnsigned32 x
Definition: ndspy.h:156
PRMAN_INLINE int DspyClamp(float value, int min, int max)
Definition: ndspy.h:482
PtDspyUnsigned8 overwrite
Definition: ndspy.h:133
PtDspyUnsigned32 paramCount
Definition: ndspy.h:279
int supportsGrids
Definition: ndspy.h:172
PtDspyBucketOrder
Definition: ndspy.h:220
PRMANEXPORT PtDspyError DspyImageQuery(PtDspyImageHandle, PtDspyQueryType, int, void *)
PtDspyUnsigned32 seconds
Definition: ndspy.h:194
RtConstString name
Definition: ndspy.h:345
void * PtDspyChannel
Definition: ndspy.h:252
int Version
Definition: ndspy.h:397
PtDspyCloseFuncPtr pClose
Definition: ndspy.h:400
PtDspyUnsigned8 redraw
Definition: ndspy.h:138
PtDspyUnsigned32 id
Definition: ndspy.h:259
PtDspyOpenFuncPtr pOpen
Definition: ndspy.h:398
PtDspyUnsigned8 rewrite
Definition: ndspy.h:143
PtDspyServerMessage msg
Definition: ndspy.h:304
float ditheramplitude
Definition: ndspy.h:183
PtDspySigned32 ymax
Definition: ndspy.h:151
PtDspyError(* PtDspyOpenFuncPtr)(PtDspyImageHandle *image, const char *drivername, const char *filename, int width, int height, int paramCount, const UserParameter *parameters, int iFormatCount, PtDspyDevFormat *format, PtFlagStuff *flagstuff)
Definition: ndspy.h:355
PtDspySigned32 ymin
Definition: ndspy.h:150
int supportsMultiResolution
Definition: ndspy.h:177
PtDspyUnsigned32 y
Definition: ndspy.h:157
PtDspyUnsigned32 formatCount
Definition: ndspy.h:278
PtDspyUnsigned32 height
Definition: ndspy.h:127
PtDspyError(* PtDspyDeepWriteFuncPtr)(PtDspyImageHandle image, int xmin, int xmax_plus_one, int ymin, int ymax_plus_one, char *data, int datasize, PtDspyUnsigned32 *pixeloffsets, PtDspyUnsigned32 *pixelsizes)
Definition: ndspy.h:365
PtDspyUnsigned32 width
Definition: ndspy.h:260
PtDspyError(* PtDspyActiveRegionFuncPtr)(PtDspyImageHandle image, int xmin, int xmax_plus_one, int ymin, int ymax_plus_one)
Definition: ndspy.h:370
PRMANAPI PtDspyError DspyReorderFormatting(int formatCount, PtDspyDevFormat *format, int outFormatCount, const PtDspyDevFormat *outFormat)
PtDspyServerMessage msg
Definition: ndspy.h:284
#define PRMAN_INLINE
Definition: prmanapi.h:99
PtDspyWriteFuncPtr pWrite
Definition: ndspy.h:399
PRMANAPI PtDspyError DspyFindMatrixInParamList(RtConstString const string, float *result, int paramCount, const UserParameter *parameters)
PRMANEXPORT PtDspyError DspyImageClose(PtDspyImageHandle)
PtDspyUnsigned32 xmin
Definition: ndspy.h:286
PtDspyFloat32 aspectRatio
Definition: ndspy.h:128
PtDspyUnsigned32 id
Definition: ndspy.h:285
PtDspyError(* PtDspyMetadataFuncPtr)(PtDspyImageHandle image, char *metadata)
Definition: ndspy.h:373
PRMANAPI int DspyGetNumberOfHosts()
double PtDspyFloat64
Definition: ndspy.h:62
int PtDspySigned32
Definition: ndspy.h:80
struct uparam UserParameter
PtDspyUnsigned32 PtDspyServerMessage
Definition: ndspy.h:89
PRMANEXPORT PtDspyError DspyImageActiveRegion(PtDspyImageHandle image, int xmin, int xmax, int ymin, int ymax)
PtDspyUnsigned32 width
Definition: ndspy.h:268
PtDspyUnsigned32 xmax
Definition: ndspy.h:287
PRMANAPI PtDspyError DspyRegisterDriverTable(const char *name, const PtDspyDriverFunctionTable *pTable)
PtDspyUnsigned32 id
Definition: ndspy.h:316
PtDspyQueryFuncPtr pQuery
Definition: ndspy.h:401
PtDspyUnsigned32 id
Definition: ndspy.h:295
PtDspyUnsigned32 height
Definition: ndspy.h:261
PtDspyServerMessage msg
Definition: ndspy.h:258
PtDspyUnsigned32 paramCount
Definition: ndspy.h:271
PtDspyUnsigned8 interactive
Definition: ndspy.h:134
PRMANAPI PtDspyError DspyFindFloatsInParamList(RtConstString const string, int *resultCount, float *result, int paramCount, const UserParameter *parameters)
PtDspyUnsigned32 id
Definition: ndspy.h:324
PtDspyUnsigned32 xmin
Definition: ndspy.h:306
PtDspyUnsigned32 length
Definition: ndspy.h:318
PRMAN_INLINE float DspyLinearTosRGB(float u)
Definition: ndspy.h:490
PRMANEXPORT PtDspyError DspyImageData(PtDspyImageHandle image, int xmin, int xmax, int ymin, int ymax, int entrysize, const unsigned char *data)
char PtDspySigned8
Definition: ndspy.h:86
short PtDspySigned16
Definition: ndspy.h:83
PtDspyQueryType
Definition: ndspy.h:197
PtDspyUnsigned32 width
Definition: ndspy.h:126
PtDspyUnsigned32 formatCount
Definition: ndspy.h:262
PRMANAPI void DspyMemReverse(unsigned char *t, int len)
PtDspyUnsigned32 ymin
Definition: ndspy.h:308
PtDspyError(* PtDspyReopenFuncPtr)(PtDspyImageHandle image, const char *drivername, const char *filename, int width, int height, int paramCount, const UserParameter *parameters, int iFormatCount, PtDspyDevFormat *format, PtFlagStuff *flagstuff)
Definition: ndspy.h:379
PtDspyUnsigned32 datasize
Definition: ndspy.h:310
unsigned int PtDspyUnsigned32
Definition: ndspy.h:79
RtPointer value
Definition: ndspy.h:347
PtDspyUnsigned32 id
Definition: ndspy.h:305
int supportsPointClouds
Definition: ndspy.h:167
PtDspyServerMessage msg
Definition: ndspy.h:323