OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 } | 50 } |
51 unsigned int vp9_sad16x3_c(const uint8_t *src_ptr, | 51 unsigned int vp9_sad16x3_c(const uint8_t *src_ptr, |
52 int src_stride, | 52 int src_stride, |
53 const uint8_t *ref_ptr, | 53 const uint8_t *ref_ptr, |
54 int ref_stride) { | 54 int ref_stride) { |
55 return sad_mx_n_c(src_ptr, src_stride, ref_ptr, ref_stride, 16, 3); | 55 return sad_mx_n_c(src_ptr, src_stride, ref_ptr, ref_stride, 16, 3); |
56 } | 56 } |
57 | 57 |
58 | 58 |
59 unsigned int vp9_variance2x16_c(const uint8_t *src_ptr, | 59 unsigned int vp9_variance2x16_c(const uint8_t *src_ptr, |
60 const int source_stride, | 60 int source_stride, |
61 const uint8_t *ref_ptr, | 61 const uint8_t *ref_ptr, |
62 const int recon_stride, | 62 int recon_stride, |
63 unsigned int *sse) { | 63 unsigned int *sse) { |
64 int sum; | 64 int sum; |
65 variance(src_ptr, source_stride, ref_ptr, recon_stride, 2, 16, sse, &sum); | 65 variance(src_ptr, source_stride, ref_ptr, recon_stride, 2, 16, sse, &sum); |
66 return (*sse - (((unsigned int)sum * sum) >> 5)); | 66 return (*sse - (((unsigned int)sum * sum) >> 5)); |
67 } | 67 } |
68 | 68 |
69 unsigned int vp9_variance16x2_c(const uint8_t *src_ptr, | 69 unsigned int vp9_variance16x2_c(const uint8_t *src_ptr, |
70 const int source_stride, | 70 int source_stride, |
71 const uint8_t *ref_ptr, | 71 const uint8_t *ref_ptr, |
72 const int recon_stride, | 72 int recon_stride, |
73 unsigned int *sse) { | 73 unsigned int *sse) { |
74 int sum; | 74 int sum; |
75 variance(src_ptr, source_stride, ref_ptr, recon_stride, 16, 2, sse, &sum); | 75 variance(src_ptr, source_stride, ref_ptr, recon_stride, 16, 2, sse, &sum); |
76 return (*sse - (((unsigned int)sum * sum) >> 5)); | 76 return (*sse - (((unsigned int)sum * sum) >> 5)); |
77 } | 77 } |
78 | 78 |
79 unsigned int vp9_sub_pixel_variance16x2_c(const uint8_t *src_ptr, | 79 unsigned int vp9_sub_pixel_variance16x2_c(const uint8_t *src_ptr, |
80 const int src_pixels_per_line, | 80 int src_pixels_per_line, |
81 const int xoffset, | 81 int xoffset, |
82 const int yoffset, | 82 int yoffset, |
83 const uint8_t *dst_ptr, | 83 const uint8_t *dst_ptr, |
84 const int dst_pixels_per_line, | 84 int dst_pixels_per_line, |
85 unsigned int *sse) { | 85 unsigned int *sse) { |
86 uint16_t FData3[16 * 3]; // Temp data buffer used in filtering | 86 uint16_t FData3[16 * 3]; // Temp data buffer used in filtering |
87 uint8_t temp2[2 * 16]; | 87 uint8_t temp2[2 * 16]; |
88 const int16_t *HFilter, *VFilter; | 88 const int16_t *HFilter, *VFilter; |
89 | 89 |
90 HFilter = vp9_bilinear_filters[xoffset]; | 90 HFilter = vp9_bilinear_filters[xoffset]; |
91 VFilter = vp9_bilinear_filters[yoffset]; | 91 VFilter = vp9_bilinear_filters[yoffset]; |
92 | 92 |
93 var_filter_block2d_bil_first_pass(src_ptr, FData3, | 93 var_filter_block2d_bil_first_pass(src_ptr, FData3, |
94 src_pixels_per_line, 1, 3, 16, HFilter); | 94 src_pixels_per_line, 1, 3, 16, HFilter); |
95 var_filter_block2d_bil_second_pass(FData3, temp2, 16, 16, 2, 16, VFilter); | 95 var_filter_block2d_bil_second_pass(FData3, temp2, 16, 16, 2, 16, VFilter); |
96 | 96 |
97 return vp9_variance16x2_c(temp2, 16, dst_ptr, dst_pixels_per_line, sse); | 97 return vp9_variance16x2_c(temp2, 16, dst_ptr, dst_pixels_per_line, sse); |
98 } | 98 } |
99 | 99 |
100 unsigned int vp9_sub_pixel_variance2x16_c(const uint8_t *src_ptr, | 100 unsigned int vp9_sub_pixel_variance2x16_c(const uint8_t *src_ptr, |
101 const int src_pixels_per_line, | 101 int src_pixels_per_line, |
102 const int xoffset, | 102 int xoffset, |
103 const int yoffset, | 103 int yoffset, |
104 const uint8_t *dst_ptr, | 104 const uint8_t *dst_ptr, |
105 const int dst_pixels_per_line, | 105 int dst_pixels_per_line, |
106 unsigned int *sse) { | 106 unsigned int *sse) { |
107 uint16_t FData3[2 * 17]; // Temp data buffer used in filtering | 107 uint16_t FData3[2 * 17]; // Temp data buffer used in filtering |
108 uint8_t temp2[2 * 16]; | 108 uint8_t temp2[2 * 16]; |
109 const int16_t *HFilter, *VFilter; | 109 const int16_t *HFilter, *VFilter; |
110 | 110 |
111 HFilter = vp9_bilinear_filters[xoffset]; | 111 HFilter = vp9_bilinear_filters[xoffset]; |
112 VFilter = vp9_bilinear_filters[yoffset]; | 112 VFilter = vp9_bilinear_filters[yoffset]; |
113 | 113 |
114 var_filter_block2d_bil_first_pass(src_ptr, FData3, | 114 var_filter_block2d_bil_first_pass(src_ptr, FData3, |
115 src_pixels_per_line, 1, 17, 2, HFilter); | 115 src_pixels_per_line, 1, 17, 2, HFilter); |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 else | 286 else |
287 near->as_int = sorted_mvs[2].as_int; | 287 near->as_int = sorted_mvs[2].as_int; |
288 } else { | 288 } else { |
289 nearest->as_int = sorted_mvs[1].as_int; | 289 nearest->as_int = sorted_mvs[1].as_int; |
290 near->as_int = sorted_mvs[2].as_int; | 290 near->as_int = sorted_mvs[2].as_int; |
291 } | 291 } |
292 | 292 |
293 // Copy back the re-ordered mv list | 293 // Copy back the re-ordered mv list |
294 vpx_memcpy(mvlist, sorted_mvs, sizeof(sorted_mvs)); | 294 vpx_memcpy(mvlist, sorted_mvs, sizeof(sorted_mvs)); |
295 } | 295 } |
OLD | NEW |