compressorRLE4HF.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef EQ_PLUGIN_COMPRESSORRLE4HF
00021 #define EQ_PLUGIN_COMPRESSORRLE4HF
00022
00023 #include "compressor.h"
00024
00025 namespace eq
00026 {
00027 namespace plugin
00028 {
00029 class CompressorRLE4HF : public Compressor
00030 {
00031 public:
00032 CompressorRLE4HF() {}
00033 virtual ~CompressorRLE4HF() {}
00034
00035 virtual void compress( const void* const inData, const eq_uint64_t nPixels,
00036 const bool useAlpha )
00037 { compress( inData, nPixels, useAlpha, false ); }
00038
00039 static void decompress( const void* const* inData,
00040 const eq_uint64_t* const inSizes,
00041 const unsigned nInputs, void* const outData,
00042 const eq_uint64_t nPixels, const bool useAlpha );
00043
00044
00045 static void* getNewCompressor( ){ return new eq::plugin::CompressorRLE4HF; }
00046 static void* getNewDecompressor( ){ return 0; }
00047
00048 static void getInfo( EqCompressorInfo* const info )
00049 {
00050 info->version = EQ_COMPRESSOR_VERSION;
00051 info->name = EQ_COMPRESSOR_RLE_4_HALF_FLOAT;
00052 info->capabilities = EQ_COMPRESSOR_DATA_1D | EQ_COMPRESSOR_DATA_2D |
00053 EQ_COMPRESSOR_IGNORE_MSE;
00054 info->tokenType = EQ_COMPRESSOR_DATATYPE_4_HALF_FLOAT;
00055 info->quality = 1.f;
00056 info->ratio = .45f;
00057 info->speed = 1.f;
00058 }
00059
00060 static Functions getFunctions()
00061 {
00062 Functions functions;
00063 functions.name = EQ_COMPRESSOR_RLE_4_HALF_FLOAT;
00064 functions.getInfo = getInfo;
00065 functions.newCompressor = getNewCompressor;
00066 functions.decompress = decompress;
00067 return functions;
00068 }
00069
00070 protected:
00071 void compress( const void* const inData, const eq_uint64_t nPixels,
00072 const bool useAlpha, const bool swizzle );
00073 };
00074
00075 }
00076 }
00077 #endif // EQ_PLUGIN_COMPRESSORRLE4HF