michael@0: /* michael@0: * Copyright (c) 2010 The WebM project authors. All Rights Reserved. michael@0: * michael@0: * Use of this source code is governed by a BSD-style license michael@0: * that can be found in the LICENSE file in the root of the source michael@0: * tree. An additional intellectual property rights grant can be found michael@0: * in the file PATENTS. All contributing project authors may michael@0: * be found in the AUTHORS file in the root of the source tree. michael@0: */ michael@0: michael@0: michael@0: #ifndef VARIANCE_H michael@0: #define VARIANCE_H michael@0: michael@0: #include "vpx_config.h" michael@0: michael@0: typedef unsigned int(*vp8_sad_fn_t)( michael@0: const unsigned char *src_ptr, michael@0: int source_stride, michael@0: const unsigned char *ref_ptr, michael@0: int ref_stride, michael@0: unsigned int max_sad); michael@0: michael@0: typedef void (*vp8_copy32xn_fn_t)( michael@0: const unsigned char *src_ptr, michael@0: int source_stride, michael@0: const unsigned char *ref_ptr, michael@0: int ref_stride, michael@0: int n); michael@0: michael@0: typedef void (*vp8_sad_multi_fn_t)( michael@0: const unsigned char *src_ptr, michael@0: int source_stride, michael@0: const unsigned char *ref_ptr, michael@0: int ref_stride, michael@0: unsigned int *sad_array); michael@0: michael@0: typedef void (*vp8_sad_multi1_fn_t) michael@0: ( michael@0: const unsigned char *src_ptr, michael@0: int source_stride, michael@0: const unsigned char *ref_ptr, michael@0: int ref_stride, michael@0: unsigned short *sad_array michael@0: ); michael@0: michael@0: typedef void (*vp8_sad_multi_d_fn_t) michael@0: ( michael@0: const unsigned char *src_ptr, michael@0: int source_stride, michael@0: const unsigned char * const ref_ptr[], michael@0: int ref_stride, michael@0: unsigned int *sad_array michael@0: ); michael@0: michael@0: typedef unsigned int (*vp8_variance_fn_t) michael@0: ( michael@0: const unsigned char *src_ptr, michael@0: int source_stride, michael@0: const unsigned char *ref_ptr, michael@0: int ref_stride, michael@0: unsigned int *sse michael@0: ); michael@0: michael@0: typedef unsigned int (*vp8_subpixvariance_fn_t) michael@0: ( michael@0: const unsigned char *src_ptr, michael@0: int source_stride, michael@0: int xoffset, michael@0: int yoffset, michael@0: const unsigned char *ref_ptr, michael@0: int Refstride, michael@0: unsigned int *sse michael@0: ); michael@0: michael@0: typedef void (*vp8_ssimpf_fn_t) michael@0: ( michael@0: unsigned char *s, michael@0: int sp, michael@0: unsigned char *r, michael@0: int rp, michael@0: unsigned long *sum_s, michael@0: unsigned long *sum_r, michael@0: unsigned long *sum_sq_s, michael@0: unsigned long *sum_sq_r, michael@0: unsigned long *sum_sxr michael@0: ); michael@0: michael@0: typedef unsigned int (*vp8_getmbss_fn_t)(const short *); michael@0: michael@0: typedef unsigned int (*vp8_get16x16prederror_fn_t) michael@0: ( michael@0: const unsigned char *src_ptr, michael@0: int source_stride, michael@0: const unsigned char *ref_ptr, michael@0: int ref_stride michael@0: ); michael@0: michael@0: typedef struct variance_vtable michael@0: { michael@0: vp8_sad_fn_t sdf; michael@0: vp8_variance_fn_t vf; michael@0: vp8_subpixvariance_fn_t svf; michael@0: vp8_variance_fn_t svf_halfpix_h; michael@0: vp8_variance_fn_t svf_halfpix_v; michael@0: vp8_variance_fn_t svf_halfpix_hv; michael@0: vp8_sad_multi_fn_t sdx3f; michael@0: vp8_sad_multi1_fn_t sdx8f; michael@0: vp8_sad_multi_d_fn_t sdx4df; michael@0: #if ARCH_X86 || ARCH_X86_64 michael@0: vp8_copy32xn_fn_t copymem; michael@0: #endif michael@0: } vp8_variance_fn_ptr_t; michael@0: michael@0: #endif