OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
| 3 * |
| 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. |
| 9 */ |
| 10 |
| 11 #include "./vpx_config.h" |
| 12 #include "./vpx_dsp_rtcd.h" |
| 13 #include "vpx/vpx_integer.h" |
| 14 |
| 15 void vpx_half_horiz_vert_variance16x_h_sse2(const unsigned char *ref, |
| 16 int ref_stride, |
| 17 const unsigned char *src, |
| 18 int src_stride, |
| 19 unsigned int height, |
| 20 int *sum, |
| 21 unsigned int *sumsquared); |
| 22 void vpx_half_horiz_variance16x_h_sse2(const unsigned char *ref, int ref_stride, |
| 23 const unsigned char *src, int src_stride, |
| 24 unsigned int height, int *sum, |
| 25 unsigned int *sumsquared); |
| 26 void vpx_half_vert_variance16x_h_sse2(const unsigned char *ref, int ref_stride, |
| 27 const unsigned char *src, int src_stride, |
| 28 unsigned int height, int *sum, |
| 29 unsigned int *sumsquared); |
| 30 |
| 31 uint32_t vpx_variance_halfpixvar16x16_h_sse2(const unsigned char *src, |
| 32 int src_stride, |
| 33 const unsigned char *dst, |
| 34 int dst_stride, |
| 35 uint32_t *sse) { |
| 36 int xsum0; |
| 37 unsigned int xxsum0; |
| 38 |
| 39 vpx_half_horiz_variance16x_h_sse2(src, src_stride, dst, dst_stride, 16, |
| 40 &xsum0, &xxsum0); |
| 41 |
| 42 *sse = xxsum0; |
| 43 return (xxsum0 - (((uint32_t)xsum0 * xsum0) >> 8)); |
| 44 } |
| 45 |
| 46 uint32_t vpx_variance_halfpixvar16x16_v_sse2(const unsigned char *src, |
| 47 int src_stride, |
| 48 const unsigned char *dst, |
| 49 int dst_stride, |
| 50 uint32_t *sse) { |
| 51 int xsum0; |
| 52 unsigned int xxsum0; |
| 53 vpx_half_vert_variance16x_h_sse2(src, src_stride, dst, dst_stride, 16, |
| 54 &xsum0, &xxsum0); |
| 55 |
| 56 *sse = xxsum0; |
| 57 return (xxsum0 - (((uint32_t)xsum0 * xsum0) >> 8)); |
| 58 } |
| 59 |
| 60 |
| 61 uint32_t vpx_variance_halfpixvar16x16_hv_sse2(const unsigned char *src, |
| 62 int src_stride, |
| 63 const unsigned char *dst, |
| 64 int dst_stride, |
| 65 uint32_t *sse) { |
| 66 int xsum0; |
| 67 unsigned int xxsum0; |
| 68 |
| 69 vpx_half_horiz_vert_variance16x_h_sse2(src, src_stride, dst, dst_stride, 16, |
| 70 &xsum0, &xxsum0); |
| 71 |
| 72 *sse = xxsum0; |
| 73 return (xxsum0 - (((uint32_t)xsum0 * xsum0) >> 8)); |
| 74 } |
OLD | NEW |