vp9_variance.h 3.78 KB
Newer Older
John Koleszar's avatar
John Koleszar committed
1
/*
2
 *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
John Koleszar's avatar
John Koleszar committed
3
 *
4
 *  Use of this source code is governed by a BSD-style license
5
6
 *  that can be found in the LICENSE file in the root of the source
 *  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.
John Koleszar's avatar
John Koleszar committed
9
10
11
 */


12
13
#ifndef VP9_ENCODER_VP9_VARIANCE_H_
#define VP9_ENCODER_VP9_VARIANCE_H_
John Koleszar's avatar
John Koleszar committed
14

15
typedef unsigned int(*vp9_sad_fn_t)(const unsigned char *src_ptr,
16
17
18
19
20
                                    int source_stride,
                                    const unsigned char *ref_ptr,
                                    int ref_stride,
                                    unsigned int max_sad);

21
typedef void (*vp9_copy32xn_fn_t)(const unsigned char *src_ptr,
22
23
24
25
26
                                  int source_stride,
                                  const unsigned char *ref_ptr,
                                  int ref_stride,
                                  int n);

27
typedef void (*vp9_sad_multi_fn_t)(const unsigned char *src_ptr,
28
29
30
31
32
                                   int source_stride,
                                   const unsigned char *ref_ptr,
                                   int  ref_stride,
                                   unsigned int *sad_array);

33
typedef void (*vp9_sad_multi1_fn_t)(const unsigned char *src_ptr,
34
35
36
37
38
                                    int source_stride,
                                    const unsigned char *ref_ptr,
                                    int  ref_stride,
                                    unsigned short *sad_array);

39
typedef void (*vp9_sad_multi_d_fn_t)(const unsigned char *src_ptr,
40
                                     int source_stride,
41
                                     const unsigned char ** ref_ptr,
42
43
                                     int  ref_stride, unsigned int *sad_array);

44
typedef unsigned int (*vp9_variance_fn_t)(const unsigned char *src_ptr,
45
46
47
48
49
                                          int source_stride,
                                          const unsigned char *ref_ptr,
                                          int ref_stride,
                                          unsigned int *sse);

50
typedef unsigned int (*vp9_subpixvariance_fn_t)(const unsigned char  *src_ptr,
51
52
53
54
55
56
57
                                                int source_stride,
                                                int xoffset,
                                                int yoffset,
                                                const unsigned char *ref_ptr,
                                                int Refstride,
                                                unsigned int *sse);

58
typedef void (*vp9_ssimpf_fn_t)(unsigned char *s, int sp, unsigned char *r,
59
60
61
62
63
                                int rp, unsigned long *sum_s,
                                unsigned long *sum_r, unsigned long *sum_sq_s,
                                unsigned long *sum_sq_r,
                                unsigned long *sum_sxr);

64
typedef unsigned int (*vp9_getmbss_fn_t)(const short *);
65

66
typedef unsigned int (*vp9_get16x16prederror_fn_t)(const unsigned char *src_ptr,
67
68
69
70
71
                                                   int source_stride,
                                                   const unsigned char *ref_ptr,
                                                   int  ref_stride);

typedef struct variance_vtable {
72
73
74
75
76
77
78
79
80
    vp9_sad_fn_t            sdf;
    vp9_variance_fn_t       vf;
    vp9_subpixvariance_fn_t svf;
    vp9_variance_fn_t       svf_halfpix_h;
    vp9_variance_fn_t       svf_halfpix_v;
    vp9_variance_fn_t       svf_halfpix_hv;
    vp9_sad_multi_fn_t      sdx3f;
    vp9_sad_multi1_fn_t     sdx8f;
    vp9_sad_multi_d_fn_t    sdx4df;
81
    vp9_copy32xn_fn_t       copymem;
82
} vp9_variance_fn_ptr_t;
John Koleszar's avatar
John Koleszar committed
83
84

#endif