Guest User

Untitled

a guest
Jun 13th, 2022
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1. void sum1(unsigned char *a, const unsigned char *b, const unsigned char *c, int h, int w, int rb)
  2. {
  3.     typedef unsigned char imgrow[rb];
  4.     typedef imgrow img[h];
  5.     img *ar = (img *)a;
  6.     const img *br = (const img *)b;
  7.     const img *cr = (const img *)c;
  8.    
  9.     for (int y = 0; y < h; y++)
  10.         for (int x = 0; x < w; x++)
  11.             (*ar)[y][x] = (*br)[y][x] * (*cr)[y][x];
  12. }
Advertisement
Add Comment
Please, Sign In to add comment