23.08
|
Go to the documentation of this file.
24 #ifndef ARM_COMPUTE_PIXELVALUE_H
25 #define ARM_COMPUTE_PIXELVALUE_H
58 value.u8 =
static_cast<uint8_t
>(v);
61 value.s8 =
static_cast<int8_t
>(v);
73 value.u16 =
static_cast<uint16_t
>(v);
76 value.s16 =
static_cast<int16_t
>(v);
85 value.u32 =
static_cast<uint32_t
>(v);
88 value.s32 =
static_cast<int32_t
>(v);
91 value.u64 =
static_cast<uint64_t
>(v);
94 value.s64 =
static_cast<int64_t
>(v);
103 value.f32 =
static_cast<float>(v);
245 void get(uint8_t &v)
const
261 void get(uint16_t &v)
const
269 void get(int16_t &v)
const
277 void get(uint32_t &v)
const
285 void get(int32_t &v)
const
293 void get(uint64_t &v)
const
301 void get(int64_t &v)
const
341 template <
typename T>
@ QASYMM16
quantized, asymmetric fixed-point 16-bit number
PixelValue(int8_t v)
Initialize the union with a S8 pixel value.
@ U64
unsigned 64-bit number
PixelValue(int64_t v)
Initialize the union with a S64 pixel value.
PixelValue(uint8_t v)
Initialize the union with a U8 pixel value.
uint8_t rgbx[4]
4 channels: RGBX8888
void get(half &v) const
Interpret the pixel value as a F16.
@ BFLOAT16
16-bit brain floating-point number
void get(uint32_t &v) const
Interpret the pixel value as a U32.
Quantization information.
Class describing the value of a pixel for any image format.
@ F64
64-bit floating-point number
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.
int64_t s64
Single channel S64.
@ QASYMM8
quantized, asymmetric fixed-point 8-bit number unsigned
void get(uint8_t &v) const
Interpret the pixel value as a U8.
@ U16
unsigned 16-bit number
void get(double &v) const
Interpret the pixel value as a double.
int8_t quantize_qsymm8(float value, const QuantizationInfo &qinfo)
Quantize a value given a 8-bit symmetric quantization scheme.
uint8_t rgb[3]
3 channels: RGB888
@ QSYMM8
quantized, symmetric fixed-point 8-bit number
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.
uint8_t u8
Single channel U8.
uint16_t u16
Single channel U16.
PixelValue(double v)
Initialize the union with a F64 pixel value.
void get(int32_t &v) const
Interpret the pixel value as a S32.
void get(int8_t &v) const
Interpret the pixel value as a S8.
Brain floating point representation class.
@ QSYMM16
quantized, symmetric fixed-point 16-bit number
PixelValue(half v)
Initialize the union with a F16 pixel value.
double f64
Single channel double.
void get(int16_t &v) const
Interpret the pixel value as a S16.
half f16
Single channel F16.
half_float::half half
16-bit floating point type
void get(uint64_t &v) const
Interpret the pixel value as a U64.
PixelValue() noexcept
Default constructor: value initialized to 0.
@ U32
unsigned 32-bit number
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.
void get(float &v) const
Interpret the pixel value as a F32.
@ U8
unsigned 8-bit number
void get(int64_t &v) const
Interpret the pixel value as a S64.
@ S16
signed 16-bit number
@ QASYMM8_SIGNED
quantized, asymmetric fixed-point 8-bit number signed
void get(bfloat16 &v) const
Interpret the pixel value as a BFLOAT16.
bfloat16 bf16
Single channel brain floating-point number.
int8_t s8
Single channel S8.
PixelValue(bfloat16 v)
Initialize the union with a BFLOAT16 pixel value.
T get() const
Get the pixel value.
PixelValue(uint64_t v)
Initialize the union with a U64 pixel value.
PixelValue(uint16_t v)
Initialize the union with a U16 pixel value.
uint64_t u64
Single channel U64.
@ S64
signed 64-bit number
int16_t s16
Single channel S16.
Copyright (c) 2017-2023 Arm Limited.
float f32
Single channel float 32.
void get(uint16_t &v) const
Interpret the pixel value as a U16.
@ F16
16-bit floating-point number
PixelValue(uint32_t v)
Initialize the union with a U32 pixel value.
@ S32
signed 32-bit number
union arm_compute::PixelValue::@0 value
Union which describes the value of a pixel for any image format.
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.
uint32_t u32
Single channel U32.
@ F32
32-bit floating-point number
uint8_t yuv[3]
3 channels: Any YUV format
PixelValue(int32_t v)
Initialize the union with a S32 pixel value.
int32_t s32
Single channel S32.
PixelValue(int16_t v)
Initialize the union with a S16 pixel value.
DataType
Available data types.
const QuantizationInfo qinfo
PixelValue(double v, DataType datatype, QuantizationInfo qinfo=QuantizationInfo())
Initialize the union with a pixel value of chosen datatype.
PixelValue(float v)
Initialize the union with a F32 pixel value.