1 /*
2 * (c) 2001 Fabrice Bellard
3 *
4 * This file is part of FFmpeg.
5 *
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21 /**
22 * @file
23 * motion test.
24 */
25
26 #include <stdlib.h>
27 #include <stdio.h>
28 #include <string.h>
29
30 #include "config.h"
38
39 #undef printf
40
43
46
48 {
51
55 }
56 }
57
59 {
60 printf(
"motion-test [-h]\n"
61 "test motion implementations\n");
62 }
63
65
67
70 {
72 uint8_t *ptr;
75
76 /* test correctness */
78
81
83 for(x=0;x<
WIDTH-17;x++) {
87 if (d1 != d2) {
88 printf(
"error: mmx=%d c=%d\n", d1, d2);
89 }
90 }
91 }
92 }
94
95 /* speed test */
97 d1 = 0;
100 for(x=0;x<
WIDTH-17;x++) {
103 }
104 }
105 }
107 dummy = d1;
/* avoid optimization */
109
112 (double)(ti / 1000.0));
113 }
114
115
116 int main(
int argc,
char **argv)
117 {
122 int flags_size = HAVE_MMXEXT ? 2 : 1;
123
124 if (argc > 1) {
126 return 1;
127 }
128
129 printf(
"ffmpeg motion test\n");
130
133 return 1;
134 }
135
139 for (
c = 0;
c < flags_size;
c++) {
140 int x;
143
144 for (x = 0; x < 2; x++) {
145 printf(
"%s for %dx%d pixels\n",
c ?
"mmx2" :
"mmx",
146 x ? 8 : 16, x ? 8 : 16);
151 }
152 }
154
155 return 0;
156 }