A C++ class to handle one compressor plugin instance.
More...
#include <compressor.h>
|
| Compressor () |
| Construct a new, invalid compressor instance. More...
|
|
| Compressor (PluginRegistry &from, const uint32_t name) |
| Construct a new, named compressor instance. More...
|
|
virtual | ~Compressor () |
| Destruct the compressor. More...
|
|
bool | isGood () const |
|
| operator bool_t () const |
|
bool | operator! () const |
|
bool | uses (const uint32_t name) const |
|
const EqCompressorInfo & | getInfo () const |
|
bool | setup (PluginRegistry &from, const uint32_t name) |
| Set up a new, named compressor instance. More...
|
|
bool | setup (PluginRegistry ®istry, const uint32_t tokenType, const float minQuality, const bool ignoreMSE) |
| Set up a new, auto-selected compressor instance. More...
|
|
bool | realloc () |
| Reallocate the current instance. More...
|
|
void | clear () |
| Reset to EQ_COMPRESSOR_NONE. More...
|
|
void | compress (void *const in, const uint64_t inDims[2]) |
| Compress one-dimensional data. More...
|
|
void | compress (void *const in, const uint64_t pvp[4], const uint64_t flags) |
| Compress two-dimensional data. More...
|
|
unsigned | getNumResults () const LB_DEPRECATED |
|
CompressorResult | getResult () const |
|
void | getResult (const unsigned i, void **const out, uint64_t *const outSize) const LB_DEPRECATED |
|
|
static 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. More...
|
|
A C++ class to handle one compressor plugin instance.
Example:
Definition at line 37 of file compressor.h.
lunchbox::Compressor::Compressor |
( |
| ) |
|
Construct a new, invalid compressor instance.
- Version
- 1.7.1
lunchbox::Compressor::Compressor |
( |
PluginRegistry & |
from, |
|
|
const uint32_t |
name |
|
) |
| |
Construct a new, named compressor instance.
- Parameters
-
from | the plugin registry |
name | the name of the compressor |
- Version
- 1.7.1
virtual lunchbox::Compressor::~Compressor |
( |
| ) |
|
|
virtual |
Destruct the compressor.
- Version
- 1.7.1
static uint32_t lunchbox::Compressor::choose |
( |
const PluginRegistry & |
registry, |
|
|
const uint32_t |
tokenType, |
|
|
const float |
minQuality, |
|
|
const bool |
ignoreMSE |
|
) |
| |
|
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
-
registry | the plugin registry to choose from. |
tokenType | the structure of the data to compress. |
minQuality | minimal quality of the compressed data, with 0 = no quality and 1 = full quality, no loss. |
ignoreMSE | the most-significant element of a four-element token can be ignored, typically the alpha channel of an image. |
- Returns
- the name of the chosen compressor.
- Version
- 1.7.1
void lunchbox::Compressor::clear |
( |
| ) |
|
Reset to EQ_COMPRESSOR_NONE.
- Version
- 1.7.1
void lunchbox::Compressor::compress |
( |
void *const |
in, |
|
|
const uint64_t |
inDims[2] |
|
) |
| |
Compress one-dimensional data.
- Parameters
-
in | the pointer to the input data. |
inDims | the dimensions of the input data |
- Version
- 1.7.1
void lunchbox::Compressor::compress |
( |
void *const |
in, |
|
|
const uint64_t |
pvp[4], |
|
|
const uint64_t |
flags |
|
) |
| |
Compress two-dimensional data.
- Parameters
-
in | the pointer to the input data. |
pvp | the dimensions of the input data |
flags | capability flags for the compression |
- Version
- 1.7.1
- Returns
- the information about the allocated instance.
- Version
- 1.7.1
unsigned lunchbox::Compressor::getNumResults |
( |
| ) |
const |
- Returns
- the result of the last compression.
- Version
- 1.9.1
void lunchbox::Compressor::getResult |
( |
const unsigned |
i, |
|
|
void **const |
out, |
|
|
uint64_t *const |
outSize |
|
) |
| const |
bool lunchbox::Compressor::isGood |
( |
| ) |
const |
lunchbox::Compressor::operator bool_t |
( |
| ) |
const |
|
inline |
- Returns
- true if the instance is usable, false otherwise.
- Version
- 1.9.1
Definition at line 64 of file compressor.h.
References isGood().
bool lunchbox::Compressor::operator! |
( |
| ) |
const |
|
inline |
- Returns
- true if the instance is not usable.
- Version
- 1.9.1
Definition at line 67 of file compressor.h.
References isGood().
bool lunchbox::Compressor::realloc |
( |
| ) |
|
Reallocate the current instance.
- Version
- 1.7.1
bool lunchbox::Compressor::setup |
( |
PluginRegistry & |
from, |
|
|
const uint32_t |
name |
|
) |
| |
Set up a new, named compressor instance.
- Parameters
-
from | the plugin registry. |
name | the name of the compressor. |
- Returns
- true on success, false otherwise.
- Version
- 1.7.1
bool lunchbox::Compressor::setup |
( |
PluginRegistry & |
registry, |
|
|
const uint32_t |
tokenType, |
|
|
const float |
minQuality, |
|
|
const bool |
ignoreMSE |
|
) |
| |
Set up a new, auto-selected compressor instance.
- See also
- choose() for parameters.
- Version
- 1.7.1
bool lunchbox::Compressor::uses |
( |
const uint32_t |
name | ) |
const |
- Returns
- true if the instance is usable for the given name.
- Version
- 1.7.1
The documentation for this class was generated from the following file: