1 /* { dg-options "-O3 -floop-interchange" } */
3 typedef unsigned char uint8_t;
5 void border_mirror(uint8_t *outer_img
, int w
, int h
, int rb
, int border
)
7 uint8_t *img
= outer_img
+ border
* rb
+ border
;
10 for (y
= -border
; y
< 0; y
++) {
11 for (x
= -border
; x
< 0; x
++)
12 img
[y
*rb
+ x
] = img
[(-y
)*rb
+ (-x
)];
14 for (x
= 0; x
< w
; x
++)
15 img
[y
*rb
+ x
] = img
[(-y
)*rb
+ x
];
19 void border_mirror_480(uint8_t *outer_img
)
21 border_mirror(outer_img
, 640, 480, 640 + 16*2, 16);