plugins/compressor.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00043 #ifndef EQ_PLUGINS_COMPRESSOR
00044 #define EQ_PLUGINS_COMPRESSOR
00045
00047 #include <sys/types.h>
00048
00049 typedef unsigned long long eq_uint64_t;
00050
00051 #ifdef WIN32
00052 # ifdef EQ_PLUGIN_BUILD
00053 # define EQ_PLUGIN_API __declspec(dllexport)
00054 # else
00055 # define EQ_PLUGIN_API __declspec(dllimport)
00056 # endif
00057 #else // WIN32
00058 # define EQ_PLUGIN_API
00059 #endif
00060
00063 #ifdef __cplusplus
00064 extern "C"
00065 {
00066 #endif
00067
00071 #define EQ_COMPRESSOR_VERSION 1
00072
00073 #define EQ_COMPRESSOR_VERSION_1 1
00074
00085 #define EQ_COMPRESSOR_NONE 0x1u
00086
00087 #define EQ_COMPRESSOR_RLE_UNSIGNED 0x2u
00088
00089 #define EQ_COMPRESSOR_RLE_BYTE 0x3u
00090
00091 #define EQ_COMPRESSOR_RLE_3_BYTE 0x4u
00092
00093 #define EQ_COMPRESSOR_RLE_4_BYTE 0x5u
00094
00095 #define EQ_COMPRESSOR_RLE_4_FLOAT 0x6u
00096
00097 #define EQ_COMPRESSOR_RLE_4_HALF_FLOAT 0x7u
00098
00099 #define EQ_COMPRESSOR_DIFF_RLE_3_BYTE 0x8u
00100
00101 #define EQ_COMPRESSOR_DIFF_RLE_4_BYTE 0x9u
00102
00103 #define EQ_COMPRESSOR_RLE_4_BYTE_UNSIGNED 0xau
00104
00112 #define EQ_COMPRESSOR_PRIVATE 0xefffffffu
00113
00124 #define EQ_COMPRESSOR_DATATYPE_BYTE 1
00125
00126 #define EQ_COMPRESSOR_DATATYPE_UNSIGNED 2
00127
00128 #define EQ_COMPRESSOR_DATATYPE_HALF_FLOAT 3
00129
00130 #define EQ_COMPRESSOR_DATATYPE_FLOAT 4
00131
00132
00134 #define EQ_COMPRESSOR_DATATYPE_3_BYTE 1024
00135
00136 #define EQ_COMPRESSOR_DATATYPE_4_BYTE 1025
00137
00138 #define EQ_COMPRESSOR_DATATYPE_3_HALF_FLOAT 1026
00139
00140 #define EQ_COMPRESSOR_DATATYPE_4_HALF_FLOAT 1027
00141
00142 #define EQ_COMPRESSOR_DATATYPE_3_FLOAT 1028
00143
00144 #define EQ_COMPRESSOR_DATATYPE_4_FLOAT 1029
00145
00146 #define EQ_COMPRESSOR_DATATYPE_3BYTE_1BYTE 2048
00147
00161 #define EQ_COMPRESSOR_INPLACE 1
00162
00166 #define EQ_COMPRESSOR_DATA_1D 2
00167
00172 #define EQ_COMPRESSOR_DATA_2D 4
00173
00178 #define EQ_COMPRESSOR_IGNORE_MSE 8
00179
00184 struct EqCompressorInfo
00185 {
00193 unsigned version;
00194
00196 unsigned name;
00198 unsigned tokenType;
00200 eq_uint64_t capabilities;
00202 float quality;
00204 float ratio;
00206 float speed;
00207 };
00208
00210 EQ_PLUGIN_API size_t EqCompressorGetNumCompressors();
00212 EQ_PLUGIN_API void EqCompressorGetInfo( const size_t n,
00213 EqCompressorInfo* const info );
00228 EQ_PLUGIN_API void* EqCompressorNewCompressor( const unsigned name );
00234 EQ_PLUGIN_API void EqCompressorDeleteCompressor( void* const compressor );
00235
00248 EQ_PLUGIN_API void* EqCompressorNewDecompressor( const unsigned name );
00254 EQ_PLUGIN_API void EqCompressorDeleteDecompressor(void* const decompressor);
00281 EQ_PLUGIN_API void EqCompressorCompress( void* const compressor,
00282 const unsigned name,
00283 void* const in,
00284 const eq_uint64_t* inDims,
00285 const eq_uint64_t flags );
00286
00297 EQ_PLUGIN_API unsigned EqCompressorGetNumResults( void* const compressor,
00298 const unsigned name );
00299
00309 EQ_PLUGIN_API void EqCompressorGetResult( void* const compressor,
00310 const unsigned name,
00311 const unsigned i,
00312 void** const out,
00313 eq_uint64_t* const outSize );
00314
00333 EQ_PLUGIN_API void EqCompressorDecompress( void* const decompressor,
00334 const unsigned name,
00335 const void* const* in,
00336 const eq_uint64_t* const inSizes,
00337 const unsigned numInputs,
00338 void* const out,
00339 eq_uint64_t* const outDims,
00340 const eq_uint64_t flags );
00342 #ifdef __cplusplus
00343 }
00344 #endif
00345 #endif // EQ_PLUGINS_COMPRESSOR