34 #define FUNC(s, d, n) { s, d, #n, n }
36 int main(
int argc,
char **argv)
44 if (!srcBuffer || !dstBuffer)
50 for (funcNum = 0; ; funcNum++) {
100 if (!func_info[funcNum].
func)
106 for (width = 63; width > 0; width--) {
108 for (dstOffset = 128; dstOffset < 196; dstOffset += 4) {
112 for (srcOffset = 128; srcOffset < 196; srcOffset += 4) {
114 uint8_t *dst = dstBuffer + dstOffset;
115 const char *
name = NULL;
121 srcBpp = func_info[funcNum].src_bpp;
122 dstBpp = func_info[funcNum].dst_bpp;
123 name = func_info[funcNum].name;
125 func_info[funcNum].func(src, dst, width * srcBpp);
130 for (i = 0; i <
SIZE; i++) {
133 "src damaged at %d w:%d src:%d dst:%d %s\n",
134 i, width, srcOffset, dstOffset, name);
139 for (i = 0; i < dstOffset; i++) {
142 "dst damaged at %d w:%d src:%d dst:%d %s\n",
143 i, width, srcOffset, dstOffset, name);
148 for (i = dstOffset + width * dstBpp; i <
SIZE; i++) {
151 "dst damaged at %d w:%d src:%d dst:%d %s\n",
152 i, width, srcOffset, dstOffset, name);
167 "\n%d converters passed, %d converters randomly overwrote memory\n",
168 passedNum, failedNum);