changeset 9295:b225f51903af libavcodec

Mark non-exported functions in test and example programs as static.
author diego
date Tue, 31 Mar 2009 09:32:59 +0000
parents bf264662cd6b
children 2129ee5b7e0d
files api-example.c dct-test.c fft-test.c motion-test.c
diffstat 4 files changed, 24 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/api-example.c	Tue Mar 31 09:18:00 2009 +0000
+++ b/api-example.c	Tue Mar 31 09:32:59 2009 +0000
@@ -43,7 +43,7 @@
 /*
  * Audio encoding example
  */
-void audio_encode_example(const char *filename)
+static void audio_encode_example(const char *filename)
 {
     AVCodec *codec;
     AVCodecContext *c= NULL;
@@ -111,7 +111,7 @@
 /*
  * Audio decoding.
  */
-void audio_decode_example(const char *outfilename, const char *filename)
+static void audio_decode_example(const char *outfilename, const char *filename)
 {
     AVCodec *codec;
     AVCodecContext *c= NULL;
@@ -186,7 +186,7 @@
 /*
  * Video encoding example
  */
-void video_encode_example(const char *filename)
+static void video_encode_example(const char *filename)
 {
     AVCodec *codec;
     AVCodecContext *c= NULL;
@@ -297,7 +297,8 @@
  * Video decoding example
  */
 
-void pgm_save(unsigned char *buf,int wrap, int xsize,int ysize,char *filename)
+static void pgm_save(unsigned char *buf, int wrap, int xsize, int ysize,
+                     char *filename)
 {
     FILE *f;
     int i;
@@ -309,7 +310,7 @@
     fclose(f);
 }
 
-void video_decode_example(const char *outfilename, const char *filename)
+static void video_decode_example(const char *outfilename, const char *filename)
 {
     AVCodec *codec;
     AVCodecContext *c= NULL;
--- a/dct-test.c	Tue Mar 31 09:18:00 2009 +0000
+++ b/dct-test.c	Tue Mar 31 09:32:59 2009 +0000
@@ -150,7 +150,7 @@
 
 uint8_t cropTbl[256 + 2 * MAX_NEG_CROP];
 
-int64_t gettime(void)
+static int64_t gettime(void)
 {
     struct timeval tv;
     gettimeofday(&tv,NULL);
@@ -175,7 +175,7 @@
 
 static const uint8_t idct_sse2_row_perm[8] = {0, 4, 1, 5, 2, 6, 3, 7};
 
-void idct_mmx_init(void)
+static void idct_mmx_init(void)
 {
     int i;
 
@@ -198,7 +198,7 @@
 #endif
 }
 
-void dct_error(const char *name, int is_idct,
+static void dct_error(const char *name, int is_idct,
                void (*fdct_func)(DCTELEM *block),
                void (*fdct_ref)(DCTELEM *block), int form, int test)
 {
@@ -387,7 +387,7 @@
 static uint8_t img_dest[64] __attribute__ ((aligned (8)));
 static uint8_t img_dest1[64] __attribute__ ((aligned (8)));
 
-void idct248_ref(uint8_t *dest, int linesize, int16_t *block)
+static void idct248_ref(uint8_t *dest, int linesize, int16_t *block)
 {
     static int init;
     static double c8[8][8];
@@ -467,7 +467,7 @@
     }
 }
 
-void idct248_error(const char *name,
+static void idct248_error(const char *name,
                     void (*idct248_put)(uint8_t *dest, int line_size, int16_t *block))
 {
     int it, i, it1, ti, ti1, err_max, v;
@@ -545,7 +545,7 @@
            name, (double)it1 * 1000.0 / (double)ti1);
 }
 
-void help(void)
+static void help(void)
 {
     printf("dct-test [-i] [<test-number>]\n"
            "test-number 0 -> test with random matrixes\n"
--- a/fft-test.c	Tue Mar 31 09:18:00 2009 +0000
+++ b/fft-test.c	Tue Mar 31 09:32:59 2009 +0000
@@ -45,7 +45,7 @@
 
 FFTComplex *exptab;
 
-void fft_ref_init(int nbits, int inverse)
+static void fft_ref_init(int nbits, int inverse)
 {
     int n, i;
     double c1, s1, alpha;
@@ -64,7 +64,7 @@
     }
 }
 
-void fft_ref(FFTComplex *tabr, FFTComplex *tab, int nbits)
+static void fft_ref(FFTComplex *tabr, FFTComplex *tab, int nbits)
 {
     int n, i, j, k, n2;
     double tmp_re, tmp_im, s, c;
@@ -93,7 +93,7 @@
     }
 }
 
-void imdct_ref(float *out, float *in, int nbits)
+static void imdct_ref(float *out, float *in, int nbits)
 {
     int n = 1<<nbits;
     int k, i, a;
@@ -111,7 +111,7 @@
 }
 
 /* NOTE: no normalisation by 1 / N is done */
-void mdct_ref(float *output, float *input, int nbits)
+static void mdct_ref(float *output, float *input, int nbits)
 {
     int n = 1<<nbits;
     int k, i;
@@ -129,21 +129,21 @@
 }
 
 
-float frandom(void)
+static float frandom(void)
 {
     AVLFG prn;
     av_lfg_init(&prn, 1);
     return (float)((av_lfg_get(&prn) & 0xffff) - 32768) / 32768.0;
 }
 
-int64_t gettime(void)
+static int64_t gettime(void)
 {
     struct timeval tv;
     gettimeofday(&tv,NULL);
     return (int64_t)tv.tv_sec * 1000000 + tv.tv_usec;
 }
 
-void check_diff(float *tab1, float *tab2, int n)
+static void check_diff(float *tab1, float *tab2, int n)
 {
     int i;
     double max= 0;
@@ -162,7 +162,7 @@
 }
 
 
-void help(void)
+static void help(void)
 {
     av_log(NULL, AV_LOG_INFO,"usage: fft-test [-h] [-s] [-i] [-n b]\n"
            "-h     print this help\n"
--- a/motion-test.c	Tue Mar 31 09:18:00 2009 +0000
+++ b/motion-test.c	Tue Mar 31 09:32:59 2009 +0000
@@ -41,7 +41,7 @@
 uint8_t img1[WIDTH * HEIGHT];
 uint8_t img2[WIDTH * HEIGHT];
 
-void fill_random(uint8_t *tab, int size)
+static void fill_random(uint8_t *tab, int size)
 {
     int i;
     AVLFG prn;
@@ -56,14 +56,14 @@
     }
 }
 
-void help(void)
+static void help(void)
 {
     printf("motion-test [-h]\n"
            "test motion implementations\n");
     exit(1);
 }
 
-int64_t gettime(void)
+static int64_t gettime(void)
 {
     struct timeval tv;
     gettimeofday(&tv,NULL);
@@ -74,7 +74,7 @@
 
 int dummy;
 
-void test_motion(const char *name,
+static void test_motion(const char *name,
                  me_cmp_func test_func, me_cmp_func ref_func)
 {
     int x, y, d1, d2, it;