1 #define NUM_RECTANGLES 100
2 void generateFrames(TestData
* testdata
, int num
){
5 vsFrameAllocate(&testdata
->frames
[i
],&testdata
->fi
);
8 fillArrayWithNoise(testdata
->frames
[0].data
[0],
9 testdata
->fi
.width
*testdata
->fi
.height
, 10);
10 fillArrayWithNoise(testdata
->frames
[0].data
[1],
11 testdata
->fi
.width
/2*testdata
->fi
.height
/2, 5);
12 fillArrayWithNoise(testdata
->frames
[0].data
[2],
13 testdata
->fi
.width
/2*testdata
->fi
.height
/2, 5);
17 for(k
=0; k
<NUM_RECTANGLES
; k
++){
18 paintRectangle(testdata
->frames
[0].data
[0],&testdata
->fi
,
19 randUpTo(testdata
->fi
.width
), randUpTo(testdata
->fi
.height
),
20 randUpTo((testdata
->fi
.width
>>4)+4),
21 randUpTo((testdata
->fi
.height
>>4)+4),randPixel());
25 VSTransformConfig conf
= vsTransformGetDefaultConfig("test_generate");
26 conf
.interpolType
=VS_Zero
;
28 test_bool(vsTransformDataInit(&td
, &conf
, &testdata
->fi
, &testdata
->fi
) == VS_OK
);
30 fprintf(stderr
, "testframe transforms\n");
33 VSTransform t
= getTestFrameTransform(i
);
34 fprintf(stderr
,"%i: ",i
);
35 storeVSTransform(stderr
,&t
);
37 test_bool(vsTransformPrepare(&td
,&testdata
->frames
[i
-1],&testdata
->frames
[i
])== VS_OK
);
38 test_bool(transformPlanar_float(&td
, t
)== VS_OK
);
39 test_bool(vsTransformFinish(&td
)== VS_OK
);
41 vsTransformDataCleanup(&td
);
46 * c-file-style: "stroustrup"
47 * c-file-offsets: ((case-label . *) (statement-case-intro . *))
48 * indent-tabs-mode: nil
52 * vim: expandtab shiftwidth=2: