aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/PixelValue.h
diff options
context:
space:
mode:
authorMichele Di Giorgio <michele.digiorgio@arm.com>2019-08-23 12:02:06 +0100
committerMichele Di Giorgio <michele.digiorgio@arm.com>2019-08-23 15:24:50 +0000
commit35ea9a7521b4b858a6bcc33a244b6e7f94b6e3a3 (patch)
tree570c1c70fcf06491188d8df4cc287e9ab8a3e640 /arm_compute/core/PixelValue.h
parent29a01c90fc372d31188ab7157b45b32ce24fa9b3 (diff)
downloadComputeLibrary-35ea9a7521b4b858a6bcc33a244b6e7f94b6e3a3.tar.gz
COMPMID-2317: Add new QASYMM16 data type
Change-Id: I9fbbba633f10d542474a08b1898150b9799b7ae5 Signed-off-by: Michele Di Giorgio <michele.digiorgio@arm.com> Reviewed-on: https://review.mlplatform.org/c/1805 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/core/PixelValue.h')
-rw-r--r--arm_compute/core/PixelValue.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/arm_compute/core/PixelValue.h b/arm_compute/core/PixelValue.h
index 4a07fa6c5d..e237498920 100644
--- a/arm_compute/core/PixelValue.h
+++ b/arm_compute/core/PixelValue.h
@@ -43,7 +43,7 @@ public:
*
* @param[in] v int value.
* @param[in] datatype DataType that @p v have to be stored
- * @param[in] qinfo (Optional) QuantizationInfo to apply in case of QASYMM8 datatype to @p v
+ * @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()
@@ -68,6 +68,9 @@ public:
case DataType::S16:
value.s16 = static_cast<int16_t>(v);
break;
+ case DataType::QASYMM16:
+ value.u16 = quantize_qasymm16(static_cast<uint16_t>(v), qinfo);
+ break;
case DataType::QSYMM16:
value.s16 = quantize_qsymm16(static_cast<int16_t>(v), qinfo);
break;