# HG changeset patch # User diego # Date 1238491979 0 # Node ID b225f51903aff7468290b4fedeb4b94eca155c03 # Parent bf264662cd6b327481c3b1537ca2216bcfefd8c8 Mark non-exported functions in test and example programs as static. diff -r bf264662cd6b -r b225f51903af api-example.c --- 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; diff -r bf264662cd6b -r b225f51903af dct-test.c --- 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] []\n" "test-number 0 -> test with random matrixes\n" diff -r bf264662cd6b -r b225f51903af fft-test.c --- 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<