From 13160c0708a9300a6ec4ce208767723ce5e04820 Mon Sep 17 00:00:00 2001 From: Panagiotis Issaris Date: Thu, 30 Dec 2004 14:48:01 +0000 Subject: [PATCH] imgresample test cleanup patch by (Panagiotis Issaris ) Originally committed as revision 3784 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/imgresample.c | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/libavcodec/imgresample.c b/libavcodec/imgresample.c index 35aff28aea..b4c5f360ad 100644 --- a/libavcodec/imgresample.c +++ b/libavcodec/imgresample.c @@ -626,21 +626,7 @@ void img_resample_close(ImgReSampleContext *s) } #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 @@ static void dump_filter(int16_t *filter) 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 @@ int main(int argc, char **argv) /* 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 @@ int main(int argc, char **argv) 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; }