]> git.sesse.net Git - ffmpeg/blobdiff - tests/rotozoom.c
Move DECODE_BYTES_PAD* macros before Doxygen comments.
[ffmpeg] / tests / rotozoom.c
index 52f5546a398ad93b36119e52c2752783c72ffacb..47da1b05262ef3493fe7fb05c47d0f10348f1302 100644 (file)
@@ -121,8 +121,8 @@ static void rgb24_to_yuv420p(UINT8 *lum, UINT8 *cb, UINT8 *cr,
 #define DEFAULT_HEIGHT  288
 #define DEFAULT_NB_PICT 50
 
-void pgmyuv_save(const char *filename, int w, int h,
-                 unsigned char *rgb_tab)
+static void pgmyuv_save(const char *filename, int w, int h,
+                        unsigned char *rgb_tab)
 {
     FILE *f;
     int i, h2, w2;
@@ -158,7 +158,7 @@ void pgmyuv_save(const char *filename, int w, int h,
 unsigned char *rgb_tab;
 int width, height, wrap;
 
-void put_pixel(int x, int y, int r, int g, int b)
+static void put_pixel(int x, int y, int r, int g, int b)
 {
     unsigned char *p;
 
@@ -176,7 +176,6 @@ unsigned char tab_r[256*256];
 unsigned char tab_g[256*256];
 unsigned char tab_b[256*256];
 
-int teta = 0;
 int h_cos [360];
 int h_sin [360];
 
@@ -195,10 +194,10 @@ static int ipol(uint8_t *src, int x, int y){
     return (((1<<16) - frac_y)*s0 + frac_y*s1)>>24;
 }
 
-void gen_image(int num, int w, int h)
+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;
@@ -234,13 +233,12 @@ void gen_image(int num, int w, int h)
 #endif
     }
   }
-  teta = (teta+1) % 360;
 }
 
 #define W 256
 #define H 256
 
-void init_demo(const char *filename) {
+static void init_demo(const char *filename) {
   int i,j;
   int h;
   int radian;