URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 298 |
Rev 338 |
/* { dg-options "-O3 -floop-interchange" } */
|
/* { dg-options "-O3 -floop-interchange" } */
|
|
|
typedef unsigned char uint8_t;
|
typedef unsigned char uint8_t;
|
|
|
void border_mirror(uint8_t *outer_img, int w, int h, int rb, int border)
|
void border_mirror(uint8_t *outer_img, int w, int h, int rb, int border)
|
{
|
{
|
uint8_t *img = outer_img + border * rb + border;
|
uint8_t *img = outer_img + border * rb + border;
|
int x, y;
|
int x, y;
|
|
|
for (y = -border; y < 0; y++) {
|
for (y = -border; y < 0; y++) {
|
for (x = -border; x < 0; x++)
|
for (x = -border; x < 0; x++)
|
img[y*rb + x] = img[(-y)*rb + (-x)];
|
img[y*rb + x] = img[(-y)*rb + (-x)];
|
|
|
for (x = 0; x < w; x++)
|
for (x = 0; x < w; x++)
|
img[y*rb + x] = img[(-y)*rb + x];
|
img[y*rb + x] = img[(-y)*rb + x];
|
}
|
}
|
}
|
}
|
|
|
void border_mirror_480(uint8_t *outer_img)
|
void border_mirror_480(uint8_t *outer_img)
|
{
|
{
|
border_mirror(outer_img, 640, 480, 640 + 16*2, 16);
|
border_mirror(outer_img, 640, 480, 640 + 16*2, 16);
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.