24 #ifndef ARM_COMPUTE_PIXELVALUE_H 25 #define ARM_COMPUTE_PIXELVALUE_H 54 value.u8 =
static_cast<uint8_t
>(v);
57 value.s8 =
static_cast<int8_t
>(v);
69 value.u16 =
static_cast<uint16_t
>(v);
72 value.s16 =
static_cast<int16_t
>(v);
81 value.u32 =
static_cast<uint32_t
>(v);
84 value.s32 =
static_cast<int32_t
>(v);
87 value.u64 =
static_cast<uint64_t
>(v);
90 value.s64 =
static_cast<int64_t
>(v);
99 value.f32 =
static_cast<float>(v);
241 void get(uint8_t &v)
const 249 void get(int8_t &v)
const 257 void get(uint16_t &v)
const 265 void get(int16_t &v)
const 273 void get(uint32_t &v)
const 281 void get(int32_t &v)
const 289 void get(uint64_t &v)
const 297 void get(int64_t &v)
const 321 void get(
float &v)
const 329 void get(
double &v)
const 337 template <
typename T>
uint8_t rgbx[4]
4 channels: RGBX8888
PixelValue()
Default constructor: value initialized to 0.
int8_t quantize_qsymm8(float value, const QuantizationInfo &qinfo)
Quantize a value given a 8-bit symmetric quantization scheme.
Class describing the value of a pixel for any image format.
PixelValue(float v)
Initialize the union with a F32 pixel value.
int16_t quantize_qsymm16(float value, const UniformQuantizationInfo &qinfo, RoundingPolicy rounding_policy=RoundingPolicy::TO_NEAREST_UP)
Quantize a value given a 16-bit symmetric quantization scheme.
quantized, symmetric fixed-point 16-bit number
PixelValue(uint8_t v)
Initialize the union with a U8 pixel value.
uint8_t rgb[3]
3 channels: RGB888
uint8_t u8
Single channel U8.
uint16_t u16
Single channel U16.
uint8_t quantize_qasymm8(float value, const INFO_TYPE &qinfo, RoundingPolicy rounding_policy=RoundingPolicy::TO_NEAREST_UP)
Quantize a value given an unsigned 8-bit asymmetric quantization scheme.
Brain floating point representation class.
PixelValue(double v)
Initialize the union with a F64 pixel value.
int64_t s64
Single channel S64.
1 channel, 1 U8 per channel
half_float::half half
16-bit floating point type
1 channel, 1 F32 per channel
quantized, asymmetric fixed-point 16-bit number
1 channel, 1 U16 per channel
half f16
Single channel F16.
Copyright (c) 2017-2021 Arm Limited.
1 channel, 1 F16 per channel
1 channel, 1 S32 per channel
16-bit brain floating-point number
PixelValue(half v)
Initialize the union with a F16 pixel value.
double f64
Single channel double.
Quantization information.
1 channel, 1 U32 per channel
int8_t quantize_qasymm8_signed(float value, const INFO_TYPE &qinfo, RoundingPolicy rounding_policy=RoundingPolicy::TO_NEAREST_UP)
Quantize a value given a signed 8-bit asymmetric quantization scheme.
quantized, asymmetric fixed-point 8-bit number unsigned
bfloat16 bf16
Single channel brain floating-point number.
union arm_compute::PixelValue::@0 value
Union which describes the value of a pixel for any image format.
1 channel, 1 S16 per channel
PixelValue(bfloat16 v)
Initialize the union with a BFLOAT16 pixel value.
quantized, symmetric fixed-point 8-bit number
PixelValue(uint64_t v)
Initialize the union with a U64 pixel value.
int8_t s8
Single channel S8.
float f32
Single channel float 32.
PixelValue(uint16_t v)
Initialize the union with a U16 pixel value.
const QuantizationInfo qinfo
uint64_t u64
Single channel U64.
int16_t s16
Single channel S16.
PixelValue(uint32_t v)
Initialize the union with a U32 pixel value.
quantized, asymmetric fixed-point 8-bit number signed
PixelValue(int32_t v)
Initialize the union with a S32 pixel value.
int32_t s32
Single channel S32.
64-bit floating-point number
uint32_t u32
Single channel U32.
DataType
Available data types.
uint8_t yuv[3]
3 channels: Any YUV format
PixelValue(double v, DataType datatype, QuantizationInfo qinfo=QuantizationInfo())
Initialize the union with a pixel value of chosen datatype.
uint16_t quantize_qasymm16(float value, const UniformQuantizationInfo &qinfo, RoundingPolicy rounding_policy=RoundingPolicy::TO_NEAREST_UP)
Quantize a value given a 16-bit asymmetric quantization scheme.
PixelValue(int8_t v)
Initialize the union with a S8 pixel value.
PixelValue(int16_t v)
Initialize the union with a S16 pixel value.
PixelValue(int64_t v)
Initialize the union with a S64 pixel value.