Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void sum1(unsigned char *a, const unsigned char *b, const unsigned char *c, int h, int w, int rb)
- {
- typedef unsigned char imgrow[rb];
- typedef imgrow img[h];
- img *ar = (img *)a;
- const img *br = (const img *)b;
- const img *cr = (const img *)c;
- for (int y = 0; y < h; y++)
- for (int x = 0; x < w; x++)
- (*ar)[y][x] = (*br)[y][x] * (*cr)[y][x];
- }
Advertisement
Add Comment
Please, Sign In to add comment