35 for (i = 0; i < w; i++)
36 for (j = 0; j <
h; j++)
37 imgIn[i][j] = (
DATA_TYPE) ((313*i+991*j)%65536) / 65535.0f;
52 for (i = 0; i < w; i++)
53 for (j = 0; j <
h; j++) {
67 void kernel_deriche(
int w,
int h,
DATA_TYPE alpha,
92 for (i=0; i<
_PB_W; i++) {
96 for (j=0; j<
_PB_H; j++) {
97 y1[i][j] = a1*imgIn[i][j] + a2*xm1 + b1*ym1 + b2*ym2;
104 for (i=0; i<
_PB_W; i++) {
109 for (j=
_PB_H-1; j>=0; j--) {
110 y2[i][j] = a3*xp1 + a4*xp2 + b1*yp1 + b2*yp2;
118 for (i=0; i<
_PB_W; i++)
119 for (j=0; j<
_PB_H; j++) {
120 imgOut[i][j] = c1 * (y1[i][j] + y2[i][j]);
123 for (j=0; j<
_PB_H; j++) {
127 for (i=0; i<
_PB_W; i++) {
128 y1[i][j] = a5*imgOut[i][j] + a6*tm1 + b1*ym1 + b2*ym2;
136 for (j=0; j<
_PB_H; j++) {
141 for (i=_PB_W-1; i>=0; i--) {
142 y2[i][j] = a7*tp1 + a8*tp2 + b1*yp1 + b2*yp2;
150 for (i=0; i<
_PB_W; i++)
151 for (j=0; j<
_PB_H; j++)
152 imgOut[i][j] = c2*(y1[i][j] + y2[i][j]);
158 int main(
int argc,
char** argv)
int main(int argc, char **argv)
#define POLYBENCH_ARRAY(x)
#define POLYBENCH_DUMP_BEGIN(s)
static void init_array(int w, int h, DATA_TYPE *alpha, DATA_TYPE POLYBENCH_2D(imgIn, W, H, w, h), DATA_TYPE POLYBENCH_2D(imgOut, W, H, w, h))
This version is stamped on May 10, 2016.
__attribute__((noinline))
Convert the given fixedpt number to a decimal string.
#define POLYBENCH_FREE_ARRAY(x)
#define POLYBENCH_2D(var, dim1, dim2, ddim1, ddim2)
static const uint32_t k[]
#define POLYBENCH_DUMP_START
#define POLYBENCH_2D_ARRAY_DECL(var, type, dim1, dim2, ddim1, ddim2)
#define DATA_PRINTF_MODIFIER
#define polybench_prevent_dce(func)
static void print_array(int w, int h, DATA_TYPE POLYBENCH_2D(imgOut, W, H, w, h))
#define POLYBENCH_DUMP_TARGET
#define POLYBENCH_DUMP_END(s)
#define POLYBENCH_DUMP_FINISH
#define polybench_stop_instruments
#define polybench_print_instruments
#define polybench_start_instruments