21 #ifndef LUNCHBOX_COMPRESSOR_H
22 #define LUNCHBOX_COMPRESSOR_H
26 #include <lunchbox/thread.h>
30 namespace detail {
class Compressor; }
39 typedef detail::Compressor*
const Compressor::*bool_t;
58 LUNCHBOX_API
bool isGood()
const;
64 operator bool_t()
const {
return isGood() ? &Compressor::impl_ : 0; }
73 LUNCHBOX_API
bool uses(
const uint32_t name )
const;
94 const uint32_t tokenType,
95 const float minQuality,
96 const bool ignoreMSE );
114 const float minQuality,
const bool ignoreMSE );
120 LUNCHBOX_API
void clear();
129 LUNCHBOX_API
void compress(
void*
const in,
const uint64_t inDims[2] );
139 LUNCHBOX_API
void compress(
void*
const in,
const uint64_t pvp[4],
140 const uint64_t flags );
155 LUNCHBOX_API
void getResult( const
unsigned i,
void** const out,
156 uint64_t* const outSize ) const LB_DEPRECATED;
159 detail::Compressor* const impl_;
160 LB_TS_VAR( _thread );
163 #endif // LUNCHBOX_COMPRESSOR_H
A registry for loaded plugins.
Defines export visibility macros for Lunchbox.
Basic type definitions not provided by the operating system.
A C++ class to handle one compressor plugin instance.
LUNCHBOX_API unsigned getNumResults() const LB_DEPRECATED
static LUNCHBOX_API uint32_t choose(const PluginRegistry ®istry, const uint32_t tokenType, const float minQuality, const bool ignoreMSE)
Find the best compressor in all plugins for the given parameters.
LUNCHBOX_API CompressorResult getResult() const
LUNCHBOX_API void compress(void *const in, const uint64_t inDims[2])
Compress one-dimensional data.
LUNCHBOX_API bool uses(const uint32_t name) const
LUNCHBOX_API void clear()
Reset to EQ_COMPRESSOR_NONE.
Information about one compressor.
LUNCHBOX_API bool isGood() const
LUNCHBOX_API Compressor()
Construct a new, invalid compressor instance.
LUNCHBOX_API bool realloc()
Reallocate the current instance.
virtual LUNCHBOX_API ~Compressor()
Destruct the compressor.
LUNCHBOX_API bool setup(PluginRegistry &from, const uint32_t name)
Set up a new, named compressor instance.
LUNCHBOX_API const EqCompressorInfo & getInfo() const
A structure to hold the results from one compress operation.