A C++ class to handle one compressor plugin instance.
More...
#include <compressor.h>
Public Member Functions |
| Compressor () |
| Construct a new, invalid compressor instance.
|
| Compressor (PluginRegistry &from, const uint32_t name) |
| Construct a new, named compressor instance.
|
virtual | ~Compressor () |
| Destruct the compressor.
|
bool | isGood () 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.
|
bool | setup (PluginRegistry ®istry, const uint32_t tokenType, const float minQuality, const bool ignoreMSE) |
| Set up a new, auto-selected compressor instance.
|
bool | realloc () |
| Reallocate the current instance.
|
void | clear () |
| Reset to EQ_COMPRESSOR_NONE.
|
void | compress (void *const in, const uint64_t inDims[2]) |
| Compress one-dimensional data.
|
void | compress (void *const in, const uint64_t pvp[4], const uint64_t flags) |
| Compress two-dimensional data.
|
unsigned | getNumResults () const |
void | getResult (const unsigned i, void **const out, uint64_t *const outSize) const |
| Get one compressed chunk of the last compression.
|
Static Public Member Functions |
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.
|
Detailed Description
A C++ class to handle one compressor plugin instance.
Definition at line 33 of file compressor.h.
Constructor & Destructor Documentation
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
Member Function Documentation
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 number of compressed chunks of the last compression.
- Version
- 1.7.1
void lunchbox::Compressor::getResult |
( |
const unsigned |
i, |
|
|
void **const |
out, |
|
|
uint64_t *const |
outSize |
|
) |
| const |
Get one compressed chunk of the last compression.
- Parameters
-
i | the result index to return. |
out | the return value to store the result pointer |
outSize | the return value to store the result size in bytes |
- Version
- 1.7.1
bool lunchbox::Compressor::isGood |
( |
| ) |
const |
- Returns
- true if the instance is usable.
- Version
- 1.7.1
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: