23.11
|
Class describing the value of a pixel for any image format. More...
#include <PixelValue.h>
Public Member Functions | |
PixelValue () noexcept | |
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 35 of file PixelValue.h.
|
inlinenoexcept |
Default constructor: value initialized to 0.
Definition at line 39 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 110 of file PixelValue.h.
References PixelValue::value.
|
inline |
Initialize the union with a U8 pixel value.
[in] | v | U8 value. |
Definition at line 118 of file PixelValue.h.
References PixelValue::value.
|
inline |
Initialize the union with a U16 pixel value.
[in] | v | U16 value. |
Definition at line 126 of file PixelValue.h.
References PixelValue::value.
|
inline |
Initialize the union with a S16 pixel value.
[in] | v | S16 value. |
Definition at line 134 of file PixelValue.h.
References PixelValue::value.
|
inline |
Initialize the union with a U32 pixel value.
[in] | v | U32 value. |
Definition at line 142 of file PixelValue.h.
References PixelValue::value.
|
inline |
Initialize the union with a S32 pixel value.
[in] | v | S32 value. |
Definition at line 150 of file PixelValue.h.
References PixelValue::value.
|
inline |
Initialize the union with a U64 pixel value.
[in] | v | U64 value. |
Definition at line 159 of file PixelValue.h.
References PixelValue::value.
|
inline |
Initialize the union with a S64 pixel value.
[in] | v | S64 value. |
Definition at line 167 of file PixelValue.h.
References PixelValue::value.
|
inline |
Initialize the union with a BFLOAT16 pixel value.
[in] | v | F16 value. |
Definition at line 175 of file PixelValue.h.
References PixelValue::value.
|
inline |
Initialize the union with a F16 pixel value.
[in] | v | F16 value. |
Definition at line 183 of file PixelValue.h.
References PixelValue::value.
|
inline |
Initialize the union with a F32 pixel value.
[in] | v | F32 value. |
Definition at line 191 of file PixelValue.h.
References PixelValue::value.
|
inline |
Initialize the union with a F64 pixel value.
[in] | v | F64 value. |
Definition at line 199 of file PixelValue.h.
References PixelValue::value.
|
inline |
|
inline |
Interpret the pixel value as a BFLOAT16.
[out] | v | Returned value |
Definition at line 292 of file PixelValue.h.
References PixelValue::value.
|
inline |
Interpret the pixel value as a double.
[out] | v | Returned value |
Definition at line 316 of file PixelValue.h.
References PixelValue::value.
|
inline |
Interpret the pixel value as a F32.
[out] | v | Returned value |
Definition at line 308 of file PixelValue.h.
References PixelValue::value.
|
inline |
Interpret the pixel value as a F16.
[out] | v | Returned value |
Definition at line 300 of file PixelValue.h.
References PixelValue::value.
|
inline |
Interpret the pixel value as a S16.
[out] | v | Returned value |
Definition at line 252 of file PixelValue.h.
References PixelValue::value.
|
inline |
Interpret the pixel value as a S32.
[out] | v | Returned value |
Definition at line 268 of file PixelValue.h.
References PixelValue::value.
|
inline |
Interpret the pixel value as a S64.
[out] | v | Returned value |
Definition at line 284 of file PixelValue.h.
References PixelValue::value.
|
inline |
Interpret the pixel value as a S8.
[out] | v | Returned value |
Definition at line 236 of file PixelValue.h.
References PixelValue::value.
|
inline |
Interpret the pixel value as a U16.
[out] | v | Returned value |
Definition at line 244 of file PixelValue.h.
References PixelValue::value.
|
inline |
Interpret the pixel value as a U32.
[out] | v | Returned value |
Definition at line 260 of file PixelValue.h.
References PixelValue::value.
|
inline |
Interpret the pixel value as a U64.
[out] | v | Returned value |
Definition at line 276 of file PixelValue.h.
References PixelValue::value.
|
inline |
Interpret the pixel value as a U8.
[out] | v | Returned value |
Definition at line 228 of file PixelValue.h.
References PixelValue::value.
Referenced by RandomAccessor::access_tensor(), arm_compute::cpu::bilinear_neon_scale(), ClTransposedConvolutionKernel::configure(), ClDirectConv2dKernel::configure(), ClDirectConv3dKernel::configure(), CLDepthwiseConvolutionLayerNativeKernel::configure(), arm_compute::operator<<(), arm_compute::test::validation::reference::pad_layer(), CLFillBorderKernel::set_constant_border(), and arm_compute::string_from_pixel_value().
bfloat16 bf16 |
Single channel brain floating-point number.
Definition at line 216 of file PixelValue.h.
half f16 |
Single channel F16.
Definition at line 215 of file PixelValue.h.
float f32 |
Single channel float 32.
Definition at line 214 of file PixelValue.h.
double f64 |
Single channel double.
Definition at line 213 of file PixelValue.h.
uint8_t rgb[3] |
3 channels: RGB888
Definition at line 210 of file PixelValue.h.
uint8_t rgbx[4] |
4 channels: RGBX8888
Definition at line 212 of file PixelValue.h.
int16_t s16 |
Single channel S16.
Definition at line 220 of file PixelValue.h.
int32_t s32 |
Single channel S32.
Definition at line 222 of file PixelValue.h.
int64_t s64 |
Single channel S64.
Definition at line 209 of file PixelValue.h.
int8_t s8 |
Single channel S8.
Definition at line 218 of file PixelValue.h.
uint16_t u16 |
Single channel U16.
Definition at line 219 of file PixelValue.h.
uint32_t u32 |
Single channel U32.
Definition at line 221 of file PixelValue.h.
uint64_t u64 |
Single channel U64.
Definition at line 208 of file PixelValue.h.
uint8_t u8 |
Single channel U8.
Definition at line 217 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 211 of file PixelValue.h.