From 67f7f316976ad7bbe63795b536cd53038a2106bf Mon Sep 17 00:00:00 2001 From: Fabrice Bellard Date: Thu, 5 Jun 2003 12:36:34 +0000 Subject: use explicit image name Originally committed as revision 1930 to svn://svn.ffmpeg.org/ffmpeg/trunk --- tests/rotozoom.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'tests/rotozoom.c') diff --git a/tests/rotozoom.c b/tests/rotozoom.c index f7c3b0c956..bbf96e138b 100644 --- a/tests/rotozoom.c +++ b/tests/rotozoom.c @@ -188,8 +188,6 @@ void gen_image(int num, int w, int h) const int xj = -(h/2) * s; const int yj = -(h/2) * c; - - unsigned dep; int i,j; int x,y; @@ -211,8 +209,11 @@ void gen_image(int num, int w, int h) #if 1 put_pixel(i, j, ipol(tab_r, x, y), ipol(tab_g, x, y), ipol(tab_b, x, y)); #else - dep = ((x>>16)&255) + (((y>>16)&255)<<8); - put_pixel(i, j, tab_r[dep], tab_g[dep], tab_b[dep]); + { + unsigned dep; + dep = ((x>>16)&255) + (((y>>16)&255)<<8); + put_pixel(i, j, tab_r[dep], tab_g[dep], tab_b[dep]); + } #endif } } @@ -222,7 +223,7 @@ void gen_image(int num, int w, int h) #define W 256 #define H 256 -void init_demo() { +void init_demo(const char *filename) { int i,j; int h; int radian; @@ -230,7 +231,12 @@ void init_demo() { FILE *fichier; - fichier = fopen("lena.pnm","r"); + fichier = fopen(filename,"r"); + if (!fichier) { + perror(filename); + exit(1); + } + fread(line, 1, 15, fichier); for (i=0;i