annotate gcc/testsuite/gcc.dg/graphite/pr42211.c @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 84e7813d76e9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1 /* { dg-options "-O3 -floop-nest-optimize" } */
111
kono
parents:
diff changeset
2
kono
parents:
diff changeset
3 typedef unsigned char uint8_t;
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 void border_mirror(uint8_t *outer_img, int w, int h, int rb, int border)
kono
parents:
diff changeset
6 {
kono
parents:
diff changeset
7 uint8_t *img = outer_img + border * rb + border;
kono
parents:
diff changeset
8 int x, y;
kono
parents:
diff changeset
9
kono
parents:
diff changeset
10 for (y = -border; y < 0; y++) {
kono
parents:
diff changeset
11 for (x = -border; x < 0; x++)
kono
parents:
diff changeset
12 img[y*rb + x] = img[(-y)*rb + (-x)];
kono
parents:
diff changeset
13
kono
parents:
diff changeset
14 for (x = 0; x < w; x++)
kono
parents:
diff changeset
15 img[y*rb + x] = img[(-y)*rb + x];
kono
parents:
diff changeset
16 }
kono
parents:
diff changeset
17 }
kono
parents:
diff changeset
18
kono
parents:
diff changeset
19 void border_mirror_480(uint8_t *outer_img)
kono
parents:
diff changeset
20 {
kono
parents:
diff changeset
21 border_mirror(outer_img, 640, 480, 640 + 16*2, 16);
kono
parents:
diff changeset
22 }