OSDN Git Service

Calculate gradient from parameter instead of using a global variable.
authorCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>
Wed, 22 Jul 2009 08:26:17 +0000 (08:26 +0000)
committerCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>
Wed, 22 Jul 2009 08:26:17 +0000 (08:26 +0000)
Originally committed as revision 19482 to svn://svn.ffmpeg.org/ffmpeg/trunk

tests/rotozoom.c

index ea422ac..e42c275 100644 (file)
@@ -197,8 +197,8 @@ static int ipol(uint8_t *src, int x, int y){
 
 static void gen_image(int num, int w, int h)
 {
-  const int c = h_cos [teta];
-  const int s = h_sin [teta];
+  const int c = h_cos [num % 360];
+  const int s = h_sin [num % 360];
 
   const int xi = -(w/2) * c;
   const int yi =  (w/2) * s;