Equalizer  1.4.1
Public Member Functions | Static Public Member Functions
co::CPUCompressor Class Reference
+ Inheritance diagram for co::CPUCompressor:
+ Collaboration diagram for co::CPUCompressor:

List of all members.

Public Member Functions

 CPUCompressor ()
 Construct a new CPU-based compressor.
CO_API void compress (void *const in, const uint64_t inDims[2])
 Compress one-dimensional data.
CO_API void compress (void *const in, const uint64_t pvp[4], const eq_uint64_t flags)
 Compress two-dimensional data.
CO_API unsigned getNumResults () const
CO_API void getResult (const unsigned i, void **const out, uint64_t *const outSize) const
 Get one compressed chunk.
CO_API void decompress (const void *const *in, const uint64_t *const inSizes, const unsigned numInputs, void *const out, uint64_t outDim[2])
 Decompress one-dimensional data.
CO_API void decompress (const void *const *in, const uint64_t *const inSizes, const unsigned numInputs, void *const out, uint64_t pvpOut[4], const uint64_t flags)
 Decompress two-dimensional data.
CO_API bool initCompressor (const uint32_t dataType, const float quality, const bool ignoreMSE=false)
 Find and init the best compressor in all plugins for the given parameters.

Static Public Member Functions

static CO_API uint32_t chooseCompressor (const uint32_t tokenType, const float minQuality=1.0f, const bool ignoreMSE=false)
 Find the best compressor in all plugins for the given parameters.

Detailed Description

Definition at line 28 of file cpuCompressor.h.


Member Function Documentation

static CO_API uint32_t co::CPUCompressor::chooseCompressor ( const uint32_t  tokenType,
const float  minQuality = 1.0f,
const bool  ignoreMSE = false 
) [static]

Find the best compressor in all plugins for the given parameters.

This convenience method searches all compressors in all plugins to find the compressor which matches best the given parameters.

Parameters:
tokenTypethe structure of the data to compress.
minQualityminimal quality of the compressed data, with 0 = no quality and 1 = full quality, no loss.
ignoreMSEthe most-significant element of each token can be ignored, typically the alpha channel of an image.
CO_API void co::CPUCompressor::compress ( void *const  in,
const uint64_t  inDims[2] 
)

Compress one-dimensional data.

Parameters:
inthe pointer to the input data.
inDimsthe dimensions of the input data
CO_API void co::CPUCompressor::compress ( void *const  in,
const uint64_t  pvp[4],
const eq_uint64_t  flags 
)

Compress two-dimensional data.

Parameters:
inthe pointer to the input data.
pvpthe dimensions of the input data
flagscapability flags for the compression
CO_API void co::CPUCompressor::decompress ( const void *const *  in,
const uint64_t *const  inSizes,
const unsigned  numInputs,
void *const  out,
uint64_t  outDim[2] 
)

Decompress one-dimensional data.

Parameters:
inthe pointer to an array of input data pointers
inSizesthe array of input data sizes in bytes
numInputsthe number of input data elements
outthe pointer to a pre-allocated buffer for the uncompressed output result.
outDimthe dimensions of the output data.
CO_API void co::CPUCompressor::decompress ( const void *const *  in,
const uint64_t *const  inSizes,
const unsigned  numInputs,
void *const  out,
uint64_t  pvpOut[4],
const uint64_t  flags 
)

Decompress two-dimensional data.

Parameters:
inthe pointer to an array of input data pointers
inSizesthe array of input data sizes in bytes
numInputsthe number of input data elements
outthe pointer to a pre-allocated buffer for the uncompressed output result.
pvpOutthe dimensions of the output data.
flagscapability flags for the decompression.
CO_API unsigned co::CPUCompressor::getNumResults ( ) const
Returns:
the number of compressed chunks.
CO_API void co::CPUCompressor::getResult ( const unsigned  i,
void **const  out,
uint64_t *const  outSize 
) const

Get one compressed chunk.

Parameters:
ithe result index to return.
outthe return value to store the result pointer
outSizethe return value to store the result size in bytes
CO_API bool co::CPUCompressor::initCompressor ( const uint32_t  dataType,
const float  quality,
const bool  ignoreMSE = false 
)

Find and init the best compressor in all plugins for the given parameters.

Parameters:
dataTypethe structure of the data to compress.
qualityminimal quality of the compressed data, with 0 = no quality and 1 = full quality, no loss.
ignoreMSEthe most-significant element of each token can be ignored, typically the alpha channel of an image.
Returns:
true if a compressor was found, false otherwise.

The documentation for this class was generated from the following file:
Generated on Mon Nov 26 2012 14:41:50 for Equalizer 1.4.1 by  doxygen 1.7.6.1