| 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 |
| 11 | 11 |
| 12 #include "vp9/encoder/vp9_variance.h" | 12 #include "vp9/encoder/vp9_variance.h" |
| 13 #include "vp9/common/vp9_filter.h" | 13 #include "vp9/common/vp9_filter.h" |
| 14 #include "vp9/common/vp9_subpelvar.h" | 14 #include "vp9/common/vp9_subpelvar.h" |
| 15 #include "vpx/vpx_integer.h" | 15 #include "vpx/vpx_integer.h" |
| 16 #include "vpx_ports/mem.h" | 16 #include "vpx_ports/mem.h" |
| 17 #include "./vp9_rtcd.h" |
| 17 | 18 |
| 18 unsigned int vp9_get_mb_ss_c(const int16_t *src_ptr) { | 19 unsigned int vp9_get_mb_ss_c(const int16_t *src_ptr) { |
| 19 unsigned int i, sum = 0; | 20 unsigned int i, sum = 0; |
| 20 | 21 |
| 21 for (i = 0; i < 256; i++) { | 22 for (i = 0; i < 256; i++) { |
| 22 sum += (src_ptr[i] * src_ptr[i]); | 23 sum += (src_ptr[i] * src_ptr[i]); |
| 23 } | 24 } |
| 24 | 25 |
| 25 return sum; | 26 return sum; |
| 26 } | 27 } |
| (...skipping 22 matching lines...) Expand all Loading... |
| 49 uint8_t temp2[68 * 64]; | 50 uint8_t temp2[68 * 64]; |
| 50 const int16_t *hfilter, *vfilter; | 51 const int16_t *hfilter, *vfilter; |
| 51 | 52 |
| 52 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 53 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); |
| 53 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 54 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); |
| 54 | 55 |
| 55 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, | 56 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, |
| 56 1, 33, 64, hfilter); | 57 1, 33, 64, hfilter); |
| 57 var_filter_block2d_bil_second_pass(fdata3, temp2, 64, 64, 32, 64, vfilter); | 58 var_filter_block2d_bil_second_pass(fdata3, temp2, 64, 64, 32, 64, vfilter); |
| 58 | 59 |
| 59 return vp9_variance64x32_c(temp2, 64, dst_ptr, dst_pixels_per_line, sse); | 60 return vp9_variance64x32(temp2, 64, dst_ptr, dst_pixels_per_line, sse); |
| 60 } | 61 } |
| 61 | 62 |
| 62 unsigned int vp9_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, | 63 unsigned int vp9_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, |
| 63 int src_pixels_per_line, | 64 int src_pixels_per_line, |
| 64 int xoffset, | 65 int xoffset, |
| 65 int yoffset, | 66 int yoffset, |
| 66 const uint8_t *dst_ptr, | 67 const uint8_t *dst_ptr, |
| 67 int dst_pixels_per_line, | 68 int dst_pixels_per_line, |
| 68 unsigned int *sse, | 69 unsigned int *sse, |
| 69 const uint8_t *second_pred) { | 70 const uint8_t *second_pred) { |
| 70 uint16_t fdata3[65 * 64]; // Temp data bufffer used in filtering | 71 uint16_t fdata3[65 * 64]; // Temp data bufffer used in filtering |
| 71 uint8_t temp2[68 * 64]; | 72 uint8_t temp2[68 * 64]; |
| 72 DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 64 * 64); // compound pred buffer | 73 DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 64 * 64); // compound pred buffer |
| 73 const int16_t *hfilter, *vfilter; | 74 const int16_t *hfilter, *vfilter; |
| 74 | 75 |
| 75 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 76 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); |
| 76 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 77 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); |
| 77 | 78 |
| 78 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, | 79 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, |
| 79 1, 33, 64, hfilter); | 80 1, 33, 64, hfilter); |
| 80 var_filter_block2d_bil_second_pass(fdata3, temp2, 64, 64, 32, 64, vfilter); | 81 var_filter_block2d_bil_second_pass(fdata3, temp2, 64, 64, 32, 64, vfilter); |
| 81 comp_avg_pred(temp3, second_pred, 64, 32, temp2, 64); | 82 comp_avg_pred(temp3, second_pred, 64, 32, temp2, 64); |
| 82 return vp9_variance64x32_c(temp3, 64, dst_ptr, dst_pixels_per_line, sse); | 83 return vp9_variance64x32(temp3, 64, dst_ptr, dst_pixels_per_line, sse); |
| 83 } | 84 } |
| 84 | 85 |
| 85 unsigned int vp9_variance32x64_c(const uint8_t *src_ptr, | 86 unsigned int vp9_variance32x64_c(const uint8_t *src_ptr, |
| 86 int source_stride, | 87 int source_stride, |
| 87 const uint8_t *ref_ptr, | 88 const uint8_t *ref_ptr, |
| 88 int recon_stride, | 89 int recon_stride, |
| 89 unsigned int *sse) { | 90 unsigned int *sse) { |
| 90 unsigned int var; | 91 unsigned int var; |
| 91 int avg; | 92 int avg; |
| 92 | 93 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 106 uint8_t temp2[68 * 64]; | 107 uint8_t temp2[68 * 64]; |
| 107 const int16_t *hfilter, *vfilter; | 108 const int16_t *hfilter, *vfilter; |
| 108 | 109 |
| 109 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 110 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); |
| 110 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 111 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); |
| 111 | 112 |
| 112 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, | 113 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, |
| 113 1, 65, 32, hfilter); | 114 1, 65, 32, hfilter); |
| 114 var_filter_block2d_bil_second_pass(fdata3, temp2, 32, 32, 64, 32, vfilter); | 115 var_filter_block2d_bil_second_pass(fdata3, temp2, 32, 32, 64, 32, vfilter); |
| 115 | 116 |
| 116 return vp9_variance32x64_c(temp2, 32, dst_ptr, dst_pixels_per_line, sse); | 117 return vp9_variance32x64(temp2, 32, dst_ptr, dst_pixels_per_line, sse); |
| 117 } | 118 } |
| 118 | 119 |
| 119 unsigned int vp9_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, | 120 unsigned int vp9_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, |
| 120 int src_pixels_per_line, | 121 int src_pixels_per_line, |
| 121 int xoffset, | 122 int xoffset, |
| 122 int yoffset, | 123 int yoffset, |
| 123 const uint8_t *dst_ptr, | 124 const uint8_t *dst_ptr, |
| 124 int dst_pixels_per_line, | 125 int dst_pixels_per_line, |
| 125 unsigned int *sse, | 126 unsigned int *sse, |
| 126 const uint8_t *second_pred) { | 127 const uint8_t *second_pred) { |
| 127 uint16_t fdata3[65 * 64]; // Temp data bufffer used in filtering | 128 uint16_t fdata3[65 * 64]; // Temp data bufffer used in filtering |
| 128 uint8_t temp2[68 * 64]; | 129 uint8_t temp2[68 * 64]; |
| 129 DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 32 * 64); // compound pred buffer | 130 DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 32 * 64); // compound pred buffer |
| 130 const int16_t *hfilter, *vfilter; | 131 const int16_t *hfilter, *vfilter; |
| 131 | 132 |
| 132 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 133 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); |
| 133 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 134 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); |
| 134 | 135 |
| 135 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, | 136 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, |
| 136 1, 65, 32, hfilter); | 137 1, 65, 32, hfilter); |
| 137 var_filter_block2d_bil_second_pass(fdata3, temp2, 32, 32, 64, 32, vfilter); | 138 var_filter_block2d_bil_second_pass(fdata3, temp2, 32, 32, 64, 32, vfilter); |
| 138 comp_avg_pred(temp3, second_pred, 32, 64, temp2, 32); | 139 comp_avg_pred(temp3, second_pred, 32, 64, temp2, 32); |
| 139 return vp9_variance32x64_c(temp3, 32, dst_ptr, dst_pixels_per_line, sse); | 140 return vp9_variance32x64(temp3, 32, dst_ptr, dst_pixels_per_line, sse); |
| 140 } | 141 } |
| 141 | 142 |
| 142 unsigned int vp9_variance32x16_c(const uint8_t *src_ptr, | 143 unsigned int vp9_variance32x16_c(const uint8_t *src_ptr, |
| 143 int source_stride, | 144 int source_stride, |
| 144 const uint8_t *ref_ptr, | 145 const uint8_t *ref_ptr, |
| 145 int recon_stride, | 146 int recon_stride, |
| 146 unsigned int *sse) { | 147 unsigned int *sse) { |
| 147 unsigned int var; | 148 unsigned int var; |
| 148 int avg; | 149 int avg; |
| 149 | 150 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 163 uint8_t temp2[36 * 32]; | 164 uint8_t temp2[36 * 32]; |
| 164 const int16_t *hfilter, *vfilter; | 165 const int16_t *hfilter, *vfilter; |
| 165 | 166 |
| 166 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 167 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); |
| 167 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 168 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); |
| 168 | 169 |
| 169 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, | 170 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, |
| 170 1, 17, 32, hfilter); | 171 1, 17, 32, hfilter); |
| 171 var_filter_block2d_bil_second_pass(fdata3, temp2, 32, 32, 16, 32, vfilter); | 172 var_filter_block2d_bil_second_pass(fdata3, temp2, 32, 32, 16, 32, vfilter); |
| 172 | 173 |
| 173 return vp9_variance32x16_c(temp2, 32, dst_ptr, dst_pixels_per_line, sse); | 174 return vp9_variance32x16(temp2, 32, dst_ptr, dst_pixels_per_line, sse); |
| 174 } | 175 } |
| 175 | 176 |
| 176 unsigned int vp9_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, | 177 unsigned int vp9_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, |
| 177 int src_pixels_per_line, | 178 int src_pixels_per_line, |
| 178 int xoffset, | 179 int xoffset, |
| 179 int yoffset, | 180 int yoffset, |
| 180 const uint8_t *dst_ptr, | 181 const uint8_t *dst_ptr, |
| 181 int dst_pixels_per_line, | 182 int dst_pixels_per_line, |
| 182 unsigned int *sse, | 183 unsigned int *sse, |
| 183 const uint8_t *second_pred) { | 184 const uint8_t *second_pred) { |
| 184 uint16_t fdata3[33 * 32]; // Temp data bufffer used in filtering | 185 uint16_t fdata3[33 * 32]; // Temp data bufffer used in filtering |
| 185 uint8_t temp2[36 * 32]; | 186 uint8_t temp2[36 * 32]; |
| 186 DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 32 * 16); // compound pred buffer | 187 DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 32 * 16); // compound pred buffer |
| 187 const int16_t *hfilter, *vfilter; | 188 const int16_t *hfilter, *vfilter; |
| 188 | 189 |
| 189 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 190 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); |
| 190 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 191 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); |
| 191 | 192 |
| 192 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, | 193 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, |
| 193 1, 17, 32, hfilter); | 194 1, 17, 32, hfilter); |
| 194 var_filter_block2d_bil_second_pass(fdata3, temp2, 32, 32, 16, 32, vfilter); | 195 var_filter_block2d_bil_second_pass(fdata3, temp2, 32, 32, 16, 32, vfilter); |
| 195 comp_avg_pred(temp3, second_pred, 32, 16, temp2, 32); | 196 comp_avg_pred(temp3, second_pred, 32, 16, temp2, 32); |
| 196 return vp9_variance32x16_c(temp3, 32, dst_ptr, dst_pixels_per_line, sse); | 197 return vp9_variance32x16(temp3, 32, dst_ptr, dst_pixels_per_line, sse); |
| 197 } | 198 } |
| 198 | 199 |
| 199 unsigned int vp9_variance16x32_c(const uint8_t *src_ptr, | 200 unsigned int vp9_variance16x32_c(const uint8_t *src_ptr, |
| 200 int source_stride, | 201 int source_stride, |
| 201 const uint8_t *ref_ptr, | 202 const uint8_t *ref_ptr, |
| 202 int recon_stride, | 203 int recon_stride, |
| 203 unsigned int *sse) { | 204 unsigned int *sse) { |
| 204 unsigned int var; | 205 unsigned int var; |
| 205 int avg; | 206 int avg; |
| 206 | 207 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 220 uint8_t temp2[36 * 32]; | 221 uint8_t temp2[36 * 32]; |
| 221 const int16_t *hfilter, *vfilter; | 222 const int16_t *hfilter, *vfilter; |
| 222 | 223 |
| 223 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 224 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); |
| 224 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 225 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); |
| 225 | 226 |
| 226 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, | 227 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, |
| 227 1, 33, 16, hfilter); | 228 1, 33, 16, hfilter); |
| 228 var_filter_block2d_bil_second_pass(fdata3, temp2, 16, 16, 32, 16, vfilter); | 229 var_filter_block2d_bil_second_pass(fdata3, temp2, 16, 16, 32, 16, vfilter); |
| 229 | 230 |
| 230 return vp9_variance16x32_c(temp2, 16, dst_ptr, dst_pixels_per_line, sse); | 231 return vp9_variance16x32(temp2, 16, dst_ptr, dst_pixels_per_line, sse); |
| 231 } | 232 } |
| 232 | 233 |
| 233 unsigned int vp9_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, | 234 unsigned int vp9_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, |
| 234 int src_pixels_per_line, | 235 int src_pixels_per_line, |
| 235 int xoffset, | 236 int xoffset, |
| 236 int yoffset, | 237 int yoffset, |
| 237 const uint8_t *dst_ptr, | 238 const uint8_t *dst_ptr, |
| 238 int dst_pixels_per_line, | 239 int dst_pixels_per_line, |
| 239 unsigned int *sse, | 240 unsigned int *sse, |
| 240 const uint8_t *second_pred) { | 241 const uint8_t *second_pred) { |
| 241 uint16_t fdata3[33 * 32]; // Temp data bufffer used in filtering | 242 uint16_t fdata3[33 * 32]; // Temp data bufffer used in filtering |
| 242 uint8_t temp2[36 * 32]; | 243 uint8_t temp2[36 * 32]; |
| 243 DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 16 * 32); // compound pred buffer | 244 DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 16 * 32); // compound pred buffer |
| 244 const int16_t *hfilter, *vfilter; | 245 const int16_t *hfilter, *vfilter; |
| 245 | 246 |
| 246 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 247 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); |
| 247 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 248 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); |
| 248 | 249 |
| 249 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, | 250 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, |
| 250 1, 33, 16, hfilter); | 251 1, 33, 16, hfilter); |
| 251 var_filter_block2d_bil_second_pass(fdata3, temp2, 16, 16, 32, 16, vfilter); | 252 var_filter_block2d_bil_second_pass(fdata3, temp2, 16, 16, 32, 16, vfilter); |
| 252 comp_avg_pred(temp3, second_pred, 16, 32, temp2, 16); | 253 comp_avg_pred(temp3, second_pred, 16, 32, temp2, 16); |
| 253 return vp9_variance16x32_c(temp3, 16, dst_ptr, dst_pixels_per_line, sse); | 254 return vp9_variance16x32(temp3, 16, dst_ptr, dst_pixels_per_line, sse); |
| 254 } | 255 } |
| 255 | 256 |
| 256 unsigned int vp9_variance64x64_c(const uint8_t *src_ptr, | 257 unsigned int vp9_variance64x64_c(const uint8_t *src_ptr, |
| 257 int source_stride, | 258 int source_stride, |
| 258 const uint8_t *ref_ptr, | 259 const uint8_t *ref_ptr, |
| 259 int recon_stride, | 260 int recon_stride, |
| 260 unsigned int *sse) { | 261 unsigned int *sse) { |
| 261 unsigned int var; | 262 unsigned int var; |
| 262 int avg; | 263 int avg; |
| 263 | 264 |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 445 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); |
| 445 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 446 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); |
| 446 | 447 |
| 447 // First filter 1d Horizontal | 448 // First filter 1d Horizontal |
| 448 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, | 449 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, |
| 449 1, 5, 4, hfilter); | 450 1, 5, 4, hfilter); |
| 450 | 451 |
| 451 // Now filter Verticaly | 452 // Now filter Verticaly |
| 452 var_filter_block2d_bil_second_pass(fdata3, temp2, 4, 4, 4, 4, vfilter); | 453 var_filter_block2d_bil_second_pass(fdata3, temp2, 4, 4, 4, 4, vfilter); |
| 453 | 454 |
| 454 return vp9_variance4x4_c(temp2, 4, dst_ptr, dst_pixels_per_line, sse); | 455 return vp9_variance4x4(temp2, 4, dst_ptr, dst_pixels_per_line, sse); |
| 455 } | 456 } |
| 456 | 457 |
| 457 unsigned int vp9_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, | 458 unsigned int vp9_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, |
| 458 int src_pixels_per_line, | 459 int src_pixels_per_line, |
| 459 int xoffset, | 460 int xoffset, |
| 460 int yoffset, | 461 int yoffset, |
| 461 const uint8_t *dst_ptr, | 462 const uint8_t *dst_ptr, |
| 462 int dst_pixels_per_line, | 463 int dst_pixels_per_line, |
| 463 unsigned int *sse, | 464 unsigned int *sse, |
| 464 const uint8_t *second_pred) { | 465 const uint8_t *second_pred) { |
| 465 uint8_t temp2[20 * 16]; | 466 uint8_t temp2[20 * 16]; |
| 466 const int16_t *hfilter, *vfilter; | 467 const int16_t *hfilter, *vfilter; |
| 467 DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 4 * 4); // compound pred buffer | 468 DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 4 * 4); // compound pred buffer |
| 468 uint16_t fdata3[5 * 4]; // Temp data bufffer used in filtering | 469 uint16_t fdata3[5 * 4]; // Temp data bufffer used in filtering |
| 469 | 470 |
| 470 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 471 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); |
| 471 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 472 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); |
| 472 | 473 |
| 473 // First filter 1d Horizontal | 474 // First filter 1d Horizontal |
| 474 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, | 475 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, |
| 475 1, 5, 4, hfilter); | 476 1, 5, 4, hfilter); |
| 476 | 477 |
| 477 // Now filter Verticaly | 478 // Now filter Verticaly |
| 478 var_filter_block2d_bil_second_pass(fdata3, temp2, 4, 4, 4, 4, vfilter); | 479 var_filter_block2d_bil_second_pass(fdata3, temp2, 4, 4, 4, 4, vfilter); |
| 479 comp_avg_pred(temp3, second_pred, 4, 4, temp2, 4); | 480 comp_avg_pred(temp3, second_pred, 4, 4, temp2, 4); |
| 480 return vp9_variance4x4_c(temp3, 4, dst_ptr, dst_pixels_per_line, sse); | 481 return vp9_variance4x4(temp3, 4, dst_ptr, dst_pixels_per_line, sse); |
| 481 } | 482 } |
| 482 | 483 |
| 483 unsigned int vp9_sub_pixel_variance8x8_c(const uint8_t *src_ptr, | 484 unsigned int vp9_sub_pixel_variance8x8_c(const uint8_t *src_ptr, |
| 484 int src_pixels_per_line, | 485 int src_pixels_per_line, |
| 485 int xoffset, | 486 int xoffset, |
| 486 int yoffset, | 487 int yoffset, |
| 487 const uint8_t *dst_ptr, | 488 const uint8_t *dst_ptr, |
| 488 int dst_pixels_per_line, | 489 int dst_pixels_per_line, |
| 489 unsigned int *sse) { | 490 unsigned int *sse) { |
| 490 uint16_t fdata3[9 * 8]; // Temp data bufffer used in filtering | 491 uint16_t fdata3[9 * 8]; // Temp data bufffer used in filtering |
| 491 uint8_t temp2[20 * 16]; | 492 uint8_t temp2[20 * 16]; |
| 492 const int16_t *hfilter, *vfilter; | 493 const int16_t *hfilter, *vfilter; |
| 493 | 494 |
| 494 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 495 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); |
| 495 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 496 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); |
| 496 | 497 |
| 497 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, | 498 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, |
| 498 1, 9, 8, hfilter); | 499 1, 9, 8, hfilter); |
| 499 var_filter_block2d_bil_second_pass(fdata3, temp2, 8, 8, 8, 8, vfilter); | 500 var_filter_block2d_bil_second_pass(fdata3, temp2, 8, 8, 8, 8, vfilter); |
| 500 | 501 |
| 501 return vp9_variance8x8_c(temp2, 8, dst_ptr, dst_pixels_per_line, sse); | 502 return vp9_variance8x8(temp2, 8, dst_ptr, dst_pixels_per_line, sse); |
| 502 } | 503 } |
| 503 | 504 |
| 504 unsigned int vp9_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, | 505 unsigned int vp9_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, |
| 505 int src_pixels_per_line, | 506 int src_pixels_per_line, |
| 506 int xoffset, | 507 int xoffset, |
| 507 int yoffset, | 508 int yoffset, |
| 508 const uint8_t *dst_ptr, | 509 const uint8_t *dst_ptr, |
| 509 int dst_pixels_per_line, | 510 int dst_pixels_per_line, |
| 510 unsigned int *sse, | 511 unsigned int *sse, |
| 511 const uint8_t *second_pred) { | 512 const uint8_t *second_pred) { |
| 512 uint16_t fdata3[9 * 8]; // Temp data bufffer used in filtering | 513 uint16_t fdata3[9 * 8]; // Temp data bufffer used in filtering |
| 513 uint8_t temp2[20 * 16]; | 514 uint8_t temp2[20 * 16]; |
| 514 DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 8 * 8); // compound pred buffer | 515 DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 8 * 8); // compound pred buffer |
| 515 const int16_t *hfilter, *vfilter; | 516 const int16_t *hfilter, *vfilter; |
| 516 | 517 |
| 517 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 518 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); |
| 518 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 519 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); |
| 519 | 520 |
| 520 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, | 521 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, |
| 521 1, 9, 8, hfilter); | 522 1, 9, 8, hfilter); |
| 522 var_filter_block2d_bil_second_pass(fdata3, temp2, 8, 8, 8, 8, vfilter); | 523 var_filter_block2d_bil_second_pass(fdata3, temp2, 8, 8, 8, 8, vfilter); |
| 523 comp_avg_pred(temp3, second_pred, 8, 8, temp2, 8); | 524 comp_avg_pred(temp3, second_pred, 8, 8, temp2, 8); |
| 524 return vp9_variance8x8_c(temp3, 8, dst_ptr, dst_pixels_per_line, sse); | 525 return vp9_variance8x8(temp3, 8, dst_ptr, dst_pixels_per_line, sse); |
| 525 } | 526 } |
| 526 | 527 |
| 527 unsigned int vp9_sub_pixel_variance16x16_c(const uint8_t *src_ptr, | 528 unsigned int vp9_sub_pixel_variance16x16_c(const uint8_t *src_ptr, |
| 528 int src_pixels_per_line, | 529 int src_pixels_per_line, |
| 529 int xoffset, | 530 int xoffset, |
| 530 int yoffset, | 531 int yoffset, |
| 531 const uint8_t *dst_ptr, | 532 const uint8_t *dst_ptr, |
| 532 int dst_pixels_per_line, | 533 int dst_pixels_per_line, |
| 533 unsigned int *sse) { | 534 unsigned int *sse) { |
| 534 uint16_t fdata3[17 * 16]; // Temp data bufffer used in filtering | 535 uint16_t fdata3[17 * 16]; // Temp data bufffer used in filtering |
| 535 uint8_t temp2[20 * 16]; | 536 uint8_t temp2[20 * 16]; |
| 536 const int16_t *hfilter, *vfilter; | 537 const int16_t *hfilter, *vfilter; |
| 537 | 538 |
| 538 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 539 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); |
| 539 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 540 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); |
| 540 | 541 |
| 541 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, | 542 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, |
| 542 1, 17, 16, hfilter); | 543 1, 17, 16, hfilter); |
| 543 var_filter_block2d_bil_second_pass(fdata3, temp2, 16, 16, 16, 16, vfilter); | 544 var_filter_block2d_bil_second_pass(fdata3, temp2, 16, 16, 16, 16, vfilter); |
| 544 | 545 |
| 545 return vp9_variance16x16_c(temp2, 16, dst_ptr, dst_pixels_per_line, sse); | 546 return vp9_variance16x16(temp2, 16, dst_ptr, dst_pixels_per_line, sse); |
| 546 } | 547 } |
| 547 | 548 |
| 548 unsigned int vp9_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, | 549 unsigned int vp9_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, |
| 549 int src_pixels_per_line, | 550 int src_pixels_per_line, |
| 550 int xoffset, | 551 int xoffset, |
| 551 int yoffset, | 552 int yoffset, |
| 552 const uint8_t *dst_ptr, | 553 const uint8_t *dst_ptr, |
| 553 int dst_pixels_per_line, | 554 int dst_pixels_per_line, |
| 554 unsigned int *sse, | 555 unsigned int *sse, |
| 555 const uint8_t *second_pred) { | 556 const uint8_t *second_pred) { |
| 556 uint16_t fdata3[17 * 16]; | 557 uint16_t fdata3[17 * 16]; |
| 557 uint8_t temp2[20 * 16]; | 558 uint8_t temp2[20 * 16]; |
| 558 DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 16 * 16); // compound pred buffer | 559 DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 16 * 16); // compound pred buffer |
| 559 const int16_t *hfilter, *vfilter; | 560 const int16_t *hfilter, *vfilter; |
| 560 | 561 |
| 561 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 562 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); |
| 562 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 563 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); |
| 563 | 564 |
| 564 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, | 565 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, |
| 565 1, 17, 16, hfilter); | 566 1, 17, 16, hfilter); |
| 566 var_filter_block2d_bil_second_pass(fdata3, temp2, 16, 16, 16, 16, vfilter); | 567 var_filter_block2d_bil_second_pass(fdata3, temp2, 16, 16, 16, 16, vfilter); |
| 567 | 568 |
| 568 comp_avg_pred(temp3, second_pred, 16, 16, temp2, 16); | 569 comp_avg_pred(temp3, second_pred, 16, 16, temp2, 16); |
| 569 return vp9_variance16x16_c(temp3, 16, dst_ptr, dst_pixels_per_line, sse); | 570 return vp9_variance16x16(temp3, 16, dst_ptr, dst_pixels_per_line, sse); |
| 570 } | 571 } |
| 571 | 572 |
| 572 unsigned int vp9_sub_pixel_variance64x64_c(const uint8_t *src_ptr, | 573 unsigned int vp9_sub_pixel_variance64x64_c(const uint8_t *src_ptr, |
| 573 int src_pixels_per_line, | 574 int src_pixels_per_line, |
| 574 int xoffset, | 575 int xoffset, |
| 575 int yoffset, | 576 int yoffset, |
| 576 const uint8_t *dst_ptr, | 577 const uint8_t *dst_ptr, |
| 577 int dst_pixels_per_line, | 578 int dst_pixels_per_line, |
| 578 unsigned int *sse) { | 579 unsigned int *sse) { |
| 579 uint16_t fdata3[65 * 64]; // Temp data bufffer used in filtering | 580 uint16_t fdata3[65 * 64]; // Temp data bufffer used in filtering |
| 580 uint8_t temp2[68 * 64]; | 581 uint8_t temp2[68 * 64]; |
| 581 const int16_t *hfilter, *vfilter; | 582 const int16_t *hfilter, *vfilter; |
| 582 | 583 |
| 583 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 584 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); |
| 584 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 585 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); |
| 585 | 586 |
| 586 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, | 587 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, |
| 587 1, 65, 64, hfilter); | 588 1, 65, 64, hfilter); |
| 588 var_filter_block2d_bil_second_pass(fdata3, temp2, 64, 64, 64, 64, vfilter); | 589 var_filter_block2d_bil_second_pass(fdata3, temp2, 64, 64, 64, 64, vfilter); |
| 589 | 590 |
| 590 return vp9_variance64x64_c(temp2, 64, dst_ptr, dst_pixels_per_line, sse); | 591 return vp9_variance64x64(temp2, 64, dst_ptr, dst_pixels_per_line, sse); |
| 591 } | 592 } |
| 592 | 593 |
| 593 unsigned int vp9_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, | 594 unsigned int vp9_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, |
| 594 int src_pixels_per_line, | 595 int src_pixels_per_line, |
| 595 int xoffset, | 596 int xoffset, |
| 596 int yoffset, | 597 int yoffset, |
| 597 const uint8_t *dst_ptr, | 598 const uint8_t *dst_ptr, |
| 598 int dst_pixels_per_line, | 599 int dst_pixels_per_line, |
| 599 unsigned int *sse, | 600 unsigned int *sse, |
| 600 const uint8_t *second_pred) { | 601 const uint8_t *second_pred) { |
| 601 uint16_t fdata3[65 * 64]; // Temp data bufffer used in filtering | 602 uint16_t fdata3[65 * 64]; // Temp data bufffer used in filtering |
| 602 uint8_t temp2[68 * 64]; | 603 uint8_t temp2[68 * 64]; |
| 603 DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 64 * 64); // compound pred buffer | 604 DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 64 * 64); // compound pred buffer |
| 604 const int16_t *hfilter, *vfilter; | 605 const int16_t *hfilter, *vfilter; |
| 605 | 606 |
| 606 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 607 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); |
| 607 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 608 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); |
| 608 | 609 |
| 609 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, | 610 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, |
| 610 1, 65, 64, hfilter); | 611 1, 65, 64, hfilter); |
| 611 var_filter_block2d_bil_second_pass(fdata3, temp2, 64, 64, 64, 64, vfilter); | 612 var_filter_block2d_bil_second_pass(fdata3, temp2, 64, 64, 64, 64, vfilter); |
| 612 comp_avg_pred(temp3, second_pred, 64, 64, temp2, 64); | 613 comp_avg_pred(temp3, second_pred, 64, 64, temp2, 64); |
| 613 return vp9_variance64x64_c(temp3, 64, dst_ptr, dst_pixels_per_line, sse); | 614 return vp9_variance64x64(temp3, 64, dst_ptr, dst_pixels_per_line, sse); |
| 614 } | 615 } |
| 615 | 616 |
| 616 unsigned int vp9_sub_pixel_variance32x32_c(const uint8_t *src_ptr, | 617 unsigned int vp9_sub_pixel_variance32x32_c(const uint8_t *src_ptr, |
| 617 int src_pixels_per_line, | 618 int src_pixels_per_line, |
| 618 int xoffset, | 619 int xoffset, |
| 619 int yoffset, | 620 int yoffset, |
| 620 const uint8_t *dst_ptr, | 621 const uint8_t *dst_ptr, |
| 621 int dst_pixels_per_line, | 622 int dst_pixels_per_line, |
| 622 unsigned int *sse) { | 623 unsigned int *sse) { |
| 623 uint16_t fdata3[33 * 32]; // Temp data bufffer used in filtering | 624 uint16_t fdata3[33 * 32]; // Temp data bufffer used in filtering |
| 624 uint8_t temp2[36 * 32]; | 625 uint8_t temp2[36 * 32]; |
| 625 const int16_t *hfilter, *vfilter; | 626 const int16_t *hfilter, *vfilter; |
| 626 | 627 |
| 627 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 628 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); |
| 628 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 629 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); |
| 629 | 630 |
| 630 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, | 631 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, |
| 631 1, 33, 32, hfilter); | 632 1, 33, 32, hfilter); |
| 632 var_filter_block2d_bil_second_pass(fdata3, temp2, 32, 32, 32, 32, vfilter); | 633 var_filter_block2d_bil_second_pass(fdata3, temp2, 32, 32, 32, 32, vfilter); |
| 633 | 634 |
| 634 return vp9_variance32x32_c(temp2, 32, dst_ptr, dst_pixels_per_line, sse); | 635 return vp9_variance32x32(temp2, 32, dst_ptr, dst_pixels_per_line, sse); |
| 635 } | 636 } |
| 636 | 637 |
| 637 unsigned int vp9_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, | 638 unsigned int vp9_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, |
| 638 int src_pixels_per_line, | 639 int src_pixels_per_line, |
| 639 int xoffset, | 640 int xoffset, |
| 640 int yoffset, | 641 int yoffset, |
| 641 const uint8_t *dst_ptr, | 642 const uint8_t *dst_ptr, |
| 642 int dst_pixels_per_line, | 643 int dst_pixels_per_line, |
| 643 unsigned int *sse, | 644 unsigned int *sse, |
| 644 const uint8_t *second_pred) { | 645 const uint8_t *second_pred) { |
| 645 uint16_t fdata3[33 * 32]; // Temp data bufffer used in filtering | 646 uint16_t fdata3[33 * 32]; // Temp data bufffer used in filtering |
| 646 uint8_t temp2[36 * 32]; | 647 uint8_t temp2[36 * 32]; |
| 647 DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 32 * 32); // compound pred buffer | 648 DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 32 * 32); // compound pred buffer |
| 648 const int16_t *hfilter, *vfilter; | 649 const int16_t *hfilter, *vfilter; |
| 649 | 650 |
| 650 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 651 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); |
| 651 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 652 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); |
| 652 | 653 |
| 653 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, | 654 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, |
| 654 1, 33, 32, hfilter); | 655 1, 33, 32, hfilter); |
| 655 var_filter_block2d_bil_second_pass(fdata3, temp2, 32, 32, 32, 32, vfilter); | 656 var_filter_block2d_bil_second_pass(fdata3, temp2, 32, 32, 32, 32, vfilter); |
| 656 comp_avg_pred(temp3, second_pred, 32, 32, temp2, 32); | 657 comp_avg_pred(temp3, second_pred, 32, 32, temp2, 32); |
| 657 return vp9_variance32x32_c(temp3, 32, dst_ptr, dst_pixels_per_line, sse); | 658 return vp9_variance32x32(temp3, 32, dst_ptr, dst_pixels_per_line, sse); |
| 658 } | 659 } |
| 659 | 660 |
| 660 unsigned int vp9_variance_halfpixvar16x16_h_c(const uint8_t *src_ptr, | 661 unsigned int vp9_variance_halfpixvar16x16_h_c(const uint8_t *src_ptr, |
| 661 int source_stride, | 662 int source_stride, |
| 662 const uint8_t *ref_ptr, | 663 const uint8_t *ref_ptr, |
| 663 int recon_stride, | 664 int recon_stride, |
| 664 unsigned int *sse) { | 665 unsigned int *sse) { |
| 665 return vp9_sub_pixel_variance16x16_c(src_ptr, source_stride, 8, 0, | 666 return vp9_sub_pixel_variance16x16_c(src_ptr, source_stride, 8, 0, |
| 666 ref_ptr, recon_stride, sse); | 667 ref_ptr, recon_stride, sse); |
| 667 } | 668 } |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 788 uint8_t temp2[20 * 16]; | 789 uint8_t temp2[20 * 16]; |
| 789 const int16_t *hfilter, *vfilter; | 790 const int16_t *hfilter, *vfilter; |
| 790 | 791 |
| 791 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 792 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); |
| 792 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 793 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); |
| 793 | 794 |
| 794 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, | 795 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, |
| 795 1, 9, 16, hfilter); | 796 1, 9, 16, hfilter); |
| 796 var_filter_block2d_bil_second_pass(fdata3, temp2, 16, 16, 8, 16, vfilter); | 797 var_filter_block2d_bil_second_pass(fdata3, temp2, 16, 16, 8, 16, vfilter); |
| 797 | 798 |
| 798 return vp9_variance16x8_c(temp2, 16, dst_ptr, dst_pixels_per_line, sse); | 799 return vp9_variance16x8(temp2, 16, dst_ptr, dst_pixels_per_line, sse); |
| 799 } | 800 } |
| 800 | 801 |
| 801 unsigned int vp9_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, | 802 unsigned int vp9_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, |
| 802 int src_pixels_per_line, | 803 int src_pixels_per_line, |
| 803 int xoffset, | 804 int xoffset, |
| 804 int yoffset, | 805 int yoffset, |
| 805 const uint8_t *dst_ptr, | 806 const uint8_t *dst_ptr, |
| 806 int dst_pixels_per_line, | 807 int dst_pixels_per_line, |
| 807 unsigned int *sse, | 808 unsigned int *sse, |
| 808 const uint8_t *second_pred) { | 809 const uint8_t *second_pred) { |
| 809 uint16_t fdata3[16 * 9]; // Temp data bufffer used in filtering | 810 uint16_t fdata3[16 * 9]; // Temp data bufffer used in filtering |
| 810 uint8_t temp2[20 * 16]; | 811 uint8_t temp2[20 * 16]; |
| 811 DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 16 * 8); // compound pred buffer | 812 DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 16 * 8); // compound pred buffer |
| 812 const int16_t *hfilter, *vfilter; | 813 const int16_t *hfilter, *vfilter; |
| 813 | 814 |
| 814 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 815 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); |
| 815 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 816 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); |
| 816 | 817 |
| 817 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, | 818 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, |
| 818 1, 9, 16, hfilter); | 819 1, 9, 16, hfilter); |
| 819 var_filter_block2d_bil_second_pass(fdata3, temp2, 16, 16, 8, 16, vfilter); | 820 var_filter_block2d_bil_second_pass(fdata3, temp2, 16, 16, 8, 16, vfilter); |
| 820 comp_avg_pred(temp3, second_pred, 16, 8, temp2, 16); | 821 comp_avg_pred(temp3, second_pred, 16, 8, temp2, 16); |
| 821 return vp9_variance16x8_c(temp3, 16, dst_ptr, dst_pixels_per_line, sse); | 822 return vp9_variance16x8(temp3, 16, dst_ptr, dst_pixels_per_line, sse); |
| 822 } | 823 } |
| 823 | 824 |
| 824 unsigned int vp9_sub_pixel_variance8x16_c(const uint8_t *src_ptr, | 825 unsigned int vp9_sub_pixel_variance8x16_c(const uint8_t *src_ptr, |
| 825 int src_pixels_per_line, | 826 int src_pixels_per_line, |
| 826 int xoffset, | 827 int xoffset, |
| 827 int yoffset, | 828 int yoffset, |
| 828 const uint8_t *dst_ptr, | 829 const uint8_t *dst_ptr, |
| 829 int dst_pixels_per_line, | 830 int dst_pixels_per_line, |
| 830 unsigned int *sse) { | 831 unsigned int *sse) { |
| 831 uint16_t fdata3[9 * 16]; // Temp data bufffer used in filtering | 832 uint16_t fdata3[9 * 16]; // Temp data bufffer used in filtering |
| 832 uint8_t temp2[20 * 16]; | 833 uint8_t temp2[20 * 16]; |
| 833 const int16_t *hfilter, *vfilter; | 834 const int16_t *hfilter, *vfilter; |
| 834 | 835 |
| 835 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 836 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); |
| 836 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 837 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); |
| 837 | 838 |
| 838 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, | 839 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, |
| 839 1, 17, 8, hfilter); | 840 1, 17, 8, hfilter); |
| 840 var_filter_block2d_bil_second_pass(fdata3, temp2, 8, 8, 16, 8, vfilter); | 841 var_filter_block2d_bil_second_pass(fdata3, temp2, 8, 8, 16, 8, vfilter); |
| 841 | 842 |
| 842 return vp9_variance8x16_c(temp2, 8, dst_ptr, dst_pixels_per_line, sse); | 843 return vp9_variance8x16(temp2, 8, dst_ptr, dst_pixels_per_line, sse); |
| 843 } | 844 } |
| 844 | 845 |
| 845 unsigned int vp9_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, | 846 unsigned int vp9_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, |
| 846 int src_pixels_per_line, | 847 int src_pixels_per_line, |
| 847 int xoffset, | 848 int xoffset, |
| 848 int yoffset, | 849 int yoffset, |
| 849 const uint8_t *dst_ptr, | 850 const uint8_t *dst_ptr, |
| 850 int dst_pixels_per_line, | 851 int dst_pixels_per_line, |
| 851 unsigned int *sse, | 852 unsigned int *sse, |
| 852 const uint8_t *second_pred) { | 853 const uint8_t *second_pred) { |
| 853 uint16_t fdata3[9 * 16]; // Temp data bufffer used in filtering | 854 uint16_t fdata3[9 * 16]; // Temp data bufffer used in filtering |
| 854 uint8_t temp2[20 * 16]; | 855 uint8_t temp2[20 * 16]; |
| 855 DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 8 * 16); // compound pred buffer | 856 DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 8 * 16); // compound pred buffer |
| 856 const int16_t *hfilter, *vfilter; | 857 const int16_t *hfilter, *vfilter; |
| 857 | 858 |
| 858 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 859 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); |
| 859 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 860 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); |
| 860 | 861 |
| 861 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, | 862 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, |
| 862 1, 17, 8, hfilter); | 863 1, 17, 8, hfilter); |
| 863 var_filter_block2d_bil_second_pass(fdata3, temp2, 8, 8, 16, 8, vfilter); | 864 var_filter_block2d_bil_second_pass(fdata3, temp2, 8, 8, 16, 8, vfilter); |
| 864 comp_avg_pred(temp3, second_pred, 8, 16, temp2, 8); | 865 comp_avg_pred(temp3, second_pred, 8, 16, temp2, 8); |
| 865 return vp9_variance8x16_c(temp3, 8, dst_ptr, dst_pixels_per_line, sse); | 866 return vp9_variance8x16(temp3, 8, dst_ptr, dst_pixels_per_line, sse); |
| 866 } | 867 } |
| 867 | 868 |
| 868 unsigned int vp9_sub_pixel_variance8x4_c(const uint8_t *src_ptr, | 869 unsigned int vp9_sub_pixel_variance8x4_c(const uint8_t *src_ptr, |
| 869 int src_pixels_per_line, | 870 int src_pixels_per_line, |
| 870 int xoffset, | 871 int xoffset, |
| 871 int yoffset, | 872 int yoffset, |
| 872 const uint8_t *dst_ptr, | 873 const uint8_t *dst_ptr, |
| 873 int dst_pixels_per_line, | 874 int dst_pixels_per_line, |
| 874 unsigned int *sse) { | 875 unsigned int *sse) { |
| 875 uint16_t fdata3[8 * 5]; // Temp data bufffer used in filtering | 876 uint16_t fdata3[8 * 5]; // Temp data bufffer used in filtering |
| 876 uint8_t temp2[20 * 16]; | 877 uint8_t temp2[20 * 16]; |
| 877 const int16_t *hfilter, *vfilter; | 878 const int16_t *hfilter, *vfilter; |
| 878 | 879 |
| 879 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 880 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); |
| 880 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 881 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); |
| 881 | 882 |
| 882 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, | 883 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, |
| 883 1, 5, 8, hfilter); | 884 1, 5, 8, hfilter); |
| 884 var_filter_block2d_bil_second_pass(fdata3, temp2, 8, 8, 4, 8, vfilter); | 885 var_filter_block2d_bil_second_pass(fdata3, temp2, 8, 8, 4, 8, vfilter); |
| 885 | 886 |
| 886 return vp9_variance8x4_c(temp2, 8, dst_ptr, dst_pixels_per_line, sse); | 887 return vp9_variance8x4(temp2, 8, dst_ptr, dst_pixels_per_line, sse); |
| 887 } | 888 } |
| 888 | 889 |
| 889 unsigned int vp9_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, | 890 unsigned int vp9_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, |
| 890 int src_pixels_per_line, | 891 int src_pixels_per_line, |
| 891 int xoffset, | 892 int xoffset, |
| 892 int yoffset, | 893 int yoffset, |
| 893 const uint8_t *dst_ptr, | 894 const uint8_t *dst_ptr, |
| 894 int dst_pixels_per_line, | 895 int dst_pixels_per_line, |
| 895 unsigned int *sse, | 896 unsigned int *sse, |
| 896 const uint8_t *second_pred) { | 897 const uint8_t *second_pred) { |
| 897 uint16_t fdata3[8 * 5]; // Temp data bufffer used in filtering | 898 uint16_t fdata3[8 * 5]; // Temp data bufffer used in filtering |
| 898 uint8_t temp2[20 * 16]; | 899 uint8_t temp2[20 * 16]; |
| 899 DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 8 * 4); // compound pred buffer | 900 DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 8 * 4); // compound pred buffer |
| 900 const int16_t *hfilter, *vfilter; | 901 const int16_t *hfilter, *vfilter; |
| 901 | 902 |
| 902 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 903 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); |
| 903 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 904 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); |
| 904 | 905 |
| 905 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, | 906 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, |
| 906 1, 5, 8, hfilter); | 907 1, 5, 8, hfilter); |
| 907 var_filter_block2d_bil_second_pass(fdata3, temp2, 8, 8, 4, 8, vfilter); | 908 var_filter_block2d_bil_second_pass(fdata3, temp2, 8, 8, 4, 8, vfilter); |
| 908 comp_avg_pred(temp3, second_pred, 8, 4, temp2, 8); | 909 comp_avg_pred(temp3, second_pred, 8, 4, temp2, 8); |
| 909 return vp9_variance8x4_c(temp3, 8, dst_ptr, dst_pixels_per_line, sse); | 910 return vp9_variance8x4(temp3, 8, dst_ptr, dst_pixels_per_line, sse); |
| 910 } | 911 } |
| 911 | 912 |
| 912 unsigned int vp9_sub_pixel_variance4x8_c(const uint8_t *src_ptr, | 913 unsigned int vp9_sub_pixel_variance4x8_c(const uint8_t *src_ptr, |
| 913 int src_pixels_per_line, | 914 int src_pixels_per_line, |
| 914 int xoffset, | 915 int xoffset, |
| 915 int yoffset, | 916 int yoffset, |
| 916 const uint8_t *dst_ptr, | 917 const uint8_t *dst_ptr, |
| 917 int dst_pixels_per_line, | 918 int dst_pixels_per_line, |
| 918 unsigned int *sse) { | 919 unsigned int *sse) { |
| 919 uint16_t fdata3[5 * 8]; // Temp data bufffer used in filtering | 920 uint16_t fdata3[5 * 8]; // Temp data bufffer used in filtering |
| 920 // FIXME(jingning,rbultje): this temp2 buffer probably doesn't need to be | 921 // FIXME(jingning,rbultje): this temp2 buffer probably doesn't need to be |
| 921 // of this big? same issue appears in all other block size settings. | 922 // of this big? same issue appears in all other block size settings. |
| 922 uint8_t temp2[20 * 16]; | 923 uint8_t temp2[20 * 16]; |
| 923 const int16_t *hfilter, *vfilter; | 924 const int16_t *hfilter, *vfilter; |
| 924 | 925 |
| 925 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 926 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); |
| 926 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 927 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); |
| 927 | 928 |
| 928 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, | 929 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, |
| 929 1, 9, 4, hfilter); | 930 1, 9, 4, hfilter); |
| 930 var_filter_block2d_bil_second_pass(fdata3, temp2, 4, 4, 8, 4, vfilter); | 931 var_filter_block2d_bil_second_pass(fdata3, temp2, 4, 4, 8, 4, vfilter); |
| 931 | 932 |
| 932 return vp9_variance4x8_c(temp2, 4, dst_ptr, dst_pixels_per_line, sse); | 933 return vp9_variance4x8(temp2, 4, dst_ptr, dst_pixels_per_line, sse); |
| 933 } | 934 } |
| 934 | 935 |
| 935 unsigned int vp9_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, | 936 unsigned int vp9_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, |
| 936 int src_pixels_per_line, | 937 int src_pixels_per_line, |
| 937 int xoffset, | 938 int xoffset, |
| 938 int yoffset, | 939 int yoffset, |
| 939 const uint8_t *dst_ptr, | 940 const uint8_t *dst_ptr, |
| 940 int dst_pixels_per_line, | 941 int dst_pixels_per_line, |
| 941 unsigned int *sse, | 942 unsigned int *sse, |
| 942 const uint8_t *second_pred) { | 943 const uint8_t *second_pred) { |
| 943 uint16_t fdata3[5 * 8]; // Temp data bufffer used in filtering | 944 uint16_t fdata3[5 * 8]; // Temp data bufffer used in filtering |
| 944 uint8_t temp2[20 * 16]; | 945 uint8_t temp2[20 * 16]; |
| 945 DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 4 * 8); // compound pred buffer | 946 DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 4 * 8); // compound pred buffer |
| 946 const int16_t *hfilter, *vfilter; | 947 const int16_t *hfilter, *vfilter; |
| 947 | 948 |
| 948 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 949 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); |
| 949 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 950 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); |
| 950 | 951 |
| 951 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, | 952 var_filter_block2d_bil_first_pass(src_ptr, fdata3, src_pixels_per_line, |
| 952 1, 9, 4, hfilter); | 953 1, 9, 4, hfilter); |
| 953 var_filter_block2d_bil_second_pass(fdata3, temp2, 4, 4, 8, 4, vfilter); | 954 var_filter_block2d_bil_second_pass(fdata3, temp2, 4, 4, 8, 4, vfilter); |
| 954 comp_avg_pred(temp3, second_pred, 4, 8, temp2, 4); | 955 comp_avg_pred(temp3, second_pred, 4, 8, temp2, 4); |
| 955 return vp9_variance4x8_c(temp3, 4, dst_ptr, dst_pixels_per_line, sse); | 956 return vp9_variance4x8(temp3, 4, dst_ptr, dst_pixels_per_line, sse); |
| 956 } | 957 } |
| OLD | NEW |