aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/reference/NormalizePlanarYUVLayer.cpp
diff options
context:
space:
mode:
authorMichele Di Giorgio <michele.digiorgio@arm.com>2018-09-12 10:18:54 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:54:54 +0000
commitd63dfa2fc61a33b4e675ec6bc7458d8700174134 (patch)
tree2a85a8258aaa9a5762eb589f34b3f2868705dfb5 /tests/validation/reference/NormalizePlanarYUVLayer.cpp
parent20c246a60869bada4051bd14eb9a3862be5330d7 (diff)
downloadComputeLibrary-d63dfa2fc61a33b4e675ec6bc7458d8700174134.tar.gz
COMPMID-1568: Add support for QASYMM8 to CLNormalizePlanarYUV
Change-Id: Id7ea6e7f57179478e5ba0e9231274e98fa089590 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/148028 Tested-by: bsgcomp <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'tests/validation/reference/NormalizePlanarYUVLayer.cpp')
-rw-r--r--tests/validation/reference/NormalizePlanarYUVLayer.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/validation/reference/NormalizePlanarYUVLayer.cpp b/tests/validation/reference/NormalizePlanarYUVLayer.cpp
index cdccaf49cd..563e2a7444 100644
--- a/tests/validation/reference/NormalizePlanarYUVLayer.cpp
+++ b/tests/validation/reference/NormalizePlanarYUVLayer.cpp
@@ -61,6 +61,17 @@ SimpleTensor<T> normalize_planar_yuv_layer(const SimpleTensor<T> &src, const Sim
return result;
}
+template <>
+SimpleTensor<uint8_t> normalize_planar_yuv_layer<uint8_t>(const SimpleTensor<uint8_t> &src, const SimpleTensor<uint8_t> &mean, const SimpleTensor<uint8_t> &std)
+{
+ SimpleTensor<float> src_tmp = convert_from_asymmetric(src);
+ SimpleTensor<float> mean_tmp = convert_from_asymmetric(mean);
+ SimpleTensor<float> std_tmp = convert_from_asymmetric(std);
+ SimpleTensor<float> dst_tmp = normalize_planar_yuv_layer<float>(src_tmp, mean_tmp, std_tmp);
+ SimpleTensor<uint8_t> dst = convert_to_asymmetric(dst_tmp, src.quantization_info());
+ return dst;
+}
+
template SimpleTensor<half> normalize_planar_yuv_layer(const SimpleTensor<half> &src, const SimpleTensor<half> &mean, const SimpleTensor<half> &std);
template SimpleTensor<float> normalize_planar_yuv_layer(const SimpleTensor<float> &src, const SimpleTensor<float> &mean, const SimpleTensor<float> &std);
} // namespace reference