diff options
author | Michalis Spyrou <michalis.spyrou@arm.com> | 2019-10-21 12:04:19 +0100 |
---|---|---|
committer | Michalis Spyrou <michalis.spyrou@arm.com> | 2019-10-21 12:08:39 +0000 |
commit | 314598f31a01ed9419fcd68c13df28cff1b2fc4b (patch) | |
tree | c5b5e3ba2c0edf6c520b52830611be69a8da282c /tests/validation/reference/ColorConvertHelper.h | |
parent | d93e263e70e3101422402c95946e520fef34c4c7 (diff) | |
download | ComputeLibrary-314598f31a01ed9419fcd68c13df28cff1b2fc4b.tar.gz |
COMPMID-2486: Fix bare arm64-v8.2-a builds
Builds were failing due to possible integer overflow
Change-Id: I4d2d106118c06596988f57bbad31bdf3567cdb5c
Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com>
Reviewed-on: https://review.mlplatform.org/c/2132
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests/validation/reference/ColorConvertHelper.h')
-rw-r--r-- | tests/validation/reference/ColorConvertHelper.h | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/tests/validation/reference/ColorConvertHelper.h b/tests/validation/reference/ColorConvertHelper.h index 8dd961c0f4..62eef82d11 100644 --- a/tests/validation/reference/ColorConvertHelper.h +++ b/tests/validation/reference/ColorConvertHelper.h @@ -437,15 +437,15 @@ inline void colorconvert_rgb_to_nv12(const SimpleTensor<T> src, std::vector<Simp SimpleTensor<T> utmp(TensorShape{ src.shape().x() / 2, src.shape().y() }, Format::U8); SimpleTensor<T> vtmp(TensorShape{ src.shape().x() / 2, src.shape().y() }, Format::U8); - int utmp_width = utmp.shape().x(); - int utmp_height = utmp.shape().y(); + uint32_t utmp_width = utmp.shape().x(); + uint32_t utmp_height = utmp.shape().y(); - int uvec_coord_x = 0; - int uvec_coord_y = 0; + uint32_t uvec_coord_x = 0; + uint32_t uvec_coord_y = 0; Coordinates uvec_coord{ uvec_coord_x, uvec_coord_y }; - for(int y = 0; y < utmp_height; y++) + for(uint32_t y = 0; y < utmp_height; y++) { - for(int x = 0; x < utmp_width; x++) + for(uint32_t x = 0; x < utmp_width; x++) { Coordinates coord{ x, y }; auto *utmp_pixel = reinterpret_cast<T *>(utmp(coord)); @@ -464,15 +464,15 @@ inline void colorconvert_rgb_to_nv12(const SimpleTensor<T> src, std::vector<Simp } } - int second_plane_x = dst[1].shape().x(); - int second_plane_y = dst[1].shape().y(); + uint32_t second_plane_x = dst[1].shape().x(); + uint32_t second_plane_y = dst[1].shape().y(); - int utmp_coord_x = 0; - int utmp_coord_y = 0; + uint32_t utmp_coord_x = 0; + uint32_t utmp_coord_y = 0; - for(int y = 0; y < second_plane_y; y++) + for(uint32_t y = 0; y < second_plane_y; y++) { - for(int x = 0; x < second_plane_x; x++) + for(uint32_t x = 0; x < second_plane_x; x++) { Coordinates coord{ x, y }; Coordinates utmp_top_coord{ utmp_coord_x, utmp_coord_y }; @@ -524,15 +524,15 @@ inline void colorconvert_rgb_to_iyuv(const SimpleTensor<T> src, std::vector<Simp SimpleTensor<T> utmp(TensorShape{ src.shape().x() / 2, src.shape().y() }, Format::U8); SimpleTensor<T> vtmp(TensorShape{ src.shape().x() / 2, src.shape().y() }, Format::U8); - int utmp_width = utmp.shape().x(); - int utmp_height = utmp.shape().y(); + uint32_t utmp_width = utmp.shape().x(); + uint32_t utmp_height = utmp.shape().y(); - int uvec_coord_x = 0; - int uvec_coord_y = 0; + uint32_t uvec_coord_x = 0; + uint32_t uvec_coord_y = 0; Coordinates uvec_coord{ uvec_coord_x, uvec_coord_y }; - for(int y = 0; y < utmp_height; y++) + for(uint32_t y = 0; y < utmp_height; y++) { - for(int x = 0; x < utmp_width; x++) + for(uint32_t x = 0; x < utmp_width; x++) { Coordinates coord{ x, y }; auto *utmp_pixel = reinterpret_cast<T *>(utmp(coord)); @@ -551,15 +551,15 @@ inline void colorconvert_rgb_to_iyuv(const SimpleTensor<T> src, std::vector<Simp } } - int second_plane_x = dst[1].shape().x(); - int second_plane_y = dst[1].shape().y(); + uint32_t second_plane_x = dst[1].shape().x(); + uint32_t second_plane_y = dst[1].shape().y(); - int utmp_coord_x = 0; - int utmp_coord_y = 0; + uint32_t utmp_coord_x = 0; + uint32_t utmp_coord_y = 0; - for(int y = 0; y < second_plane_y; y++) + for(uint32_t y = 0; y < second_plane_y; y++) { - for(int x = 0; x < second_plane_x; x++) + for(uint32_t x = 0; x < second_plane_x; x++) { Coordinates coord{ x, y }; Coordinates utmp_top_coord{ utmp_coord_x, utmp_coord_y }; |