am 5c6002cc: Merge "Turn on .so path by default"

* commit '5c6002cc19cc3f1beffd204fd6cbca8bd75c0012':
  Turn on .so path by default
diff --git a/cpp/ScriptIntrinsics.cpp b/cpp/ScriptIntrinsics.cpp
index e3457a7..a9a31f8 100644
--- a/cpp/ScriptIntrinsics.cpp
+++ b/cpp/ScriptIntrinsics.cpp
@@ -598,5 +598,3 @@
 
     Script::forEach(0, nullptr, out, nullptr, 0);
 }
-
-
diff --git a/cpu_ref/rsCpuIntrinsicConvolve3x3.cpp b/cpu_ref/rsCpuIntrinsicConvolve3x3.cpp
index f9b70cc..e3fa245 100644
--- a/cpu_ref/rsCpuIntrinsicConvolve3x3.cpp
+++ b/cpu_ref/rsCpuIntrinsicConvolve3x3.cpp
@@ -105,7 +105,7 @@
                 convert_float4(py2[x]) * coeff[7] +
                 convert_float4(py2[x2]) * coeff[8];
 
-    px = clamp(px, 0.f, 255.f);
+    px = clamp(px + 0.5f, 0.f, 255.f);
     uchar4 o = {(uchar)px.x, (uchar)px.y, (uchar)px.z, (uchar)px.w};
     *out = o;
 }
@@ -127,7 +127,7 @@
                 convert_float2(py2[x]) * coeff[7] +
                 convert_float2(py2[x2]) * coeff[8];
 
-    px = clamp(px, 0.f, 255.f);
+    px = clamp(px + 0.5f, 0.f, 255.f);
     *out = convert_uchar2(px);
 }
 
@@ -147,7 +147,7 @@
                ((float)py2[x1]) * coeff[6] +
                ((float)py2[x]) * coeff[7] +
                ((float)py2[x2]) * coeff[8];
-    *out = clamp(px, 0.f, 255.f);
+    *out = clamp(px + 0.5f, 0.f, 255.f);
 }
 
 static void ConvolveOneF4(const RsExpandKernelParams *p, uint32_t x, float4 *out,
diff --git a/cpu_ref/rsCpuIntrinsicConvolve5x5.cpp b/cpu_ref/rsCpuIntrinsicConvolve5x5.cpp
index 815badf..e591e44 100644
--- a/cpu_ref/rsCpuIntrinsicConvolve5x5.cpp
+++ b/cpu_ref/rsCpuIntrinsicConvolve5x5.cpp
@@ -125,7 +125,7 @@
                 convert_float4(py4[x2]) * coeff[22] +
                 convert_float4(py4[x3]) * coeff[23] +
                 convert_float4(py4[x4]) * coeff[24];
-    px = clamp(px, 0.f, 255.f);
+    px = clamp(px + 0.5f, 0.f, 255.f);
     *out = convert_uchar4(px);
 }
 
@@ -168,7 +168,7 @@
                 convert_float2(py4[x2]) * coeff[22] +
                 convert_float2(py4[x3]) * coeff[23] +
                 convert_float2(py4[x4]) * coeff[24];
-    px = clamp(px, 0.f, 255.f);
+    px = clamp(px + 0.5f, 0.f, 255.f);
     *out = convert_uchar2(px);
 }
 
@@ -211,7 +211,7 @@
                (float)(py4[x2]) * coeff[22] +
                (float)(py4[x3]) * coeff[23] +
                (float)(py4[x4]) * coeff[24];
-    px = clamp(px, 0.f, 255.f);
+    px = clamp(px + 0.5f, 0.f, 255.f);
     *out = px;
 }
 
diff --git a/rsAllocation.cpp b/rsAllocation.cpp
index 9b83ebb..821ee68 100644
--- a/rsAllocation.cpp
+++ b/rsAllocation.cpp
@@ -493,7 +493,7 @@
 }
 
 #ifndef RS_COMPATIBILITY_LIB
-void Allocation::NewBufferListener::onFrameAvailable() {
+void Allocation::NewBufferListener::onFrameAvailable(const BufferItem& /* item */) {
     intptr_t ip = (intptr_t)alloc;
     rsc->sendMessageToClient(&ip, RS_MESSAGE_TO_CLIENT_NEW_BUFFER, 0, sizeof(ip), true);
 }
diff --git a/rsAllocation.h b/rsAllocation.h
index e9e0ee9..2dc4a0e 100644
--- a/rsAllocation.h
+++ b/rsAllocation.h
@@ -185,7 +185,7 @@
         const android::renderscript::Context *rsc;
         const android::renderscript::Allocation *alloc;
 
-        virtual void onFrameAvailable();
+        virtual void onFrameAvailable(const BufferItem& item);
     };
 
     sp<NewBufferListener> mBufferListener;
diff --git a/scriptc/rs_allocation.rsh b/scriptc/rs_allocation.rsh
index 6f3f8d9..cdf64e8 100644
--- a/scriptc/rs_allocation.rsh
+++ b/scriptc/rs_allocation.rsh
@@ -374,8 +374,8 @@
 
 #endif // (defined(RS_VERSION) && (RS_VERSION >= 18))
 
-
-#if (defined(RS_VERSION) && (RS_VERSION >= 999))
+// FIXME: this needs to be set to 22
+#if (defined(RS_VERSION) && (RS_VERSION >= 21))
 
 #define VOP(T)                                                                   \
     extern T __attribute__((overloadable))                                       \
@@ -424,7 +424,8 @@
 
 #undef VOP
 
-#endif //(defined(RS_VERSION) && (RS_VERSION >= 999))
+// FIXME
+#endif //(defined(RS_VERSION) && (RS_VERSION >= 21))
 
 
 #endif