aboutsummaryrefslogtreecommitdiff
path: root/src/core/CL/cl_kernels/scale.cl
diff options
context:
space:
mode:
authorDaniil Efremov <daniil.efremov@xored.com>2017-11-14 21:25:34 +0700
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:35:24 +0000
commit7a49c7993a8b2c670f7caa90e3fbe8a5f1c03078 (patch)
treee043cff3fe7d9f9d014ecc5c2c2348d03f9dcaa4 /src/core/CL/cl_kernels/scale.cl
parent50fbc6f0a1e781d4f9f83d1e4ea2588390facea2 (diff)
downloadComputeLibrary-7a49c7993a8b2c670f7caa90e3fbe8a5f1c03078.tar.gz
COMPMID-661: issue# 23 Scale border fix (#26)
Changes in CL and reference in terms of border handling. Change-Id: I5bed95b1f4c308629d7113455dc8a55d74500bcd Reviewed-on: http://mpd-gerrit.cambridge.arm.com/95742 Reviewed-by: Anthony Barbier <anthony.barbier@arm.com> Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Diffstat (limited to 'src/core/CL/cl_kernels/scale.cl')
-rw-r--r--src/core/CL/cl_kernels/scale.cl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/CL/cl_kernels/scale.cl b/src/core/CL/cl_kernels/scale.cl
index 0106ce095c..d533d970c7 100644
--- a/src/core/CL/cl_kernels/scale.cl
+++ b/src/core/CL/cl_kernels/scale.cl
@@ -84,7 +84,7 @@ __kernel void scale_nearest_neighbour(
Image in = CONVERT_TO_IMAGE_STRUCT_NO_STEP(in);
Image out = CONVERT_TO_IMAGE_STRUCT(out);
const float2 r = (float2)(scale_x, scale_y);
- const float8 tc = clamp_to_border(transform_nearest(get_current_coords(), r), input_width, input_height);
+ const float8 tc = clamp_to_border_with_size(transform_nearest(get_current_coords(), r), input_width, input_height, BORDER_SIZE);
vstore4(read_texels4(&in, convert_int8(tc)), 0, (__global DATA_TYPE *)out.ptr);
}
@@ -119,5 +119,5 @@ __kernel void scale_bilinear(
Image out = CONVERT_TO_IMAGE_STRUCT(out);
const float2 r = (float2)(scale_x, scale_y);
const float8 tc = transform_bilinear(get_current_coords(), r);
- vstore4(bilinear_interpolate(&in, tc, input_width, input_height), 0, (__global DATA_TYPE *)out.ptr);
+ vstore4(bilinear_interpolate_with_border(&in, tc, input_width, input_height, BORDER_SIZE), 0, (__global DATA_TYPE *)out.ptr);
}