Mercurial > libavcodec.hg
comparison motion-test.c @ 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 | ea0e5e9a520f |
children | 7f594601d5e9 |
comparison
equal
deleted
inserted
replaced
9294:bf264662cd6b | 9295:b225f51903af |
---|---|
39 #define HEIGHT 64 | 39 #define HEIGHT 64 |
40 | 40 |
41 uint8_t img1[WIDTH * HEIGHT]; | 41 uint8_t img1[WIDTH * HEIGHT]; |
42 uint8_t img2[WIDTH * HEIGHT]; | 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 int i; | 46 int i; |
47 AVLFG prn; | 47 AVLFG prn; |
48 | 48 |
49 av_lfg_init(&prn, 1); | 49 av_lfg_init(&prn, 1); |
54 tab[i] = i; | 54 tab[i] = i; |
55 #endif | 55 #endif |
56 } | 56 } |
57 } | 57 } |
58 | 58 |
59 void help(void) | 59 static void help(void) |
60 { | 60 { |
61 printf("motion-test [-h]\n" | 61 printf("motion-test [-h]\n" |
62 "test motion implementations\n"); | 62 "test motion implementations\n"); |
63 exit(1); | 63 exit(1); |
64 } | 64 } |
65 | 65 |
66 int64_t gettime(void) | 66 static int64_t gettime(void) |
67 { | 67 { |
68 struct timeval tv; | 68 struct timeval tv; |
69 gettimeofday(&tv,NULL); | 69 gettimeofday(&tv,NULL); |
70 return (int64_t)tv.tv_sec * 1000000 + tv.tv_usec; | 70 return (int64_t)tv.tv_sec * 1000000 + tv.tv_usec; |
71 } | 71 } |
72 | 72 |
73 #define NB_ITS 500 | 73 #define NB_ITS 500 |
74 | 74 |
75 int dummy; | 75 int dummy; |
76 | 76 |
77 void test_motion(const char *name, | 77 static void test_motion(const char *name, |
78 me_cmp_func test_func, me_cmp_func ref_func) | 78 me_cmp_func test_func, me_cmp_func ref_func) |
79 { | 79 { |
80 int x, y, d1, d2, it; | 80 int x, y, d1, d2, it; |
81 uint8_t *ptr; | 81 uint8_t *ptr; |
82 int64_t ti; | 82 int64_t ti; |