diff options
Diffstat (limited to 'java/tests/ImageProcessing/src/com/android/rs/image/threshold.rs')
-rw-r--r-- | java/tests/ImageProcessing/src/com/android/rs/image/threshold.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/java/tests/ImageProcessing/src/com/android/rs/image/threshold.rs b/java/tests/ImageProcessing/src/com/android/rs/image/threshold.rs index 40d4fa2d..1309df59 100644 --- a/java/tests/ImageProcessing/src/com/android/rs/image/threshold.rs +++ b/java/tests/ImageProcessing/src/com/android/rs/image/threshold.rs @@ -85,7 +85,7 @@ uchar4 RS_KERNEL vert(uint32_t x, uint32_t y) { } } else { for (int r = -radius; r <= radius; r ++) { - int validH = rsClamp((int)y + r, (int)0, (int)(height - 1)); + int validH = clamp((int)y + r, (int)0, (int)(height - 1)); float4 i = rsGetElementAt_float4(ScratchPixel2, x, validH); blurredPixel += i.xyz * gaussian[gi++]; } @@ -107,7 +107,7 @@ float4 RS_KERNEL horz(uint32_t x, uint32_t y) { } else { for (int r = -radius; r <= radius; r ++) { // Stepping left and right away from the pixel - int validX = rsClamp((int)x + r, (int)0, (int)(width - 1)); + int validX = clamp((int)x + r, (int)0, (int)(width - 1)); float4 i = rsGetElementAt_float4(ScratchPixel1, validX, y); blurredPixel += i * gaussian[gi++]; } @@ -115,4 +115,3 @@ float4 RS_KERNEL horz(uint32_t x, uint32_t y) { return blurredPixel; } - |