compressorRLE4BU.h

00001 
00002 /* Copyright (c) 2009, Stefan Eilemann <eile@equalizergraphics.com>
00003  *               2009, Makhinya Maxim
00004  *
00005  * This library is free software; you can redistribute it and/or modify it under
00006  * the terms of the GNU Lesser General Public License version 2.1 as published
00007  * by the Free Software Foundation.
00008  *  
00009  * This library is distributed in the hope that it will be useful, but WITHOUT
00010  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00011  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00012  * details.
00013  * 
00014  * You should have received a copy of the GNU Lesser General Public License
00015  * along with this library; if not, write to the Free Software Foundation, Inc.,
00016  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00017  */
00018 
00019  
00020 #ifndef EQ_PLUGIN_COMPRESSORRLE4BU
00021 #define EQ_PLUGIN_COMPRESSORRLE4BU
00022 
00023 #include "compressor.h"
00024 
00025 namespace eq
00026 {
00027 namespace plugin
00028 {
00029 class CompressorRLE4BU : public Compressor
00030 {
00031 public:
00032     CompressorRLE4BU() {}
00033     virtual ~CompressorRLE4BU() {}
00034 
00035     virtual void compress( const void* const inData, const eq_uint64_t nPixels, 
00036                            const bool useAlpha );
00037 
00038     static void decompress( const void* const* inData, 
00039                             const eq_uint64_t* const inSizes, 
00040                             const unsigned nInputs, void* const outData, 
00041                             const eq_uint64_t nPixels, const bool useAlpha );
00042 
00043     static void* getNewCompressor( ){ return new eq::plugin::CompressorRLE4BU; }
00044     static void* getNewDecompressor( ){ return 0; }
00045 
00046     static void getInfo( EqCompressorInfo* const info )
00047     {
00048         info->version       = EQ_COMPRESSOR_VERSION;
00049         info->name          = EQ_COMPRESSOR_RLE_4_BYTE_UNSIGNED;
00050         info->capabilities  = EQ_COMPRESSOR_DATA_1D | EQ_COMPRESSOR_DATA_2D;
00051         info->tokenType     = EQ_COMPRESSOR_DATATYPE_4_BYTE;
00052         info->quality       = 1.f;
00053         info->ratio         =  .89f;
00054         info->speed         = 2.11f;
00055     }
00056 
00057     static Functions getFunctions()
00058     {
00059         Functions functions;
00060         functions.name          = EQ_COMPRESSOR_RLE_4_BYTE_UNSIGNED;
00061         functions.getInfo       = getInfo;
00062         functions.newCompressor = getNewCompressor;
00063         functions.decompress    = decompress;
00064         return functions;
00065     }
00066 };
00067 
00068 }
00069 }
00070 #endif // EQ_PLUGIN_COMPRESSORRLE4BU
Generated on Mon Aug 10 18:58:32 2009 for Equalizer 0.9 by  doxygen 1.5.8