21.02
|
Class describing the value of a pixel for any image format. More...
#include <PixelValue.h>
Public Member Functions | |
PixelValue () | |
Default constructor: value initialized to 0. More... | |
PixelValue (double v, DataType datatype, QuantizationInfo qinfo=QuantizationInfo()) | |
Initialize the union with a pixel value of chosen datatype. More... | |
PixelValue (int8_t v) | |
Initialize the union with a S8 pixel value. More... | |
PixelValue (uint8_t v) | |
Initialize the union with a U8 pixel value. More... | |
PixelValue (uint16_t v) | |
Initialize the union with a U16 pixel value. More... | |
PixelValue (int16_t v) | |
Initialize the union with a S16 pixel value. More... | |
PixelValue (uint32_t v) | |
Initialize the union with a U32 pixel value. More... | |
PixelValue (int32_t v) | |
Initialize the union with a S32 pixel value. More... | |
PixelValue (uint64_t v) | |
Initialize the union with a U64 pixel value. More... | |
PixelValue (int64_t v) | |
Initialize the union with a S64 pixel value. More... | |
PixelValue (bfloat16 v) | |
Initialize the union with a BFLOAT16 pixel value. More... | |
PixelValue (half v) | |
Initialize the union with a F16 pixel value. More... | |
PixelValue (float v) | |
Initialize the union with a F32 pixel value. More... | |
PixelValue (double v) | |
Initialize the union with a F64 pixel value. More... | |
void | get (uint8_t &v) const |
Interpret the pixel value as a U8. More... | |
void | get (int8_t &v) const |
Interpret the pixel value as a S8. More... | |
void | get (uint16_t &v) const |
Interpret the pixel value as a U16. More... | |
void | get (int16_t &v) const |
Interpret the pixel value as a S16. More... | |
void | get (uint32_t &v) const |
Interpret the pixel value as a U32. More... | |
void | get (int32_t &v) const |
Interpret the pixel value as a S32. More... | |
void | get (uint64_t &v) const |
Interpret the pixel value as a U64. More... | |
void | get (int64_t &v) const |
Interpret the pixel value as a S64. More... | |
void | get (bfloat16 &v) const |
Interpret the pixel value as a BFLOAT16. More... | |
void | get (half &v) const |
Interpret the pixel value as a F16. More... | |
void | get (float &v) const |
Interpret the pixel value as a F32. More... | |
void | get (double &v) const |
Interpret the pixel value as a double. More... | |
template<typename T > | |
T | get () const |
Get the pixel value. More... | |
Data Fields | |
union { | |
uint64_t u64 | |
Single channel U64. More... | |
int64_t s64 | |
Single channel S64. More... | |
uint8_t rgb [3] | |
3 channels: RGB888 More... | |
uint8_t yuv [3] | |
3 channels: Any YUV format More... | |
uint8_t rgbx [4] | |
4 channels: RGBX8888 More... | |
double f64 | |
Single channel double. More... | |
float f32 | |
Single channel float 32. More... | |
half f16 | |
Single channel F16. More... | |
bfloat16 bf16 | |
Single channel brain floating-point number. More... | |
uint8_t u8 | |
Single channel U8. More... | |
int8_t s8 | |
Single channel S8. More... | |
uint16_t u16 | |
Single channel U16. More... | |
int16_t s16 | |
Single channel S16. More... | |
uint32_t u32 | |
Single channel U32. More... | |
int32_t s32 | |
Single channel S32. More... | |
} | value |
Union which describes the value of a pixel for any image format. More... | |
Class describing the value of a pixel for any image format.
Definition at line 34 of file PixelValue.h.
|
inline |
Default constructor: value initialized to 0.
Definition at line 38 of file PixelValue.h.
|
inline |
Initialize the union with a pixel value of chosen datatype.
[in] | v | value. |
[in] | datatype | DataType that v have to be stored |
[in] | qinfo | (Optional) QuantizationInfo to apply in case of quantized data types to v |
Definition at line 48 of file PixelValue.h.
References arm_compute::BFLOAT16, arm_compute::F16, arm_compute::F32, arm_compute::F64, arm_compute::QASYMM16, arm_compute::QASYMM8, arm_compute::QASYMM8_SIGNED, arm_compute::test::validation::qinfo, arm_compute::QSYMM16, arm_compute::QSYMM8, arm_compute::quantize_qasymm16(), arm_compute::quantize_qasymm8(), arm_compute::quantize_qasymm8_signed(), arm_compute::quantize_qsymm16(), arm_compute::quantize_qsymm8(), arm_compute::S16, arm_compute::S32, arm_compute::S64, arm_compute::S8, arm_compute::U16, arm_compute::U32, arm_compute::U64, arm_compute::U8, and PixelValue::value.
|
inline |
Initialize the union with a S8 pixel value.
[in] | v | S8 value. |
Definition at line 111 of file PixelValue.h.
References PixelValue::value.
|
inline |
Initialize the union with a U8 pixel value.
[in] | v | U8 value. |
Definition at line 120 of file PixelValue.h.
References PixelValue::value.
|
inline |
Initialize the union with a U16 pixel value.
[in] | v | U16 value. |
Definition at line 129 of file PixelValue.h.
References PixelValue::value.
|
inline |
Initialize the union with a S16 pixel value.
[in] | v | S16 value. |
Definition at line 138 of file PixelValue.h.
References PixelValue::value.
|
inline |
Initialize the union with a U32 pixel value.
[in] | v | U32 value. |
Definition at line 147 of file PixelValue.h.
References PixelValue::value.
|
inline |
Initialize the union with a S32 pixel value.
[in] | v | S32 value. |
Definition at line 156 of file PixelValue.h.
References PixelValue::value.
|
inline |
Initialize the union with a U64 pixel value.
[in] | v | U64 value. |
Definition at line 166 of file PixelValue.h.
References PixelValue::value.
|
inline |
Initialize the union with a S64 pixel value.
[in] | v | S64 value. |
Definition at line 175 of file PixelValue.h.
References PixelValue::value.
|
inline |
Initialize the union with a BFLOAT16 pixel value.
[in] | v | F16 value. |
Definition at line 184 of file PixelValue.h.
References PixelValue::value.
|
inline |
Initialize the union with a F16 pixel value.
[in] | v | F16 value. |
Definition at line 193 of file PixelValue.h.
References PixelValue::value.
|
inline |
Initialize the union with a F32 pixel value.
[in] | v | F32 value. |
Definition at line 202 of file PixelValue.h.
References PixelValue::value.
|
inline |
Initialize the union with a F64 pixel value.
[in] | v | F64 value. |
Definition at line 211 of file PixelValue.h.
References PixelValue::value.
|
inline |
Interpret the pixel value as a U8.
[out] | v | Returned value |
Definition at line 241 of file PixelValue.h.
References PixelValue::value.
Referenced by RandomAccessor::access_tensor(), CLDirectConvolutionLayerKernel::configure(), and arm_compute::test::validation::reference::pad_layer().
|
inline |
Interpret the pixel value as a S8.
[out] | v | Returned value |
Definition at line 249 of file PixelValue.h.
References PixelValue::value.
|
inline |
Interpret the pixel value as a U16.
[out] | v | Returned value |
Definition at line 257 of file PixelValue.h.
References PixelValue::value.
|
inline |
Interpret the pixel value as a S16.
[out] | v | Returned value |
Definition at line 265 of file PixelValue.h.
References PixelValue::value.
|
inline |
Interpret the pixel value as a U32.
[out] | v | Returned value |
Definition at line 273 of file PixelValue.h.
References PixelValue::value.
|
inline |
Interpret the pixel value as a S32.
[out] | v | Returned value |
Definition at line 281 of file PixelValue.h.
References PixelValue::value.
|
inline |
Interpret the pixel value as a U64.
[out] | v | Returned value |
Definition at line 289 of file PixelValue.h.
References PixelValue::value.
|
inline |
Interpret the pixel value as a S64.
[out] | v | Returned value |
Definition at line 297 of file PixelValue.h.
References PixelValue::value.
|
inline |
Interpret the pixel value as a BFLOAT16.
[out] | v | Returned value |
Definition at line 305 of file PixelValue.h.
References PixelValue::value.
|
inline |
Interpret the pixel value as a F16.
[out] | v | Returned value |
Definition at line 313 of file PixelValue.h.
References PixelValue::value.
|
inline |
Interpret the pixel value as a F32.
[out] | v | Returned value |
Definition at line 321 of file PixelValue.h.
References PixelValue::value.
|
inline |
Interpret the pixel value as a double.
[out] | v | Returned value |
Definition at line 329 of file PixelValue.h.
References PixelValue::value.
|
inline |
bfloat16 bf16 |
Single channel brain floating-point number.
Definition at line 229 of file PixelValue.h.
half f16 |
Single channel F16.
Definition at line 228 of file PixelValue.h.
float f32 |
Single channel float 32.
Definition at line 227 of file PixelValue.h.
double f64 |
Single channel double.
Definition at line 226 of file PixelValue.h.
uint8_t rgb[3] |
3 channels: RGB888
Definition at line 223 of file PixelValue.h.
uint8_t rgbx[4] |
4 channels: RGBX8888
Definition at line 225 of file PixelValue.h.
int16_t s16 |
Single channel S16.
Definition at line 233 of file PixelValue.h.
int32_t s32 |
Single channel S32.
Definition at line 235 of file PixelValue.h.
int64_t s64 |
Single channel S64.
Definition at line 222 of file PixelValue.h.
int8_t s8 |
Single channel S8.
Definition at line 231 of file PixelValue.h.
uint16_t u16 |
Single channel U16.
Definition at line 232 of file PixelValue.h.
uint32_t u32 |
Single channel U32.
Definition at line 234 of file PixelValue.h.
uint64_t u64 |
Single channel U64.
Definition at line 221 of file PixelValue.h.
uint8_t u8 |
Single channel U8.
Definition at line 230 of file PixelValue.h.
union { ... } value |
Union which describes the value of a pixel for any image format.
Use the field corresponding to the image format
Referenced by PixelValue::get(), PixelValue::PixelValue(), and CpuFillKernel::run_op().
uint8_t yuv[3] |
3 channels: Any YUV format
Definition at line 224 of file PixelValue.h.