From 764f39e3d64da8a5002b220e1f9044f15e68a613 Mon Sep 17 00:00:00 2001 From: Isabella Gottardi Date: Thu, 9 Nov 2017 11:27:14 +0000 Subject: COMPMID-556 - Fix Warp Perspective validation Change-Id: I6504fb1e2d3d2b454a043d7157112891cef272a3 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/95045 Tested-by: Kaizen Reviewed-by: Anthony Barbier --- tests/validation/fixtures/WarpPerspectiveFixture.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'tests/validation/fixtures/WarpPerspectiveFixture.h') diff --git a/tests/validation/fixtures/WarpPerspectiveFixture.h b/tests/validation/fixtures/WarpPerspectiveFixture.h index c77efbdc0d..1a6d6c035e 100644 --- a/tests/validation/fixtures/WarpPerspectiveFixture.h +++ b/tests/validation/fixtures/WarpPerspectiveFixture.h @@ -70,9 +70,9 @@ public: protected: template - void fill(U &&tensor, int i = 0) + void fill(U &&tensor) { - library->fill_tensor_uniform(tensor, i); + library->fill_tensor_uniform(tensor, 0); } TensorType compute_target(const TensorShape &shape, const TensorShape &vmask_shape, const float *matrix, InterpolationPolicy policy, BorderMode border_mode, uint8_t constant_border_value, @@ -112,19 +112,21 @@ protected: // Create reference SimpleTensor src{ shape, data_type }; - SimpleTensor valid_mask{ vmask_shape, data_type }; + + // Create the valid mask Tensor + _valid_mask = SimpleTensor(shape, data_type); // Fill reference - fill(src, 0); - fill(valid_mask, 1); + fill(src); // Compute reference - return reference::warp_perspective(src, valid_mask, matrix, policy, border_mode, constant_border_value); + return reference::warp_perspective(src, _valid_mask, matrix, policy, border_mode, constant_border_value); } TensorType _target{}; SimpleTensor _reference{}; BorderMode _border_mode{}; + SimpleTensor _valid_mask{}; }; } // namespace validation } // namespace test -- cgit v1.2.1