summaryrefslogtreecommitdiffstats
path: root/jni/filters/wbalance.c
diff options
context:
space:
mode:
Diffstat (limited to 'jni/filters/wbalance.c')
-rw-r--r--jni/filters/wbalance.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/jni/filters/wbalance.c b/jni/filters/wbalance.c
index 2b92b9978..3e1eac64c 100644
--- a/jni/filters/wbalance.c
+++ b/jni/filters/wbalance.c
@@ -99,10 +99,10 @@ void estmateWhite(unsigned char *src, int len, int *wr, int *wb, int *wg){
}
void estmateWhiteBox(unsigned char *src, int iw, int ih, int x,int y, int *wr, int *wb, int *wg){
- int r;
- int g;
- int b;
- int sum;
+ int r = 0;
+ int g = 0;
+ int b = 0;
+ int sum = 0;
int xp,yp;
int bounds = 5;
if (x<0) x = bounds;
@@ -130,6 +130,7 @@ void estmateWhiteBox(unsigned char *src, int iw, int ih, int x,int y, int *wr, i
void JNIFUNCF(ImageFilterWBalance, nativeApplyFilter, jobject bitmap, jint width, jint height, int locX,int locY)
{
+ (void)obj;
char* destination = 0;
AndroidBitmap_lockPixels(env, bitmap, (void**) &destination);
int i;