image processing - Simple Greyscale (dot product) inconsistencies with OpenMP -


i'm trying speed of image processing loops in jni of openmp. i'm using ndk r9c.

the issue i'm facing output has artifacts. can see them in attached image. acceleration not great either (around 30%), figure issues related.

my basic dot product loop greyscale pasted below.

#pragma omp parallel shared(src,dst,size) private(i) for(i=0; < size*4; i+=4) {     pixel[0] = src[i+0];     pixel[1] = src[i+1];     pixel[2] = src[i+2];     pixel[3] = src[i+3];      acc = clamppix((mat[0]*pixel[0] + mat[1]*pixel[1] +mat[2]*pixel[2])>>shift);      dst[i+0] = (acc);     dst[i+1] = (acc);     dst[i+2] = (acc);     dst[i+3] = 255; } 

can me identify what's going wrong?

greyscale - openmp errors


Comments

Popular posts from this blog

c++ - How to add Crypto++ library to Qt project -

jQuery Mobile app not scrolling in Firefox -

How to use vim as editor in Matlab GUI -