# HG changeset patch # User michael # Date 1104418081 0 # Node ID 17ec73c657487a0aba56214186c1f5b8c8f2b574 # Parent f4709a828e7e3d5fbd08ff85b8e3f1c03964c30b imgresample test cleanup patch by (Panagiotis Issaris ) diff -r f4709a828e7e -r 17ec73c65748 imgresample.c --- a/imgresample.c Wed Dec 29 23:17:42 2004 +0000 +++ b/imgresample.c Thu Dec 30 14:48:01 2004 +0000 @@ -626,21 +626,7 @@ } #ifdef TEST - -void *av_mallocz(int size) -{ - void *ptr; - ptr = malloc(size); - memset(ptr, 0, size); - return ptr; -} - -void av_free(void *ptr) -{ - /* XXX: this test should not be needed on most libcs */ - if (ptr) - free(ptr); -} +#include /* input */ #define XSIZE 256 @@ -667,11 +653,11 @@ int i, ph; for(ph=0;phh_filters[0][0]); component_resample(s, img1, xsize, xsize, ysize, img + 50 * XSIZE, XSIZE, XSIZE, YSIZE - 100); @@ -748,7 +734,7 @@ /* mmx test */ #ifdef HAVE_MMX - printf("MMX test\n"); + av_log(NULL, AV_LOG_INFO, "MMX test\n"); fact = 0.72; xsize = (int)(XSIZE * fact); ysize = (int)(YSIZE * fact); @@ -762,10 +748,10 @@ component_resample(s, img2, xsize, xsize, ysize, img, XSIZE, XSIZE, YSIZE); if (memcmp(img1, img2, xsize * ysize) != 0) { - fprintf(stderr, "mmx error\n"); + av_log(NULL, AV_LOG_ERROR, "mmx error\n"); exit(1); } - printf("MMX OK\n"); + av_log(NULL, AV_LOG_INFO, "MMX OK\n"); #endif return 0; }