2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
12 #ifndef VARIANCE_X86_H
13 #define VARIANCE_X86_H
18 * This platform is commonly built for runtime CPU detection. If you modify
19 * any of the function mappings present in this file, be sure to also update
20 * them in the function pointer initialization code
23 extern prototype_sad(vp8_sad4x4_mmx
);
24 extern prototype_sad(vp8_sad8x8_mmx
);
25 extern prototype_sad(vp8_sad8x16_mmx
);
26 extern prototype_sad(vp8_sad16x8_mmx
);
27 extern prototype_sad(vp8_sad16x16_mmx
);
28 extern prototype_variance(vp8_variance4x4_mmx
);
29 extern prototype_variance(vp8_variance8x8_mmx
);
30 extern prototype_variance(vp8_variance8x16_mmx
);
31 extern prototype_variance(vp8_variance16x8_mmx
);
32 extern prototype_variance(vp8_variance16x16_mmx
);
33 extern prototype_subpixvariance(vp8_sub_pixel_variance4x4_mmx
);
34 extern prototype_subpixvariance(vp8_sub_pixel_variance8x8_mmx
);
35 extern prototype_subpixvariance(vp8_sub_pixel_variance8x16_mmx
);
36 extern prototype_subpixvariance(vp8_sub_pixel_variance16x8_mmx
);
37 extern prototype_subpixvariance(vp8_sub_pixel_variance16x16_mmx
);
38 extern prototype_variance(vp8_variance_halfpixvar16x16_h_mmx
);
39 extern prototype_variance(vp8_variance_halfpixvar16x16_v_mmx
);
40 extern prototype_variance(vp8_variance_halfpixvar16x16_hv_mmx
);
41 extern prototype_subpixvariance(vp8_sub_pixel_mse16x16_mmx
);
42 extern prototype_getmbss(vp8_get_mb_ss_mmx
);
43 extern prototype_variance(vp8_mse16x16_mmx
);
44 extern prototype_sad(vp8_get16x16pred_error_mmx
);
45 extern prototype_variance2(vp8_get8x8var_mmx
);
46 extern prototype_variance2(vp8_get16x16var_mmx
);
47 extern prototype_sad(vp8_get4x4sse_cs_mmx
);
49 #if !CONFIG_RUNTIME_CPU_DETECT
50 #undef vp8_variance_sad4x4
51 #define vp8_variance_sad4x4 vp8_sad4x4_mmx
53 #undef vp8_variance_sad8x8
54 #define vp8_variance_sad8x8 vp8_sad8x8_mmx
56 #undef vp8_variance_sad8x16
57 #define vp8_variance_sad8x16 vp8_sad8x16_mmx
59 #undef vp8_variance_sad16x8
60 #define vp8_variance_sad16x8 vp8_sad16x8_mmx
62 #undef vp8_variance_sad16x16
63 #define vp8_variance_sad16x16 vp8_sad16x16_mmx
65 #undef vp8_variance_var4x4
66 #define vp8_variance_var4x4 vp8_variance4x4_mmx
68 #undef vp8_variance_var8x8
69 #define vp8_variance_var8x8 vp8_variance8x8_mmx
71 #undef vp8_variance_var8x16
72 #define vp8_variance_var8x16 vp8_variance8x16_mmx
74 #undef vp8_variance_var16x8
75 #define vp8_variance_var16x8 vp8_variance16x8_mmx
77 #undef vp8_variance_var16x16
78 #define vp8_variance_var16x16 vp8_variance16x16_mmx
80 #undef vp8_variance_subpixvar4x4
81 #define vp8_variance_subpixvar4x4 vp8_sub_pixel_variance4x4_mmx
83 #undef vp8_variance_subpixvar8x8
84 #define vp8_variance_subpixvar8x8 vp8_sub_pixel_variance8x8_mmx
86 #undef vp8_variance_subpixvar8x16
87 #define vp8_variance_subpixvar8x16 vp8_sub_pixel_variance8x16_mmx
89 #undef vp8_variance_subpixvar16x8
90 #define vp8_variance_subpixvar16x8 vp8_sub_pixel_variance16x8_mmx
92 #undef vp8_variance_subpixvar16x16
93 #define vp8_variance_subpixvar16x16 vp8_sub_pixel_variance16x16_mmx
95 #undef vp8_variance_halfpixvar16x16_h
96 #define vp8_variance_halfpixvar16x16_h vp8_variance_halfpixvar16x16_h_mmx
98 #undef vp8_variance_halfpixvar16x16_v
99 #define vp8_variance_halfpixvar16x16_v vp8_variance_halfpixvar16x16_v_mmx
101 #undef vp8_variance_halfpixvar16x16_hv
102 #define vp8_variance_halfpixvar16x16_hv vp8_variance_halfpixvar16x16_hv_mmx
104 #undef vp8_variance_subpixmse16x16
105 #define vp8_variance_subpixmse16x16 vp8_sub_pixel_mse16x16_mmx
107 #undef vp8_variance_getmbss
108 #define vp8_variance_getmbss vp8_get_mb_ss_mmx
110 #undef vp8_variance_mse16x16
111 #define vp8_variance_mse16x16 vp8_mse16x16_mmx
113 #undef vp8_variance_get16x16prederror
114 #define vp8_variance_get16x16prederror vp8_get16x16pred_error_mmx
116 #undef vp8_variance_get8x8var
117 #define vp8_variance_get8x8var vp8_get8x8var_mmx
119 #undef vp8_variance_get16x16var
120 #define vp8_variance_get16x16var vp8_get16x16var_mmx
122 #undef vp8_variance_get4x4sse_cs
123 #define vp8_variance_get4x4sse_cs vp8_get4x4sse_cs_mmx
130 extern prototype_sad(vp8_sad4x4_wmt
);
131 extern prototype_sad(vp8_sad8x8_wmt
);
132 extern prototype_sad(vp8_sad8x16_wmt
);
133 extern prototype_sad(vp8_sad16x8_wmt
);
134 extern prototype_sad(vp8_sad16x16_wmt
);
135 extern prototype_variance(vp8_variance4x4_wmt
);
136 extern prototype_variance(vp8_variance8x8_wmt
);
137 extern prototype_variance(vp8_variance8x16_wmt
);
138 extern prototype_variance(vp8_variance16x8_wmt
);
139 extern prototype_variance(vp8_variance16x16_wmt
);
140 extern prototype_subpixvariance(vp8_sub_pixel_variance4x4_wmt
);
141 extern prototype_subpixvariance(vp8_sub_pixel_variance8x8_wmt
);
142 extern prototype_subpixvariance(vp8_sub_pixel_variance8x16_wmt
);
143 extern prototype_subpixvariance(vp8_sub_pixel_variance16x8_wmt
);
144 extern prototype_subpixvariance(vp8_sub_pixel_variance16x16_wmt
);
145 extern prototype_variance(vp8_variance_halfpixvar16x16_h_wmt
);
146 extern prototype_variance(vp8_variance_halfpixvar16x16_v_wmt
);
147 extern prototype_variance(vp8_variance_halfpixvar16x16_hv_wmt
);
148 extern prototype_subpixvariance(vp8_sub_pixel_mse16x16_wmt
);
149 extern prototype_getmbss(vp8_get_mb_ss_sse2
);
150 extern prototype_variance(vp8_mse16x16_wmt
);
151 extern prototype_sad(vp8_get16x16pred_error_sse2
);
152 extern prototype_variance2(vp8_get8x8var_sse2
);
153 extern prototype_variance2(vp8_get16x16var_sse2
);
155 #if !CONFIG_RUNTIME_CPU_DETECT
156 #undef vp8_variance_sad4x4
157 #define vp8_variance_sad4x4 vp8_sad4x4_wmt
159 #undef vp8_variance_sad8x8
160 #define vp8_variance_sad8x8 vp8_sad8x8_wmt
162 #undef vp8_variance_sad8x16
163 #define vp8_variance_sad8x16 vp8_sad8x16_wmt
165 #undef vp8_variance_sad16x8
166 #define vp8_variance_sad16x8 vp8_sad16x8_wmt
168 #undef vp8_variance_sad16x16
169 #define vp8_variance_sad16x16 vp8_sad16x16_wmt
171 #undef vp8_variance_var4x4
172 #define vp8_variance_var4x4 vp8_variance4x4_wmt
174 #undef vp8_variance_var8x8
175 #define vp8_variance_var8x8 vp8_variance8x8_wmt
177 #undef vp8_variance_var8x16
178 #define vp8_variance_var8x16 vp8_variance8x16_wmt
180 #undef vp8_variance_var16x8
181 #define vp8_variance_var16x8 vp8_variance16x8_wmt
183 #undef vp8_variance_var16x16
184 #define vp8_variance_var16x16 vp8_variance16x16_wmt
186 #undef vp8_variance_subpixvar4x4
187 #define vp8_variance_subpixvar4x4 vp8_sub_pixel_variance4x4_wmt
189 #undef vp8_variance_subpixvar8x8
190 #define vp8_variance_subpixvar8x8 vp8_sub_pixel_variance8x8_wmt
192 #undef vp8_variance_subpixvar8x16
193 #define vp8_variance_subpixvar8x16 vp8_sub_pixel_variance8x16_wmt
195 #undef vp8_variance_subpixvar16x8
196 #define vp8_variance_subpixvar16x8 vp8_sub_pixel_variance16x8_wmt
198 #undef vp8_variance_subpixvar16x16
199 #define vp8_variance_subpixvar16x16 vp8_sub_pixel_variance16x16_wmt
201 #undef vp8_variance_halfpixvar16x16_h
202 #define vp8_variance_halfpixvar16x16_h vp8_variance_halfpixvar16x16_h_wmt
204 #undef vp8_variance_halfpixvar16x16_v
205 #define vp8_variance_halfpixvar16x16_v vp8_variance_halfpixvar16x16_v_wmt
207 #undef vp8_variance_halfpixvar16x16_hv
208 #define vp8_variance_halfpixvar16x16_hv vp8_variance_halfpixvar16x16_hv_wmt
210 #undef vp8_variance_subpixmse16x16
211 #define vp8_variance_subpixmse16x16 vp8_sub_pixel_mse16x16_wmt
213 #undef vp8_variance_getmbss
214 #define vp8_variance_getmbss vp8_get_mb_ss_sse2
216 #undef vp8_variance_mse16x16
217 #define vp8_variance_mse16x16 vp8_mse16x16_wmt
219 #undef vp8_variance_get16x16prederror
220 #define vp8_variance_get16x16prederror vp8_get16x16pred_error_sse2
222 #undef vp8_variance_get8x8var
223 #define vp8_variance_get8x8var vp8_get8x8var_sse2
225 #undef vp8_variance_get16x16var
226 #define vp8_variance_get16x16var vp8_get16x16var_sse2
233 extern prototype_sad(vp8_sad16x16_sse3
);
234 extern prototype_sad(vp8_sad16x8_sse3
);
235 extern prototype_sad_multi_same_address(vp8_sad16x16x3_sse3
);
236 extern prototype_sad_multi_same_address(vp8_sad16x8x3_sse3
);
237 extern prototype_sad_multi_same_address(vp8_sad8x16x3_sse3
);
238 extern prototype_sad_multi_same_address(vp8_sad8x8x3_sse3
);
239 extern prototype_sad_multi_same_address(vp8_sad4x4x3_sse3
);
241 extern prototype_sad_multi_dif_address(vp8_sad16x16x4d_sse3
);
242 extern prototype_sad_multi_dif_address(vp8_sad16x8x4d_sse3
);
243 extern prototype_sad_multi_dif_address(vp8_sad8x16x4d_sse3
);
244 extern prototype_sad_multi_dif_address(vp8_sad8x8x4d_sse3
);
245 extern prototype_sad_multi_dif_address(vp8_sad4x4x4d_sse3
);
247 #if !CONFIG_RUNTIME_CPU_DETECT
249 #undef vp8_variance_sad16x16
250 #define vp8_variance_sad16x16 vp8_sad16x16_sse3
252 #undef vp8_variance_sad16x16x3
253 #define vp8_variance_sad16x16x3 vp8_sad16x16x3_sse3
255 #undef vp8_variance_sad16x8x3
256 #define vp8_variance_sad16x8x3 vp8_sad16x8x3_sse3
258 #undef vp8_variance_sad8x16x3
259 #define vp8_variance_sad8x16x3 vp8_sad8x16x3_sse3
261 #undef vp8_variance_sad8x8x3
262 #define vp8_variance_sad8x8x3 vp8_sad8x8x3_sse3
264 #undef vp8_variance_sad4x4x3
265 #define vp8_variance_sad4x4x3 vp8_sad4x4x3_sse3
267 #undef vp8_variance_sad16x16x4d
268 #define vp8_variance_sad16x16x4d vp8_sad16x16x4d_sse3
270 #undef vp8_variance_sad16x8x4d
271 #define vp8_variance_sad16x8x4d vp8_sad16x8x4d_sse3
273 #undef vp8_variance_sad8x16x4d
274 #define vp8_variance_sad8x16x4d vp8_sad8x16x4d_sse3
276 #undef vp8_variance_sad8x8x4d
277 #define vp8_variance_sad8x8x4d vp8_sad8x8x4d_sse3
279 #undef vp8_variance_sad4x4x4d
280 #define vp8_variance_sad4x4x4d vp8_sad4x4x4d_sse3
287 extern prototype_sad_multi_same_address(vp8_sad16x16x3_ssse3
);
288 extern prototype_sad_multi_same_address(vp8_sad16x8x3_ssse3
);
290 #if !CONFIG_RUNTIME_CPU_DETECT
291 #undef vp8_variance_sad16x16x3
292 #define vp8_variance_sad16x16x3 vp8_sad16x16x3_ssse3
294 #undef vp8_variance_sad16x8x3
295 #define vp8_variance_sad16x8x3 vp8_sad16x8x3_ssse3
302 extern prototype_sad_multi_same_address_1(vp8_sad16x16x8_sse4
);
303 extern prototype_sad_multi_same_address_1(vp8_sad16x8x8_sse4
);
304 extern prototype_sad_multi_same_address_1(vp8_sad8x16x8_sse4
);
305 extern prototype_sad_multi_same_address_1(vp8_sad8x8x8_sse4
);
306 extern prototype_sad_multi_same_address_1(vp8_sad4x4x8_sse4
);
308 #if !CONFIG_RUNTIME_CPU_DETECT
309 #undef vp8_variance_sad16x16x8
310 #define vp8_variance_sad16x16x8 vp8_sad16x16x8_sse4
312 #undef vp8_variance_sad16x8x8
313 #define vp8_variance_sad16x8x8 vp8_sad16x8x8_sse4
315 #undef vp8_variance_sad8x16x8
316 #define vp8_variance_sad8x16x8 vp8_sad8x16x8_sse4
318 #undef vp8_variance_sad8x8x8
319 #define vp8_variance_sad8x8x8 vp8_sad8x8x8_sse4
321 #undef vp8_variance_sad4x4x8
322 #define vp8_variance_sad4x4x8 vp8_sad4x4x8_sse4