Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(341)

Side by Side Diff: source/config/linux/x64/vpx_dsp_rtcd.h

Issue 1162573005: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « source/config/linux/x64/vpx_config.c ('k') | source/config/mac/ia32/vp8_rtcd.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #ifndef VPX_DSP_RTCD_H_ 1 #ifndef VPX_DSP_RTCD_H_
2 #define VPX_DSP_RTCD_H_ 2 #define VPX_DSP_RTCD_H_
3 3
4 #ifdef RTCD_C 4 #ifdef RTCD_C
5 #define RTCD_EXTERN 5 #define RTCD_EXTERN
6 #else 6 #else
7 #define RTCD_EXTERN extern 7 #define RTCD_EXTERN extern
8 #endif 8 #endif
9 9
10 /* 10 /*
11 * DSP 11 * DSP
12 */ 12 */
13 13
14 #include "vpx/vpx_integer.h" 14 #include "vpx/vpx_integer.h"
15 15
16 16
17 #ifdef __cplusplus 17 #ifdef __cplusplus
18 extern "C" { 18 extern "C" {
19 #endif 19 #endif
20 20
21 void vpx_comp_avg_pred_c(uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride);
22 #define vpx_comp_avg_pred vpx_comp_avg_pred_c
23
24 void vpx_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum);
25 void vpx_get16x16var_sse2(const uint8_t *src_ptr, int source_stride, const uint8 _t *ref_ptr, int ref_stride, unsigned int *sse, int *sum);
26 void vpx_get16x16var_avx2(const uint8_t *src_ptr, int source_stride, const uint8 _t *ref_ptr, int ref_stride, unsigned int *sse, int *sum);
27 RTCD_EXTERN void (*vpx_get16x16var)(const uint8_t *src_ptr, int source_stride, c onst uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum);
28
29 unsigned int vpx_get4x4sse_cs_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride);
30 #define vpx_get4x4sse_cs vpx_get4x4sse_cs_c
31
32 void vpx_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *r ef_ptr, int ref_stride, unsigned int *sse, int *sum);
33 void vpx_get8x8var_mmx(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum);
34 void vpx_get8x8var_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum);
35 #define vpx_get8x8var vpx_get8x8var_sse2
36
37 unsigned int vpx_get_mb_ss_c(const int16_t *);
38 unsigned int vpx_get_mb_ss_mmx(const int16_t *);
39 unsigned int vpx_get_mb_ss_sse2(const int16_t *);
40 #define vpx_get_mb_ss vpx_get_mb_ss_sse2
41
42 unsigned int vpx_mse16x16_c(const uint8_t *src_ptr, int source_stride, const ui nt8_t *ref_ptr, int recon_stride, unsigned int *sse);
43 unsigned int vpx_mse16x16_mmx(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse);
44 unsigned int vpx_mse16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse);
45 unsigned int vpx_mse16x16_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse);
46 RTCD_EXTERN unsigned int (*vpx_mse16x16)(const uint8_t *src_ptr, int source_str ide, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse);
47
48 unsigned int vpx_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uin t8_t *ref_ptr, int recon_stride, unsigned int *sse);
49 unsigned int vpx_mse16x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse);
50 #define vpx_mse16x8 vpx_mse16x8_sse2
51
52 unsigned int vpx_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uin t8_t *ref_ptr, int recon_stride, unsigned int *sse);
53 unsigned int vpx_mse8x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse);
54 #define vpx_mse8x16 vpx_mse8x16_sse2
55
56 unsigned int vpx_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint 8_t *ref_ptr, int recon_stride, unsigned int *sse);
57 unsigned int vpx_mse8x8_sse2(const uint8_t *src_ptr, int source_stride, const u int8_t *ref_ptr, int recon_stride, unsigned int *sse);
58 #define vpx_mse8x8 vpx_mse8x8_sse2
59
21 unsigned int vpx_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_ t *ref_ptr, int ref_stride); 60 unsigned int vpx_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_ t *ref_ptr, int ref_stride);
22 unsigned int vpx_sad16x16_mmx(const uint8_t *src_ptr, int src_stride, const uint 8_t *ref_ptr, int ref_stride); 61 unsigned int vpx_sad16x16_mmx(const uint8_t *src_ptr, int src_stride, const uint 8_t *ref_ptr, int ref_stride);
23 unsigned int vpx_sad16x16_sse2(const uint8_t *src_ptr, int src_stride, const uin t8_t *ref_ptr, int ref_stride); 62 unsigned int vpx_sad16x16_sse2(const uint8_t *src_ptr, int src_stride, const uin t8_t *ref_ptr, int ref_stride);
24 #define vpx_sad16x16 vpx_sad16x16_sse2 63 #define vpx_sad16x16 vpx_sad16x16_sse2
25 64
26 unsigned int vpx_sad16x16_avg_c(const uint8_t *src_ptr, int src_stride, const ui nt8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); 65 unsigned int vpx_sad16x16_avg_c(const uint8_t *src_ptr, int src_stride, const ui nt8_t *ref_ptr, int ref_stride, const uint8_t *second_pred);
27 unsigned int vpx_sad16x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); 66 unsigned int vpx_sad16x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred);
28 #define vpx_sad16x16_avg vpx_sad16x16_avg_sse2 67 #define vpx_sad16x16_avg vpx_sad16x16_avg_sse2
29 68
30 void vpx_sad16x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref _ptr, int ref_stride, uint32_t *sad_array); 69 void vpx_sad16x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref _ptr, int ref_stride, uint32_t *sad_array);
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 RTCD_EXTERN void (*vpx_sad8x8x3)(const uint8_t *src_ptr, int src_stride, const u int8_t *ref_ptr, int ref_stride, uint32_t *sad_array); 283 RTCD_EXTERN void (*vpx_sad8x8x3)(const uint8_t *src_ptr, int src_stride, const u int8_t *ref_ptr, int ref_stride, uint32_t *sad_array);
245 284
246 void vpx_sad8x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * con st ref_ptr[], int ref_stride, uint32_t *sad_array); 285 void vpx_sad8x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * con st ref_ptr[], int ref_stride, uint32_t *sad_array);
247 void vpx_sad8x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); 286 void vpx_sad8x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array);
248 #define vpx_sad8x8x4d vpx_sad8x8x4d_sse2 287 #define vpx_sad8x8x4d vpx_sad8x8x4d_sse2
249 288
250 void vpx_sad8x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_p tr, int ref_stride, uint32_t *sad_array); 289 void vpx_sad8x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_p tr, int ref_stride, uint32_t *sad_array);
251 void vpx_sad8x8x8_sse4_1(const uint8_t *src_ptr, int src_stride, const uint8_t * ref_ptr, int ref_stride, uint32_t *sad_array); 290 void vpx_sad8x8x8_sse4_1(const uint8_t *src_ptr, int src_stride, const uint8_t * ref_ptr, int ref_stride, uint32_t *sad_array);
252 RTCD_EXTERN void (*vpx_sad8x8x8)(const uint8_t *src_ptr, int src_stride, const u int8_t *ref_ptr, int ref_stride, uint32_t *sad_array); 291 RTCD_EXTERN void (*vpx_sad8x8x8)(const uint8_t *src_ptr, int src_stride, const u int8_t *ref_ptr, int ref_stride, uint32_t *sad_array);
253 292
293 unsigned int vpx_variance16x16_c(const uint8_t *src_ptr, int source_stride, cons t uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
294 unsigned int vpx_variance16x16_mmx(const uint8_t *src_ptr, int source_stride, co nst uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
295 unsigned int vpx_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, c onst uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
296 unsigned int vpx_variance16x16_avx2(const uint8_t *src_ptr, int source_stride, c onst uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
297 RTCD_EXTERN unsigned int (*vpx_variance16x16)(const uint8_t *src_ptr, int source _stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
298
299 unsigned int vpx_variance16x32_c(const uint8_t *src_ptr, int source_stride, cons t uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
300 unsigned int vpx_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, c onst uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
301 #define vpx_variance16x32 vpx_variance16x32_sse2
302
303 unsigned int vpx_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
304 unsigned int vpx_variance16x8_mmx(const uint8_t *src_ptr, int source_stride, con st uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
305 unsigned int vpx_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, co nst uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
306 #define vpx_variance16x8 vpx_variance16x8_sse2
307
308 unsigned int vpx_variance32x16_c(const uint8_t *src_ptr, int source_stride, cons t uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
309 unsigned int vpx_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, c onst uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
310 unsigned int vpx_variance32x16_avx2(const uint8_t *src_ptr, int source_stride, c onst uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
311 RTCD_EXTERN unsigned int (*vpx_variance32x16)(const uint8_t *src_ptr, int source _stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
312
313 unsigned int vpx_variance32x32_c(const uint8_t *src_ptr, int source_stride, cons t uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
314 unsigned int vpx_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, c onst uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
315 unsigned int vpx_variance32x32_avx2(const uint8_t *src_ptr, int source_stride, c onst uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
316 RTCD_EXTERN unsigned int (*vpx_variance32x32)(const uint8_t *src_ptr, int source _stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
317
318 unsigned int vpx_variance32x64_c(const uint8_t *src_ptr, int source_stride, cons t uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
319 unsigned int vpx_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, c onst uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
320 #define vpx_variance32x64 vpx_variance32x64_sse2
321
322 unsigned int vpx_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
323 unsigned int vpx_variance4x4_mmx(const uint8_t *src_ptr, int source_stride, cons t uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
324 unsigned int vpx_variance4x4_sse2(const uint8_t *src_ptr, int source_stride, con st uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
325 #define vpx_variance4x4 vpx_variance4x4_sse2
326
327 unsigned int vpx_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
328 unsigned int vpx_variance4x8_sse2(const uint8_t *src_ptr, int source_stride, con st uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
329 #define vpx_variance4x8 vpx_variance4x8_sse2
330
331 unsigned int vpx_variance64x32_c(const uint8_t *src_ptr, int source_stride, cons t uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
332 unsigned int vpx_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, c onst uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
333 unsigned int vpx_variance64x32_avx2(const uint8_t *src_ptr, int source_stride, c onst uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
334 RTCD_EXTERN unsigned int (*vpx_variance64x32)(const uint8_t *src_ptr, int source _stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
335
336 unsigned int vpx_variance64x64_c(const uint8_t *src_ptr, int source_stride, cons t uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
337 unsigned int vpx_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, c onst uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
338 unsigned int vpx_variance64x64_avx2(const uint8_t *src_ptr, int source_stride, c onst uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
339 RTCD_EXTERN unsigned int (*vpx_variance64x64)(const uint8_t *src_ptr, int source _stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
340
341 unsigned int vpx_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
342 unsigned int vpx_variance8x16_mmx(const uint8_t *src_ptr, int source_stride, con st uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
343 unsigned int vpx_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, co nst uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
344 #define vpx_variance8x16 vpx_variance8x16_sse2
345
346 unsigned int vpx_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
347 unsigned int vpx_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, con st uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
348 #define vpx_variance8x4 vpx_variance8x4_sse2
349
350 unsigned int vpx_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
351 unsigned int vpx_variance8x8_mmx(const uint8_t *src_ptr, int source_stride, cons t uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
352 unsigned int vpx_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, con st uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
353 #define vpx_variance8x8 vpx_variance8x8_sse2
354
254 void vpx_dsp_rtcd(void); 355 void vpx_dsp_rtcd(void);
255 356
256 #ifdef RTCD_C 357 #ifdef RTCD_C
257 #include "vpx_ports/x86.h" 358 #include "vpx_ports/x86.h"
258 static void setup_rtcd_internal(void) 359 static void setup_rtcd_internal(void)
259 { 360 {
260 int flags = x86_simd_caps(); 361 int flags = x86_simd_caps();
261 362
262 (void)flags; 363 (void)flags;
263 364
365 vpx_get16x16var = vpx_get16x16var_sse2;
366 if (flags & HAS_AVX2) vpx_get16x16var = vpx_get16x16var_avx2;
367 vpx_mse16x16 = vpx_mse16x16_sse2;
368 if (flags & HAS_AVX2) vpx_mse16x16 = vpx_mse16x16_avx2;
264 vpx_sad16x16x3 = vpx_sad16x16x3_c; 369 vpx_sad16x16x3 = vpx_sad16x16x3_c;
265 if (flags & HAS_SSE3) vpx_sad16x16x3 = vpx_sad16x16x3_sse3; 370 if (flags & HAS_SSE3) vpx_sad16x16x3 = vpx_sad16x16x3_sse3;
266 if (flags & HAS_SSSE3) vpx_sad16x16x3 = vpx_sad16x16x3_ssse3; 371 if (flags & HAS_SSSE3) vpx_sad16x16x3 = vpx_sad16x16x3_ssse3;
267 vpx_sad16x16x8 = vpx_sad16x16x8_c; 372 vpx_sad16x16x8 = vpx_sad16x16x8_c;
268 if (flags & HAS_SSE4_1) vpx_sad16x16x8 = vpx_sad16x16x8_sse4_1; 373 if (flags & HAS_SSE4_1) vpx_sad16x16x8 = vpx_sad16x16x8_sse4_1;
269 vpx_sad16x8x3 = vpx_sad16x8x3_c; 374 vpx_sad16x8x3 = vpx_sad16x8x3_c;
270 if (flags & HAS_SSE3) vpx_sad16x8x3 = vpx_sad16x8x3_sse3; 375 if (flags & HAS_SSE3) vpx_sad16x8x3 = vpx_sad16x8x3_sse3;
271 if (flags & HAS_SSSE3) vpx_sad16x8x3 = vpx_sad16x8x3_ssse3; 376 if (flags & HAS_SSSE3) vpx_sad16x8x3 = vpx_sad16x8x3_ssse3;
272 vpx_sad16x8x8 = vpx_sad16x8x8_c; 377 vpx_sad16x8x8 = vpx_sad16x8x8_c;
273 if (flags & HAS_SSE4_1) vpx_sad16x8x8 = vpx_sad16x8x8_sse4_1; 378 if (flags & HAS_SSE4_1) vpx_sad16x8x8 = vpx_sad16x8x8_sse4_1;
(...skipping 26 matching lines...) Expand all
300 vpx_sad64x64x4d = vpx_sad64x64x4d_sse2; 405 vpx_sad64x64x4d = vpx_sad64x64x4d_sse2;
301 if (flags & HAS_AVX2) vpx_sad64x64x4d = vpx_sad64x64x4d_avx2; 406 if (flags & HAS_AVX2) vpx_sad64x64x4d = vpx_sad64x64x4d_avx2;
302 vpx_sad8x16x3 = vpx_sad8x16x3_c; 407 vpx_sad8x16x3 = vpx_sad8x16x3_c;
303 if (flags & HAS_SSE3) vpx_sad8x16x3 = vpx_sad8x16x3_sse3; 408 if (flags & HAS_SSE3) vpx_sad8x16x3 = vpx_sad8x16x3_sse3;
304 vpx_sad8x16x8 = vpx_sad8x16x8_c; 409 vpx_sad8x16x8 = vpx_sad8x16x8_c;
305 if (flags & HAS_SSE4_1) vpx_sad8x16x8 = vpx_sad8x16x8_sse4_1; 410 if (flags & HAS_SSE4_1) vpx_sad8x16x8 = vpx_sad8x16x8_sse4_1;
306 vpx_sad8x8x3 = vpx_sad8x8x3_c; 411 vpx_sad8x8x3 = vpx_sad8x8x3_c;
307 if (flags & HAS_SSE3) vpx_sad8x8x3 = vpx_sad8x8x3_sse3; 412 if (flags & HAS_SSE3) vpx_sad8x8x3 = vpx_sad8x8x3_sse3;
308 vpx_sad8x8x8 = vpx_sad8x8x8_c; 413 vpx_sad8x8x8 = vpx_sad8x8x8_c;
309 if (flags & HAS_SSE4_1) vpx_sad8x8x8 = vpx_sad8x8x8_sse4_1; 414 if (flags & HAS_SSE4_1) vpx_sad8x8x8 = vpx_sad8x8x8_sse4_1;
415 vpx_variance16x16 = vpx_variance16x16_sse2;
416 if (flags & HAS_AVX2) vpx_variance16x16 = vpx_variance16x16_avx2;
417 vpx_variance32x16 = vpx_variance32x16_sse2;
418 if (flags & HAS_AVX2) vpx_variance32x16 = vpx_variance32x16_avx2;
419 vpx_variance32x32 = vpx_variance32x32_sse2;
420 if (flags & HAS_AVX2) vpx_variance32x32 = vpx_variance32x32_avx2;
421 vpx_variance64x32 = vpx_variance64x32_sse2;
422 if (flags & HAS_AVX2) vpx_variance64x32 = vpx_variance64x32_avx2;
423 vpx_variance64x64 = vpx_variance64x64_sse2;
424 if (flags & HAS_AVX2) vpx_variance64x64 = vpx_variance64x64_avx2;
310 } 425 }
311 #endif 426 #endif
312 427
313 #ifdef __cplusplus 428 #ifdef __cplusplus
314 } // extern "C" 429 } // extern "C"
315 #endif 430 #endif
316 431
317 #endif 432 #endif
OLDNEW
« no previous file with comments | « source/config/linux/x64/vpx_config.c ('k') | source/config/mac/ia32/vp8_rtcd.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698