Originally committed as revision 18259 to svn://svn.ffmpeg.org/ffmpeg/trunk
Unified · Split
| @@ -43,7 +43,7 @@ · 42 unmodified lines | ||
| 43 | 43 | /* |
| 44 | 44 | * Audio encoding example |
| 45 | 45 | */ |
| 46 | −void audio_encode_example(const char *filename) | |
| 46 | +static void audio_encode_example(const char *filename) | |
| 47 | 47 | { |
| 48 | 48 | AVCodec *codec; |
| 49 | 49 | AVCodecContext *c= NULL; |
| @@ -111,7 +111,7 @@ void audio_encode_example(const char *filename) · 61 unmodified lines | ||
| 111 | 111 | /* |
| 112 | 112 | * Audio decoding. |
| 113 | 113 | */ |
| 114 | −void audio_decode_example(const char *outfilename, const char *filename) | |
| 114 | +static void audio_decode_example(const char *outfilename, const char *filename) | |
| 115 | 115 | { |
| 116 | 116 | AVCodec *codec; |
| 117 | 117 | AVCodecContext *c= NULL; |
| @@ -186,7 +186,7 @@ void audio_decode_example(const char *outfilename, const char *filename) · 68 unmodified lines | ||
| 186 | 186 | /* |
| 187 | 187 | * Video encoding example |
| 188 | 188 | */ |
| 189 | −void video_encode_example(const char *filename) | |
| 189 | +static void video_encode_example(const char *filename) | |
| 190 | 190 | { |
| 191 | 191 | AVCodec *codec; |
| 192 | 192 | AVCodecContext *c= NULL; |
| @@ -297,7 +297,8 @@ void video_encode_example(const char *filename) · 104 unmodified lines | ||
| 297 | 297 | * Video decoding example |
| 298 | 298 | */ |
| 299 | 299 | |
| 300 | −void pgm_save(unsigned char *buf,int wrap, int xsize,int ysize,char *filename) | |
| 300 | +static void pgm_save(unsigned char *buf, int wrap, int xsize, int ysize, | |
| 301 | + char *filename) | |
| 301 | 302 | { |
| 302 | 303 | FILE *f; |
| 303 | 304 | int i; |
| @@ -309,7 +310,7 @@ void pgm_save(unsigned char *buf,int wrap, int xsize,int ysize,char *filename) · 5 unmodified lines | ||
| 309 | 310 | fclose(f); |
| 310 | 311 | } |
| 311 | 312 | |
| 312 | −void video_decode_example(const char *outfilename, const char *filename) | |
| 313 | +static void video_decode_example(const char *outfilename, const char *filename) | |
| 313 | 314 | { |
| 314 | 315 | AVCodec *codec; |
| 315 | 316 | AVCodecContext *c= NULL; |
| @@ -150,7 +150,7 @@ struct algo algos[] = { · 149 unmodified lines | ||
| 150 | 150 | |
| 151 | 151 | uint8_t cropTbl[256 + 2 * MAX_NEG_CROP]; |
| 152 | 152 | |
| 153 | −int64_t gettime(void) | |
| 153 | +static int64_t gettime(void) | |
| 154 | 154 | { |
| 155 | 155 | struct timeval tv; |
| 156 | 156 | gettimeofday(&tv,NULL); |
| @@ -175,7 +175,7 @@ static short idct_simple_mmx_perm[64]={ · 18 unmodified lines | ||
| 175 | 175 | |
| 176 | 176 | static const uint8_t idct_sse2_row_perm[8] = {0, 4, 1, 5, 2, 6, 3, 7}; |
| 177 | 177 | |
| 178 | −void idct_mmx_init(void) | |
| 178 | +static void idct_mmx_init(void) | |
| 179 | 179 | { |
| 180 | 180 | int i; |
| 181 | 181 | |
| @@ -198,7 +198,7 @@ static inline void mmx_emms(void) · 16 unmodified lines | ||
| 198 | 198 | #endif |
| 199 | 199 | } |
| 200 | 200 | |
| 201 | −void dct_error(const char *name, int is_idct, | |
| 201 | +static void dct_error(const char *name, int is_idct, | |
| 202 | 202 | void (*fdct_func)(DCTELEM *block), |
| 203 | 203 | void (*fdct_ref)(DCTELEM *block), int form, int test) |
| 204 | 204 | { |
| @@ -387,7 +387,7 @@ void dct_error(const char *name, int is_idct, · 182 unmodified lines | ||
| 387 | 387 | static uint8_t img_dest[64] __attribute__ ((aligned (8))); |
| 388 | 388 | static uint8_t img_dest1[64] __attribute__ ((aligned (8))); |
| 389 | 389 | |
| 390 | −void idct248_ref(uint8_t *dest, int linesize, int16_t *block) | |
| 390 | +static void idct248_ref(uint8_t *dest, int linesize, int16_t *block) | |
| 391 | 391 | { |
| 392 | 392 | static int init; |
| 393 | 393 | static double c8[8][8]; |
| @@ -467,7 +467,7 @@ void idct248_ref(uint8_t *dest, int linesize, int16_t *block) · 73 unmodified lines | ||
| 467 | 467 | } |
| 468 | 468 | } |
| 469 | 469 | |
| 470 | −void idct248_error(const char *name, | |
| 470 | +static void idct248_error(const char *name, | |
| 471 | 471 | void (*idct248_put)(uint8_t *dest, int line_size, int16_t *block)) |
| 472 | 472 | { |
| 473 | 473 | int it, i, it1, ti, ti1, err_max, v; |
| @@ -545,7 +545,7 @@ void idct248_error(const char *name, · 71 unmodified lines | ||
| 545 | 545 | name, (double)it1 * 1000.0 / (double)ti1); |
| 546 | 546 | } |
| 547 | 547 | |
| 548 | −void help(void) | |
| 548 | +static void help(void) | |
| 549 | 549 | { |
| 550 | 550 | printf("dct-test [-i] [<test-number>]\n" |
| 551 | 551 | "test-number 0 -> test with random matrixes\n" |
| @@ -45,7 +45,7 @@ · 44 unmodified lines | ||
| 45 | 45 | |
| 46 | 46 | FFTComplex *exptab; |
| 47 | 47 | |
| 48 | −void fft_ref_init(int nbits, int inverse) | |
| 48 | +static void fft_ref_init(int nbits, int inverse) | |
| 49 | 49 | { |
| 50 | 50 | int n, i; |
| 51 | 51 | double c1, s1, alpha; |
| @@ -64,7 +64,7 @@ void fft_ref_init(int nbits, int inverse) · 12 unmodified lines | ||
| 64 | 64 | } |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | −void fft_ref(FFTComplex *tabr, FFTComplex *tab, int nbits) | |
| 67 | +static void fft_ref(FFTComplex *tabr, FFTComplex *tab, int nbits) | |
| 68 | 68 | { |
| 69 | 69 | int n, i, j, k, n2; |
| 70 | 70 | double tmp_re, tmp_im, s, c; |
| @@ -93,7 +93,7 @@ void fft_ref(FFTComplex *tabr, FFTComplex *tab, int nbits) · 22 unmodified lines | ||
| 93 | 93 | } |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | −void imdct_ref(float *out, float *in, int nbits) | |
| 96 | +static void imdct_ref(float *out, float *in, int nbits) | |
| 97 | 97 | { |
| 98 | 98 | int n = 1<<nbits; |
| 99 | 99 | int k, i, a; |
| @@ -111,7 +111,7 @@ void imdct_ref(float *out, float *in, int nbits) · 11 unmodified lines | ||
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | /* NOTE: no normalisation by 1 / N is done */ |
| 114 | −void mdct_ref(float *output, float *input, int nbits) | |
| 114 | +static void mdct_ref(float *output, float *input, int nbits) | |
| 115 | 115 | { |
| 116 | 116 | int n = 1<<nbits; |
| 117 | 117 | int k, i; |
| @@ -129,21 +129,21 @@ void mdct_ref(float *output, float *input, int nbits) · 11 unmodified lines | ||
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | |
| 132 | −float frandom(void) | |
| 132 | +static float frandom(void) | |
| 133 | 133 | { |
| 134 | 134 | AVLFG prn; |
| 135 | 135 | av_lfg_init(&prn, 1); |
| 136 | 136 | return (float)((av_lfg_get(&prn) & 0xffff) - 32768) / 32768.0; |
| 137 | 137 | } |
| 138 | 138 | |
| 139 | −int64_t gettime(void) | |
| 139 | +static int64_t gettime(void) | |
| 140 | 140 | { |
| 141 | 141 | struct timeval tv; |
| 142 | 142 | gettimeofday(&tv,NULL); |
| 143 | 143 | return (int64_t)tv.tv_sec * 1000000 + tv.tv_usec; |
| 144 | 144 | } |
| 145 | 145 | |
| 146 | −void check_diff(float *tab1, float *tab2, int n) | |
| 146 | +static void check_diff(float *tab1, float *tab2, int n) | |
| 147 | 147 | { |
| 148 | 148 | int i; |
| 149 | 149 | double max= 0; |
| @@ -162,7 +162,7 @@ void check_diff(float *tab1, float *tab2, int n) · 12 unmodified lines | ||
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | |
| 165 | −void help(void) | |
| 165 | +static void help(void) | |
| 166 | 166 | { |
| 167 | 167 | av_log(NULL, AV_LOG_INFO,"usage: fft-test [-h] [-s] [-i] [-n b]\n" |
| 168 | 168 | "-h print this help\n" |
| @@ -41,7 +41,7 @@ · 40 unmodified lines | ||
| 41 | 41 | uint8_t img1[WIDTH * HEIGHT]; |
| 42 | 42 | uint8_t img2[WIDTH * HEIGHT]; |
| 43 | 43 | |
| 44 | −void fill_random(uint8_t *tab, int size) | |
| 44 | +static void fill_random(uint8_t *tab, int size) | |
| 45 | 45 | { |
| 46 | 46 | int i; |
| 47 | 47 | AVLFG prn; |
| @@ -56,14 +56,14 @@ void fill_random(uint8_t *tab, int size) · 8 unmodified lines | ||
| 56 | 56 | } |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | −void help(void) | |
| 59 | +static void help(void) | |
| 60 | 60 | { |
| 61 | 61 | printf("motion-test [-h]\n" |
| 62 | 62 | "test motion implementations\n"); |
| 63 | 63 | exit(1); |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | −int64_t gettime(void) | |
| 66 | +static int64_t gettime(void) | |
| 67 | 67 | { |
| 68 | 68 | struct timeval tv; |
| 69 | 69 | gettimeofday(&tv,NULL); |
| @@ -74,7 +74,7 @@ int64_t gettime(void) · 4 unmodified lines | ||
| 74 | 74 | |
| 75 | 75 | int dummy; |
| 76 | 76 | |
| 77 | −void test_motion(const char *name, | |
| 77 | +static void test_motion(const char *name, | |
| 78 | 78 | me_cmp_func test_func, me_cmp_func ref_func) |
| 79 | 79 | { |
| 80 | 80 | 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) · 105 unmodified lines | ||
| 106 | 106 | #define MAX_DATA_SIZE 1024 |
| 107 | 107 | #define MAX_ENCODED_SIZE 2048 |
| 108 | 108 | |
| 109 | −int test_encode_decode(const uint8_t *data, unsigned int data_size, const char *encoded_ref) | |
| 109 | +static int test_encode_decode(const uint8_t *data, unsigned int data_size, | |
| 110 | + const char *encoded_ref) | |
| 110 | 111 | { |
| 111 | 112 | char encoded[MAX_ENCODED_SIZE]; |
| 112 | 113 | uint8_t data2[MAX_DATA_SIZE]; |
| @@ -349,7 +349,7 @@ static const uint8_t cbc_key[] = { · 348 unmodified lines | ||
| 349 | 349 | 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, 0x01, 0x23 |
| 350 | 350 | }; |
| 351 | 351 | |
| 352 | −int run_test(int cbc, int decrypt) { | |
| 352 | +static int run_test(int cbc, int decrypt) { | |
| 353 | 353 | AVDES d; |
| 354 | 354 | int delay = cbc && !decrypt ? 2 : 1; |
| 355 | 355 | uint64_t res; |
| @@ -174,7 +174,7 @@ static void print(AVTreeNode *t, int depth){ · 173 unmodified lines | ||
| 174 | 174 | av_log(NULL, AV_LOG_ERROR, "NULL\n"); |
| 175 | 175 | } |
| 176 | 176 | |
| 177 | −int cmp(const void *a, const void *b){ | |
| 177 | +static int cmp(const void *a, const void *b){ | |
| 178 | 178 | return a-b; |
| 179 | 179 | } |
| 180 | 180 | |