diff options
-rw-r--r-- | arm_compute/core/PixelValue.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arm_compute/core/PixelValue.h b/arm_compute/core/PixelValue.h index 52b1f654ad..c5f6608163 100644 --- a/arm_compute/core/PixelValue.h +++ b/arm_compute/core/PixelValue.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019 ARM Limited. + * Copyright (c) 2016-2020 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -36,7 +36,7 @@ class PixelValue public: /** Default constructor: value initialized to 0 */ PixelValue() - : value{ uint64_t(0) } + : value{ int64_t(0) } { } /** Initialize the union with a pixel value of chosen datatype @@ -45,7 +45,7 @@ public: * @param[in] datatype DataType that @p v have to be stored * @param[in] qinfo (Optional) QuantizationInfo to apply in case of quantized data types to @p v */ - PixelValue(uint64_t v, DataType datatype, QuantizationInfo qinfo = QuantizationInfo()) + PixelValue(int64_t v, DataType datatype, QuantizationInfo qinfo = QuantizationInfo()) : PixelValue() { switch(datatype) @@ -60,7 +60,7 @@ public: value.u8 = quantize_qasymm8(static_cast<uint8_t>(v), qinfo); break; case DataType::QASYMM8_SIGNED: - value.u8 = quantize_qasymm8_signed(static_cast<int8_t>(v), qinfo); + value.s8 = quantize_qasymm8_signed(static_cast<int8_t>(v), qinfo); break; case DataType::QSYMM8: value.s8 = quantize_qsymm8(static_cast<int8_t>(v), qinfo); @@ -87,7 +87,7 @@ public: value.u64 = static_cast<uint64_t>(v); break; case DataType::S64: - value.s16 = static_cast<int64_t>(v); + value.s64 = static_cast<int64_t>(v); break; case DataType::F16: value.f16 = static_cast<half>(v); @@ -99,7 +99,7 @@ public: value.f64 = static_cast<double>(v); break; default: - value.u64 = v; + value.s64 = v; break; } } |