QUANTIZER_VALUES Class Reference
Quantizer to apply scale/offset values.
More...
#include <mi32/quantizer.h>
List of all members.
Detailed Description
Quantizer to apply scale/offset values.
Retains scales for both directions to avoid floating-point division for maximum efficiency.
Constructor & Destructor Documentation
| QUANTIZER_VALUES::QUANTIZER_VALUES |
( |
|
) |
[inline] |
Default constructor, uses scale of 1 and offset of 0.
| QUANTIZER_VALUES::QUANTIZER_VALUES |
( |
double |
ScaleQtoD, |
|
|
double |
OffsetQtoD | |
|
) |
| | [inline] |
Construct with scale and offset.
- Parameters:
-
| ScaleQtoD | Scale from "quantized" to "dequantized" must not be 0 |
| OffsetQtoD | Offset from "quantized" to "dequantized", applied after scaling |
Member Function Documentation
| double QUANTIZER_VALUES::CalcDouble |
( |
double |
ValueQ |
) |
const [inline] |
Calculate "dequantized" value from quantized value, applying scale and offset.
- Parameters:
-
| ValueQ | Quantized (integer) value |
| INT16 QUANTIZER_VALUES::CalcPrecision |
( |
|
) |
const [inline] |
Calculate precision (number of decimal places) based on scale.
| double QUANTIZER_VALUES::CalcRaw |
( |
double |
ValueD |
) |
const [inline] |
Calculate "raw" value with quantization scale/offset removed, with no rounding.
- Parameters:
-
| double QUANTIZER_VALUES::GetOffset |
( |
|
) |
const [inline] |
Get offset from "quantized" to "dequantized", applied after scaling.
| double QUANTIZER_VALUES::GetScale |
( |
|
) |
const [inline] |
Get scale from "quantized" to "dequantized".
| void QUANTIZER_VALUES::Set |
( |
double |
ScaleQtoD, |
|
|
double |
OffsetQtoD | |
|
) |
| | [inline] |
Set scale and offset values.
- Parameters:
-
| ScaleQtoD | Scale from "quantized" to "dequantized" must not be 0 |
| OffsetQtoD | Offset from "quantized" to "dequantized", applied after scaling |
| void QUANTIZER_VALUES::SetOffset |
( |
double |
OffsetQtoD |
) |
[inline] |
Set offset.
- Parameters:
-
| OffsetQtoD | Offset from "quantized" to "dequantized", applied after scaling |
| void QUANTIZER_VALUES::SetScale |
( |
double |
ScaleQtoD |
) |
[inline] |
Set scale from "quantized" to "dequantized".
- Parameters:
-
| ScaleQtoD | Scale from "quantized" to "dequantized" must not be 0 |
The documentation for this class was generated from the following file: