Fix histogram intrinsic.

bug 11676706

Change-Id: I12ac5ed5f8528574619feb9737737d0111ad0be6
diff --git a/cpu_ref/rsCpuIntrinsicHistogram.cpp b/cpu_ref/rsCpuIntrinsicHistogram.cpp
index 755e8d0..cdfe7d1 100644
--- a/cpu_ref/rsCpuIntrinsicHistogram.cpp
+++ b/cpu_ref/rsCpuIntrinsicHistogram.cpp
@@ -155,7 +155,7 @@
     for (uint32_t ct=0; ct < (256 * vSize); ct++) {
         o[ct] = mSums[ct];
         for (uint32_t t=1; t < threads; t++) {
-            o[ct] += mSums[ct + 256 * vSize];
+            o[ct] += mSums[ct + (256 * vSize * t)];
         }
     }
 }
@@ -291,7 +291,7 @@
 
 RsdCpuScriptIntrinsicHistogram::RsdCpuScriptIntrinsicHistogram(RsdCpuReferenceImpl *ctx,
                                                      const Script *s, const Element *e)
-            : RsdCpuScriptIntrinsic(ctx, s, e, RS_SCRIPT_INTRINSIC_ID_BLUR) {
+            : RsdCpuScriptIntrinsic(ctx, s, e, RS_SCRIPT_INTRINSIC_ID_HISTOGRAM) {
 
     mRootPtr = NULL;
     mSums = new int[256 * 4 * mCtx->getThreadCount()];