Fix convolve3x3 off-by-one error.
Bug: 7599424
Change-Id: I577b0051487934c26603a5f6329b88939e36639a
diff --git a/driver/rsdIntrinsicConvolve3x3.cpp b/driver/rsdIntrinsicConvolve3x3.cpp
index 55f4360..dac2f24 100644
--- a/driver/rsdIntrinsicConvolve3x3.cpp
+++ b/driver/rsdIntrinsicConvolve3x3.cpp
@@ -56,7 +56,7 @@
const float* coeff) {
uint32_t x1 = rsMax((int32_t)x-1, 0);
- uint32_t x2 = rsMin((int32_t)x+1, (int32_t)p->dimX);
+ uint32_t x2 = rsMin((int32_t)x+1, (int32_t)p->dimX-1);
float4 px = convert_float4(py0[x1]) * coeff[0] +
convert_float4(py0[x]) * coeff[1] +