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 VP8_COMMON_VARIANCE_H_
13 #define VP8_COMMON_VARIANCE_H_
15 #include "vpx_config.h"
21 typedef unsigned int(*vp8_sad_fn_t)(
22 const unsigned char *src_ptr,
24 const unsigned char *ref_ptr,
26 unsigned int max_sad);
28 typedef void (*vp8_copy32xn_fn_t)(
29 const unsigned char *src_ptr,
31 const unsigned char *ref_ptr,
35 typedef void (*vp8_sad_multi_fn_t)(
36 const unsigned char *src_ptr,
38 const unsigned char *ref_ptr,
40 unsigned int *sad_array);
42 typedef void (*vp8_sad_multi1_fn_t)
44 const unsigned char *src_ptr,
46 const unsigned char *ref_ptr,
48 unsigned short *sad_array
51 typedef void (*vp8_sad_multi_d_fn_t)
53 const unsigned char *src_ptr,
55 const unsigned char * const ref_ptr[],
57 unsigned int *sad_array
60 typedef unsigned int (*vp8_variance_fn_t)
62 const unsigned char *src_ptr,
64 const unsigned char *ref_ptr,
69 typedef unsigned int (*vp8_subpixvariance_fn_t)
71 const unsigned char *src_ptr,
75 const unsigned char *ref_ptr,
80 typedef void (*vp8_ssimpf_fn_t)
88 unsigned long *sum_sq_s,
89 unsigned long *sum_sq_r,
90 unsigned long *sum_sxr
93 typedef unsigned int (*vp8_getmbss_fn_t)(const short *);
95 typedef unsigned int (*vp8_get16x16prederror_fn_t)
97 const unsigned char *src_ptr,
99 const unsigned char *ref_ptr,
103 typedef struct variance_vtable
106 vp8_variance_fn_t vf;
107 vp8_subpixvariance_fn_t svf;
108 vp8_variance_fn_t svf_halfpix_h;
109 vp8_variance_fn_t svf_halfpix_v;
110 vp8_variance_fn_t svf_halfpix_hv;
111 vp8_sad_multi_fn_t sdx3f;
112 vp8_sad_multi1_fn_t sdx8f;
113 vp8_sad_multi_d_fn_t sdx4df;
114 #if ARCH_X86 || ARCH_X86_64
115 vp8_copy32xn_fn_t copymem;
117 } vp8_variance_fn_ptr_t;
123 #endif // VP8_COMMON_VARIANCE_H_