]> git.sesse.net Git - ffmpeg/blobdiff - tests/videogen.c
lavf: initialize demuxer private options.
[ffmpeg] / tests / videogen.c
index abae577bcac26dbda007b393608191040fa7227a..f114801a8ac1b2cb74f3a55de062e8d6b3f831d3 100644 (file)
@@ -4,20 +4,20 @@
  *
  * Copyright (c) 2002 Fabrice Bellard
  *
- * This file is part of FFmpeg.
+ * This file is part of Libav.
  *
- * FFmpeg is free software; you can redistribute it and/or
+ * Libav is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2.1 of the License, or (at your option) any later version.
  *
- * FFmpeg is distributed in the hope that it will be useful,
+ * Libav is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
+ * License along with Libav; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
@@ -97,8 +97,8 @@ static void rgb24_to_yuv420p(uint8_t *lum, uint8_t *cb, uint8_t *cr,
 #define DEFAULT_HEIGHT  288
 #define DEFAULT_NB_PICT 50 /* 2 seconds */
 
-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;
@@ -134,7 +134,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;
 
@@ -171,7 +171,7 @@ static unsigned int myrnd(unsigned int *seed_ptr, int n)
 #define FRAC_ONE (1 << FRAC_BITS)
 
 /* cosine approximate with 1-x^2 */
-int int_cos(int a)
+static int int_cos(int a)
 {
     int v, neg;
     a = a & (FRAC_ONE - 1);
@@ -198,7 +198,7 @@ VObj objs[NB_OBJS];
 
 unsigned int seed = 1;
 
-void gen_image(int num, int w, int h)
+static void gen_image(int num, int w, int h)
 {
     int r, g, b, x, y, i, dx, dy, x1, y1;
     unsigned int seed1;
@@ -222,7 +222,7 @@ void gen_image(int num, int w, int h)
     for(y=0;y<h;y++) {
         for(x=0;x<w;x++) {
             x1 = (x << FRAC_BITS) + dx;
-            y1 = (y << FRAC_BITS) + dx;
+            y1 = (y << FRAC_BITS) + dy;
             r = ((y1 * 7) >> FRAC_BITS) & 0xff;
             g = (((x1 + y1) * 9) >> FRAC_BITS) & 0xff;
             b = ((x1 * 5) >> FRAC_BITS) & 0xff;
@@ -273,11 +273,6 @@ int main(int argc, char **argv)
         exit(1);
     }
 
-#if 0
-    for(i=0;i<256;i++)
-        printf("cos(%d)=%d\n", i, int_cos(i));
-#endif
-
     w = DEFAULT_WIDTH;
     h = DEFAULT_HEIGHT;