From 4cbee6e66f4425a3ab5bfac3bbf400e6818a224d Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Mon, 19 Jun 2017 13:02:56 +0100 Subject: COMPMID-345: Scale input valid region in TransposeWindow. Change-Id: I880e85834acc42d9d15b38ceeaadbaee9690a484 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/78093 Reviewed-by: Anthony Barbier Tested-by: Kaizen Reviewed-by: Moritz Pflanzer --- src/core/AccessWindowTranspose.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/AccessWindowTranspose.cpp') diff --git a/src/core/AccessWindowTranspose.cpp b/src/core/AccessWindowTranspose.cpp index b3605c43f7..b1043305b8 100644 --- a/src/core/AccessWindowTranspose.cpp +++ b/src/core/AccessWindowTranspose.cpp @@ -66,8 +66,8 @@ ValidRegion AccessWindowTranspose::compute_valid_region(const Window &window, Va // a size of the region. // As the relation between input and output is transposed window.y() is // used for x shape and window.x() for y shape. - shape.set(0, std::min(old_anchor[1] + old_shape[1] - border_size.right, (window.y().end() - window.y().step()) * _scale_x + _width) - anchor[0]); - shape.set(1, std::min(old_anchor[0] + old_shape[0] - border_size.bottom, (window.x().end() - window.x().step()) * _scale_y + _height) - anchor[1]); + shape.set(0, std::min((old_anchor[1] + old_shape[1]) * _scale_x - border_size.right, (window.y().end() - window.y().step()) * _scale_x + _width) - anchor[0]); + shape.set(1, std::min((old_anchor[0] + old_shape[0]) * _scale_y - border_size.bottom, (window.x().end() - window.x().step()) * _scale_y + _height) - anchor[1]); // For higher dimensions use the intersection of the window size and the // valid region of the input -- cgit v1.2.1