aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/Reference.h
diff options
context:
space:
mode:
authorIsabella Gottardi <isabella.gottardi@arm.com>2017-07-04 11:21:28 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-09-17 14:17:31 +0100
commit6203153b25fda2c4b8d94fe71337d1145a36c132 (patch)
treeaee1e7db73d09eabf01ed8fb7680f98f97e07c93 /tests/validation/Reference.h
parentd6253602ec7ebcbe6adb0acc51a97a5d8c167495 (diff)
downloadComputeLibrary-6203153b25fda2c4b8d94fe71337d1145a36c132.tar.gz
COMPMID-424 Implemented reference implementation and validation tests (NEON and CL) for Warp Perspective
Changed the behaviour in NEWarpKernel for border mode replicate and constant to stick with the VX specs. When the new coords are out of the valid region, the output will be computed using the values from the border. In the validation tests the validate will be called with tolerance_value 1 and tolerance_number 0.2%, due to some float arithmetic related mismatches. Change-Id: Id4f9d0ef87178f8f8fd38ee17fee0e6f4beb85cd Reviewed-on: http://mpd-gerrit.cambridge.arm.com/80283 Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com> Reviewed-by: Moritz Pflanzer <moritz.pflanzer@arm.com> Reviewed-by: Steven Niu <steven.niu@arm.com>
Diffstat (limited to 'tests/validation/Reference.h')
-rw-r--r--tests/validation/Reference.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/validation/Reference.h b/tests/validation/Reference.h
index e00a5b95d5..13e43d3d30 100644
--- a/tests/validation/Reference.h
+++ b/tests/validation/Reference.h
@@ -266,6 +266,21 @@ public:
* @return Computed raw tensor.
*/
static RawTensor compute_reference_threshold(const TensorShape &shape, uint8_t threshold, uint8_t false_value, uint8_t true_value, ThresholdType type, uint8_t upper);
+
+ /** Compute reference Warp Perspective.
+ *
+ * @param[in] shape Shape of the input and output tensors.
+ * @param[out] valid_mask Valid mask tensor.
+ * @param[in] matrix The perspective matrix. Must be 3x3 of type float.
+ * @param[in] policy The interpolation type.
+ * @param[in] border_mode Strategy to use for borders.
+ * @param[in] constant_border_value Constant value to use for borders if border_mode is set to CONSTANT.
+ *
+ * @return Computed raw tensor.
+ */
+ static RawTensor compute_reference_warp_perspective(const TensorShape &shape, RawTensor &valid_mask, const float *matrix, InterpolationPolicy policy, BorderMode border_mode,
+ uint8_t constant_border_value);
+
/** Compute reference batch normalization layer.
*
* @param[in] shape0 Shape of the input and output tensors.