From 504ffed19f990f91237479be93480d9b597561e2 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Tue, 31 Mar 2009 09:32:59 +0000 Subject: [PATCH] Mark non-exported functions in test and example programs as static. Originally committed as revision 18259 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/api-example.c | 11 ++++++----- libavcodec/dct-test.c | 12 ++++++------ libavcodec/fft-test.c | 16 ++++++++-------- libavcodec/motion-test.c | 8 ++++---- libavutil/base64.c | 3 ++- libavutil/des.c | 2 +- libavutil/tree.c | 2 +- 7 files changed, 28 insertions(+), 26 deletions(-) diff --git a/libavcodec/api-example.c b/libavcodec/api-example.c index 7f682cde30..2a47fea7f8 100644 --- a/libavcodec/api-example.c +++ b/libavcodec/api-example.c @@ -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 @@ void audio_encode_example(const char *filename) /* * 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 @@ void audio_decode_example(const char *outfilename, const char *filename) /* * 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 @@ void video_encode_example(const char *filename) * 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 @@ void pgm_save(unsigned char *buf,int wrap, int xsize,int ysize,char *filename) 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 --git a/libavcodec/dct-test.c b/libavcodec/dct-test.c index f3daf17aec..b9c0ff42ec 100644 --- a/libavcodec/dct-test.c +++ b/libavcodec/dct-test.c @@ -150,7 +150,7 @@ struct algo algos[] = { 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 short idct_simple_mmx_perm[64]={ 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 @@ static inline void mmx_emms(void) #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 @@ void dct_error(const char *name, int is_idct, 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_ref(uint8_t *dest, int linesize, int16_t *block) } } -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 @@ void idct248_error(const char *name, 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 --git a/libavcodec/fft-test.c b/libavcodec/fft-test.c index 4f1ce982de..0a2b93895d 100644 --- a/libavcodec/fft-test.c +++ b/libavcodec/fft-test.c @@ -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_init(int nbits, int inverse) } } -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 fft_ref(FFTComplex *tabr, FFTComplex *tab, int nbits) } } -void imdct_ref(float *out, float *in, int nbits) +static void imdct_ref(float *out, float *in, int nbits) { int n = 1<