summaryrefslogtreecommitdiff
path: root/java/tests/ImageProcessing_jb/src/com/android/rs/image/threshold.rs
diff options
context:
space:
mode:
authorJean-Luc Brouillet <jeanluc@google.com>2015-05-19 14:12:43 -0700
committerJean-Luc Brouillet <jeanluc@google.com>2015-05-20 13:44:44 -0700
commit2089cddba3e6e6bb7643ed670ee038dce0b8db6e (patch)
tree32e15820faa67ca7a02c8cf4c3e68f3a945b2ea6 /java/tests/ImageProcessing_jb/src/com/android/rs/image/threshold.rs
parentc705223e0e5dff3bbd10f82c216784316f3c3398 (diff)
downloadrs-2089cddba3e6e6bb7643ed670ee038dce0b8db6e.tar.gz
Fix warnings in RenderScript sources.
An upcoming CL fixes a bug where many warning were disabled. This fixes the warnings (that are turned into errors in most of our builds) before the CL lands. Also, adds long & unsigned long testing for a few tests. Change-Id: Id6826e968db2d06ef9910fe775309d1c3872cdc5
Diffstat (limited to 'java/tests/ImageProcessing_jb/src/com/android/rs/image/threshold.rs')
-rw-r--r--java/tests/ImageProcessing_jb/src/com/android/rs/image/threshold.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/java/tests/ImageProcessing_jb/src/com/android/rs/image/threshold.rs b/java/tests/ImageProcessing_jb/src/com/android/rs/image/threshold.rs
index 40d4fa2d..1309df59 100644
--- a/java/tests/ImageProcessing_jb/src/com/android/rs/image/threshold.rs
+++ b/java/tests/ImageProcessing_jb/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;
}
-