mirror of https://git.ffmpeg.org/ffmpeg.git
Mark non-exported functions in test and example programs as static.
Originally committed as revision 18259 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
cafe71c62d
commit
504ffed19f
|
@ -43,7 +43,7 @@
|
||||||
/*
|
/*
|
||||||
* Audio encoding example
|
* Audio encoding example
|
||||||
*/
|
*/
|
||||||
void audio_encode_example(const char *filename)
|
static void audio_encode_example(const char *filename)
|
||||||
{
|
{
|
||||||
AVCodec *codec;
|
AVCodec *codec;
|
||||||
AVCodecContext *c= NULL;
|
AVCodecContext *c= NULL;
|
||||||
|
@ -111,7 +111,7 @@ void audio_encode_example(const char *filename)
|
||||||
/*
|
/*
|
||||||
* Audio decoding.
|
* 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;
|
AVCodec *codec;
|
||||||
AVCodecContext *c= NULL;
|
AVCodecContext *c= NULL;
|
||||||
|
@ -186,7 +186,7 @@ void audio_decode_example(const char *outfilename, const char *filename)
|
||||||
/*
|
/*
|
||||||
* Video encoding example
|
* Video encoding example
|
||||||
*/
|
*/
|
||||||
void video_encode_example(const char *filename)
|
static void video_encode_example(const char *filename)
|
||||||
{
|
{
|
||||||
AVCodec *codec;
|
AVCodec *codec;
|
||||||
AVCodecContext *c= NULL;
|
AVCodecContext *c= NULL;
|
||||||
|
@ -297,7 +297,8 @@ void video_encode_example(const char *filename)
|
||||||
* Video decoding example
|
* 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;
|
FILE *f;
|
||||||
int i;
|
int i;
|
||||||
|
@ -309,7 +310,7 @@ void pgm_save(unsigned char *buf,int wrap, int xsize,int ysize,char *filename)
|
||||||
fclose(f);
|
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;
|
AVCodec *codec;
|
||||||
AVCodecContext *c= NULL;
|
AVCodecContext *c= NULL;
|
||||||
|
|
|
@ -150,7 +150,7 @@ struct algo algos[] = {
|
||||||
|
|
||||||
uint8_t cropTbl[256 + 2 * MAX_NEG_CROP];
|
uint8_t cropTbl[256 + 2 * MAX_NEG_CROP];
|
||||||
|
|
||||||
int64_t gettime(void)
|
static int64_t gettime(void)
|
||||||
{
|
{
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
gettimeofday(&tv,NULL);
|
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};
|
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;
|
int i;
|
||||||
|
|
||||||
|
@ -198,7 +198,7 @@ static inline void mmx_emms(void)
|
||||||
#endif
|
#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_func)(DCTELEM *block),
|
||||||
void (*fdct_ref)(DCTELEM *block), int form, int test)
|
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_dest[64] __attribute__ ((aligned (8)));
|
||||||
static uint8_t img_dest1[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 int init;
|
||||||
static double c8[8][8];
|
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))
|
void (*idct248_put)(uint8_t *dest, int line_size, int16_t *block))
|
||||||
{
|
{
|
||||||
int it, i, it1, ti, ti1, err_max, v;
|
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);
|
name, (double)it1 * 1000.0 / (double)ti1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void help(void)
|
static void help(void)
|
||||||
{
|
{
|
||||||
printf("dct-test [-i] [<test-number>]\n"
|
printf("dct-test [-i] [<test-number>]\n"
|
||||||
"test-number 0 -> test with random matrixes\n"
|
"test-number 0 -> test with random matrixes\n"
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
|
|
||||||
FFTComplex *exptab;
|
FFTComplex *exptab;
|
||||||
|
|
||||||
void fft_ref_init(int nbits, int inverse)
|
static void fft_ref_init(int nbits, int inverse)
|
||||||
{
|
{
|
||||||
int n, i;
|
int n, i;
|
||||||
double c1, s1, alpha;
|
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;
|
int n, i, j, k, n2;
|
||||||
double tmp_re, tmp_im, s, c;
|
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<<nbits;
|
int n = 1<<nbits;
|
||||||
int k, i, a;
|
int k, i, a;
|
||||||
|
@ -111,7 +111,7 @@ void imdct_ref(float *out, float *in, int nbits)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* NOTE: no normalisation by 1 / N is done */
|
/* 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 n = 1<<nbits;
|
||||||
int k, i;
|
int k, i;
|
||||||
|
@ -129,21 +129,21 @@ void mdct_ref(float *output, float *input, int nbits)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
float frandom(void)
|
static float frandom(void)
|
||||||
{
|
{
|
||||||
AVLFG prn;
|
AVLFG prn;
|
||||||
av_lfg_init(&prn, 1);
|
av_lfg_init(&prn, 1);
|
||||||
return (float)((av_lfg_get(&prn) & 0xffff) - 32768) / 32768.0;
|
return (float)((av_lfg_get(&prn) & 0xffff) - 32768) / 32768.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int64_t gettime(void)
|
static int64_t gettime(void)
|
||||||
{
|
{
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
gettimeofday(&tv,NULL);
|
gettimeofday(&tv,NULL);
|
||||||
return (int64_t)tv.tv_sec * 1000000 + tv.tv_usec;
|
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;
|
int i;
|
||||||
double max= 0;
|
double max= 0;
|
||||||
|
@ -162,7 +162,7 @@ void check_diff(float *tab1, float *tab2, int n)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void help(void)
|
static void help(void)
|
||||||
{
|
{
|
||||||
av_log(NULL, AV_LOG_INFO,"usage: fft-test [-h] [-s] [-i] [-n b]\n"
|
av_log(NULL, AV_LOG_INFO,"usage: fft-test [-h] [-s] [-i] [-n b]\n"
|
||||||
"-h print this help\n"
|
"-h print this help\n"
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
uint8_t img1[WIDTH * HEIGHT];
|
uint8_t img1[WIDTH * HEIGHT];
|
||||||
uint8_t img2[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;
|
int i;
|
||||||
AVLFG prn;
|
AVLFG prn;
|
||||||
|
@ -56,14 +56,14 @@ void fill_random(uint8_t *tab, int size)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void help(void)
|
static void help(void)
|
||||||
{
|
{
|
||||||
printf("motion-test [-h]\n"
|
printf("motion-test [-h]\n"
|
||||||
"test motion implementations\n");
|
"test motion implementations\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int64_t gettime(void)
|
static int64_t gettime(void)
|
||||||
{
|
{
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
gettimeofday(&tv,NULL);
|
gettimeofday(&tv,NULL);
|
||||||
|
@ -74,7 +74,7 @@ int64_t gettime(void)
|
||||||
|
|
||||||
int dummy;
|
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)
|
me_cmp_func test_func, me_cmp_func ref_func)
|
||||||
{
|
{
|
||||||
int x, y, d1, d2, it;
|
int x, y, d1, d2, it;
|
||||||
|
|
|
@ -106,7 +106,8 @@ char *av_base64_encode(char *out, int out_size, const uint8_t *in, int in_size)
|
||||||
#define MAX_DATA_SIZE 1024
|
#define MAX_DATA_SIZE 1024
|
||||||
#define MAX_ENCODED_SIZE 2048
|
#define MAX_ENCODED_SIZE 2048
|
||||||
|
|
||||||
int test_encode_decode(const uint8_t *data, unsigned int data_size, const char *encoded_ref)
|
static int test_encode_decode(const uint8_t *data, unsigned int data_size,
|
||||||
|
const char *encoded_ref)
|
||||||
{
|
{
|
||||||
char encoded[MAX_ENCODED_SIZE];
|
char encoded[MAX_ENCODED_SIZE];
|
||||||
uint8_t data2[MAX_DATA_SIZE];
|
uint8_t data2[MAX_DATA_SIZE];
|
||||||
|
|
|
@ -349,7 +349,7 @@ static const uint8_t cbc_key[] = {
|
||||||
0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, 0x01, 0x23
|
0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, 0x01, 0x23
|
||||||
};
|
};
|
||||||
|
|
||||||
int run_test(int cbc, int decrypt) {
|
static int run_test(int cbc, int decrypt) {
|
||||||
AVDES d;
|
AVDES d;
|
||||||
int delay = cbc && !decrypt ? 2 : 1;
|
int delay = cbc && !decrypt ? 2 : 1;
|
||||||
uint64_t res;
|
uint64_t res;
|
||||||
|
|
|
@ -174,7 +174,7 @@ static void print(AVTreeNode *t, int depth){
|
||||||
av_log(NULL, AV_LOG_ERROR, "NULL\n");
|
av_log(NULL, AV_LOG_ERROR, "NULL\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
int cmp(const void *a, const void *b){
|
static int cmp(const void *a, const void *b){
|
||||||
return a-b;
|
return a-b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue