| 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 28 matching lines...) Expand all Loading... |
| 39 return (var - (((int64_t)avg * avg) >> 11)); | 39 return (var - (((int64_t)avg * avg) >> 11)); |
| 40 } | 40 } |
| 41 | 41 |
| 42 unsigned int vp9_sub_pixel_variance64x32_c(const uint8_t *src_ptr, | 42 unsigned int vp9_sub_pixel_variance64x32_c(const uint8_t *src_ptr, |
| 43 int src_pixels_per_line, | 43 int src_pixels_per_line, |
| 44 int xoffset, | 44 int xoffset, |
| 45 int yoffset, | 45 int yoffset, |
| 46 const uint8_t *dst_ptr, | 46 const uint8_t *dst_ptr, |
| 47 int dst_pixels_per_line, | 47 int dst_pixels_per_line, |
| 48 unsigned int *sse) { | 48 unsigned int *sse) { |
| 49 uint16_t fdata3[65 * 64]; // Temp data bufffer used in filtering | 49 uint16_t fdata3[65 * 64]; // Temp data buffer used in filtering |
| 50 uint8_t temp2[68 * 64]; | 50 uint8_t temp2[68 * 64]; |
| 51 const int16_t *hfilter, *vfilter; | 51 const int16_t *hfilter, *vfilter; |
| 52 | 52 |
| 53 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 53 hfilter = BILINEAR_FILTERS_2TAP(xoffset); |
| 54 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 54 vfilter = BILINEAR_FILTERS_2TAP(yoffset); |
| 55 | 55 |
| 56 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, |
| 57 1, 33, 64, hfilter); | 57 1, 33, 64, hfilter); |
| 58 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); |
| 59 | 59 |
| 60 return vp9_variance64x32(temp2, 64, dst_ptr, dst_pixels_per_line, sse); | 60 return vp9_variance64x32(temp2, 64, dst_ptr, dst_pixels_per_line, sse); |
| 61 } | 61 } |
| 62 | 62 |
| 63 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, |
| 64 int src_pixels_per_line, | 64 int src_pixels_per_line, |
| 65 int xoffset, | 65 int xoffset, |
| 66 int yoffset, | 66 int yoffset, |
| 67 const uint8_t *dst_ptr, | 67 const uint8_t *dst_ptr, |
| 68 int dst_pixels_per_line, | 68 int dst_pixels_per_line, |
| 69 unsigned int *sse, | 69 unsigned int *sse, |
| 70 const uint8_t *second_pred) { | 70 const uint8_t *second_pred) { |
| 71 uint16_t fdata3[65 * 64]; // Temp data bufffer used in filtering | 71 uint16_t fdata3[65 * 64]; // Temp data buffer used in filtering |
| 72 uint8_t temp2[68 * 64]; | 72 uint8_t temp2[68 * 64]; |
| 73 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 |
| 74 const int16_t *hfilter, *vfilter; | 74 const int16_t *hfilter, *vfilter; |
| 75 | 75 |
| 76 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 76 hfilter = BILINEAR_FILTERS_2TAP(xoffset); |
| 77 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 77 vfilter = BILINEAR_FILTERS_2TAP(yoffset); |
| 78 | 78 |
| 79 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, |
| 80 1, 33, 64, hfilter); | 80 1, 33, 64, hfilter); |
| 81 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); |
| 82 comp_avg_pred(temp3, second_pred, 64, 32, temp2, 64); | 82 comp_avg_pred(temp3, second_pred, 64, 32, temp2, 64); |
| 83 return vp9_variance64x32(temp3, 64, dst_ptr, dst_pixels_per_line, sse); | 83 return vp9_variance64x32(temp3, 64, dst_ptr, dst_pixels_per_line, sse); |
| 84 } | 84 } |
| 85 | 85 |
| 86 unsigned int vp9_variance32x64_c(const uint8_t *src_ptr, | 86 unsigned int vp9_variance32x64_c(const uint8_t *src_ptr, |
| 87 int source_stride, | 87 int source_stride, |
| 88 const uint8_t *ref_ptr, | 88 const uint8_t *ref_ptr, |
| 89 int recon_stride, | 89 int recon_stride, |
| 90 unsigned int *sse) { | 90 unsigned int *sse) { |
| 91 unsigned int var; | 91 unsigned int var; |
| 92 int avg; | 92 int avg; |
| 93 | 93 |
| 94 variance(src_ptr, source_stride, ref_ptr, recon_stride, 32, 64, &var, &avg); | 94 variance(src_ptr, source_stride, ref_ptr, recon_stride, 32, 64, &var, &avg); |
| 95 *sse = var; | 95 *sse = var; |
| 96 return (var - (((int64_t)avg * avg) >> 11)); | 96 return (var - (((int64_t)avg * avg) >> 11)); |
| 97 } | 97 } |
| 98 | 98 |
| 99 unsigned int vp9_sub_pixel_variance32x64_c(const uint8_t *src_ptr, | 99 unsigned int vp9_sub_pixel_variance32x64_c(const uint8_t *src_ptr, |
| 100 int src_pixels_per_line, | 100 int src_pixels_per_line, |
| 101 int xoffset, | 101 int xoffset, |
| 102 int yoffset, | 102 int yoffset, |
| 103 const uint8_t *dst_ptr, | 103 const uint8_t *dst_ptr, |
| 104 int dst_pixels_per_line, | 104 int dst_pixels_per_line, |
| 105 unsigned int *sse) { | 105 unsigned int *sse) { |
| 106 uint16_t fdata3[65 * 64]; // Temp data bufffer used in filtering | 106 uint16_t fdata3[65 * 64]; // Temp data buffer used in filtering |
| 107 uint8_t temp2[68 * 64]; | 107 uint8_t temp2[68 * 64]; |
| 108 const int16_t *hfilter, *vfilter; | 108 const int16_t *hfilter, *vfilter; |
| 109 | 109 |
| 110 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 110 hfilter = BILINEAR_FILTERS_2TAP(xoffset); |
| 111 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 111 vfilter = BILINEAR_FILTERS_2TAP(yoffset); |
| 112 | 112 |
| 113 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, |
| 114 1, 65, 32, hfilter); | 114 1, 65, 32, hfilter); |
| 115 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); |
| 116 | 116 |
| 117 return vp9_variance32x64(temp2, 32, dst_ptr, dst_pixels_per_line, sse); | 117 return vp9_variance32x64(temp2, 32, dst_ptr, dst_pixels_per_line, sse); |
| 118 } | 118 } |
| 119 | 119 |
| 120 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, |
| 121 int src_pixels_per_line, | 121 int src_pixels_per_line, |
| 122 int xoffset, | 122 int xoffset, |
| 123 int yoffset, | 123 int yoffset, |
| 124 const uint8_t *dst_ptr, | 124 const uint8_t *dst_ptr, |
| 125 int dst_pixels_per_line, | 125 int dst_pixels_per_line, |
| 126 unsigned int *sse, | 126 unsigned int *sse, |
| 127 const uint8_t *second_pred) { | 127 const uint8_t *second_pred) { |
| 128 uint16_t fdata3[65 * 64]; // Temp data bufffer used in filtering | 128 uint16_t fdata3[65 * 64]; // Temp data buffer used in filtering |
| 129 uint8_t temp2[68 * 64]; | 129 uint8_t temp2[68 * 64]; |
| 130 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 |
| 131 const int16_t *hfilter, *vfilter; | 131 const int16_t *hfilter, *vfilter; |
| 132 | 132 |
| 133 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 133 hfilter = BILINEAR_FILTERS_2TAP(xoffset); |
| 134 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 134 vfilter = BILINEAR_FILTERS_2TAP(yoffset); |
| 135 | 135 |
| 136 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, |
| 137 1, 65, 32, hfilter); | 137 1, 65, 32, hfilter); |
| 138 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); |
| 139 comp_avg_pred(temp3, second_pred, 32, 64, temp2, 32); | 139 comp_avg_pred(temp3, second_pred, 32, 64, temp2, 32); |
| 140 return vp9_variance32x64(temp3, 32, dst_ptr, dst_pixels_per_line, sse); | 140 return vp9_variance32x64(temp3, 32, dst_ptr, dst_pixels_per_line, sse); |
| 141 } | 141 } |
| 142 | 142 |
| 143 unsigned int vp9_variance32x16_c(const uint8_t *src_ptr, | 143 unsigned int vp9_variance32x16_c(const uint8_t *src_ptr, |
| 144 int source_stride, | 144 int source_stride, |
| 145 const uint8_t *ref_ptr, | 145 const uint8_t *ref_ptr, |
| 146 int recon_stride, | 146 int recon_stride, |
| 147 unsigned int *sse) { | 147 unsigned int *sse) { |
| 148 unsigned int var; | 148 unsigned int var; |
| 149 int avg; | 149 int avg; |
| 150 | 150 |
| 151 variance(src_ptr, source_stride, ref_ptr, recon_stride, 32, 16, &var, &avg); | 151 variance(src_ptr, source_stride, ref_ptr, recon_stride, 32, 16, &var, &avg); |
| 152 *sse = var; | 152 *sse = var; |
| 153 return (var - (((int64_t)avg * avg) >> 9)); | 153 return (var - (((int64_t)avg * avg) >> 9)); |
| 154 } | 154 } |
| 155 | 155 |
| 156 unsigned int vp9_sub_pixel_variance32x16_c(const uint8_t *src_ptr, | 156 unsigned int vp9_sub_pixel_variance32x16_c(const uint8_t *src_ptr, |
| 157 int src_pixels_per_line, | 157 int src_pixels_per_line, |
| 158 int xoffset, | 158 int xoffset, |
| 159 int yoffset, | 159 int yoffset, |
| 160 const uint8_t *dst_ptr, | 160 const uint8_t *dst_ptr, |
| 161 int dst_pixels_per_line, | 161 int dst_pixels_per_line, |
| 162 unsigned int *sse) { | 162 unsigned int *sse) { |
| 163 uint16_t fdata3[33 * 32]; // Temp data bufffer used in filtering | 163 uint16_t fdata3[33 * 32]; // Temp data buffer used in filtering |
| 164 uint8_t temp2[36 * 32]; | 164 uint8_t temp2[36 * 32]; |
| 165 const int16_t *hfilter, *vfilter; | 165 const int16_t *hfilter, *vfilter; |
| 166 | 166 |
| 167 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 167 hfilter = BILINEAR_FILTERS_2TAP(xoffset); |
| 168 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 168 vfilter = BILINEAR_FILTERS_2TAP(yoffset); |
| 169 | 169 |
| 170 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, |
| 171 1, 17, 32, hfilter); | 171 1, 17, 32, hfilter); |
| 172 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); |
| 173 | 173 |
| 174 return vp9_variance32x16(temp2, 32, dst_ptr, dst_pixels_per_line, sse); | 174 return vp9_variance32x16(temp2, 32, dst_ptr, dst_pixels_per_line, sse); |
| 175 } | 175 } |
| 176 | 176 |
| 177 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, |
| 178 int src_pixels_per_line, | 178 int src_pixels_per_line, |
| 179 int xoffset, | 179 int xoffset, |
| 180 int yoffset, | 180 int yoffset, |
| 181 const uint8_t *dst_ptr, | 181 const uint8_t *dst_ptr, |
| 182 int dst_pixels_per_line, | 182 int dst_pixels_per_line, |
| 183 unsigned int *sse, | 183 unsigned int *sse, |
| 184 const uint8_t *second_pred) { | 184 const uint8_t *second_pred) { |
| 185 uint16_t fdata3[33 * 32]; // Temp data bufffer used in filtering | 185 uint16_t fdata3[33 * 32]; // Temp data buffer used in filtering |
| 186 uint8_t temp2[36 * 32]; | 186 uint8_t temp2[36 * 32]; |
| 187 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 |
| 188 const int16_t *hfilter, *vfilter; | 188 const int16_t *hfilter, *vfilter; |
| 189 | 189 |
| 190 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 190 hfilter = BILINEAR_FILTERS_2TAP(xoffset); |
| 191 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 191 vfilter = BILINEAR_FILTERS_2TAP(yoffset); |
| 192 | 192 |
| 193 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, |
| 194 1, 17, 32, hfilter); | 194 1, 17, 32, hfilter); |
| 195 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); |
| 196 comp_avg_pred(temp3, second_pred, 32, 16, temp2, 32); | 196 comp_avg_pred(temp3, second_pred, 32, 16, temp2, 32); |
| 197 return vp9_variance32x16(temp3, 32, dst_ptr, dst_pixels_per_line, sse); | 197 return vp9_variance32x16(temp3, 32, dst_ptr, dst_pixels_per_line, sse); |
| 198 } | 198 } |
| 199 | 199 |
| 200 unsigned int vp9_variance16x32_c(const uint8_t *src_ptr, | 200 unsigned int vp9_variance16x32_c(const uint8_t *src_ptr, |
| 201 int source_stride, | 201 int source_stride, |
| 202 const uint8_t *ref_ptr, | 202 const uint8_t *ref_ptr, |
| 203 int recon_stride, | 203 int recon_stride, |
| 204 unsigned int *sse) { | 204 unsigned int *sse) { |
| 205 unsigned int var; | 205 unsigned int var; |
| 206 int avg; | 206 int avg; |
| 207 | 207 |
| 208 variance(src_ptr, source_stride, ref_ptr, recon_stride, 16, 32, &var, &avg); | 208 variance(src_ptr, source_stride, ref_ptr, recon_stride, 16, 32, &var, &avg); |
| 209 *sse = var; | 209 *sse = var; |
| 210 return (var - (((int64_t)avg * avg) >> 9)); | 210 return (var - (((int64_t)avg * avg) >> 9)); |
| 211 } | 211 } |
| 212 | 212 |
| 213 unsigned int vp9_sub_pixel_variance16x32_c(const uint8_t *src_ptr, | 213 unsigned int vp9_sub_pixel_variance16x32_c(const uint8_t *src_ptr, |
| 214 int src_pixels_per_line, | 214 int src_pixels_per_line, |
| 215 int xoffset, | 215 int xoffset, |
| 216 int yoffset, | 216 int yoffset, |
| 217 const uint8_t *dst_ptr, | 217 const uint8_t *dst_ptr, |
| 218 int dst_pixels_per_line, | 218 int dst_pixels_per_line, |
| 219 unsigned int *sse) { | 219 unsigned int *sse) { |
| 220 uint16_t fdata3[33 * 32]; // Temp data bufffer used in filtering | 220 uint16_t fdata3[33 * 32]; // Temp data buffer used in filtering |
| 221 uint8_t temp2[36 * 32]; | 221 uint8_t temp2[36 * 32]; |
| 222 const int16_t *hfilter, *vfilter; | 222 const int16_t *hfilter, *vfilter; |
| 223 | 223 |
| 224 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 224 hfilter = BILINEAR_FILTERS_2TAP(xoffset); |
| 225 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 225 vfilter = BILINEAR_FILTERS_2TAP(yoffset); |
| 226 | 226 |
| 227 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, |
| 228 1, 33, 16, hfilter); | 228 1, 33, 16, hfilter); |
| 229 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); |
| 230 | 230 |
| 231 return vp9_variance16x32(temp2, 16, dst_ptr, dst_pixels_per_line, sse); | 231 return vp9_variance16x32(temp2, 16, dst_ptr, dst_pixels_per_line, sse); |
| 232 } | 232 } |
| 233 | 233 |
| 234 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, |
| 235 int src_pixels_per_line, | 235 int src_pixels_per_line, |
| 236 int xoffset, | 236 int xoffset, |
| 237 int yoffset, | 237 int yoffset, |
| 238 const uint8_t *dst_ptr, | 238 const uint8_t *dst_ptr, |
| 239 int dst_pixels_per_line, | 239 int dst_pixels_per_line, |
| 240 unsigned int *sse, | 240 unsigned int *sse, |
| 241 const uint8_t *second_pred) { | 241 const uint8_t *second_pred) { |
| 242 uint16_t fdata3[33 * 32]; // Temp data bufffer used in filtering | 242 uint16_t fdata3[33 * 32]; // Temp data buffer used in filtering |
| 243 uint8_t temp2[36 * 32]; | 243 uint8_t temp2[36 * 32]; |
| 244 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 |
| 245 const int16_t *hfilter, *vfilter; | 245 const int16_t *hfilter, *vfilter; |
| 246 | 246 |
| 247 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 247 hfilter = BILINEAR_FILTERS_2TAP(xoffset); |
| 248 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 248 vfilter = BILINEAR_FILTERS_2TAP(yoffset); |
| 249 | 249 |
| 250 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, |
| 251 1, 33, 16, hfilter); | 251 1, 33, 16, hfilter); |
| 252 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); |
| 253 comp_avg_pred(temp3, second_pred, 16, 32, temp2, 16); | 253 comp_avg_pred(temp3, second_pred, 16, 32, temp2, 16); |
| 254 return vp9_variance16x32(temp3, 16, dst_ptr, dst_pixels_per_line, sse); | 254 return vp9_variance16x32(temp3, 16, dst_ptr, dst_pixels_per_line, sse); |
| 255 } | 255 } |
| 256 | 256 |
| 257 unsigned int vp9_variance64x64_c(const uint8_t *src_ptr, | 257 unsigned int vp9_variance64x64_c(const uint8_t *src_ptr, |
| 258 int source_stride, | 258 int source_stride, |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 | 433 |
| 434 unsigned int vp9_sub_pixel_variance4x4_c(const uint8_t *src_ptr, | 434 unsigned int vp9_sub_pixel_variance4x4_c(const uint8_t *src_ptr, |
| 435 int src_pixels_per_line, | 435 int src_pixels_per_line, |
| 436 int xoffset, | 436 int xoffset, |
| 437 int yoffset, | 437 int yoffset, |
| 438 const uint8_t *dst_ptr, | 438 const uint8_t *dst_ptr, |
| 439 int dst_pixels_per_line, | 439 int dst_pixels_per_line, |
| 440 unsigned int *sse) { | 440 unsigned int *sse) { |
| 441 uint8_t temp2[20 * 16]; | 441 uint8_t temp2[20 * 16]; |
| 442 const int16_t *hfilter, *vfilter; | 442 const int16_t *hfilter, *vfilter; |
| 443 uint16_t fdata3[5 * 4]; // Temp data bufffer used in filtering | 443 uint16_t fdata3[5 * 4]; // Temp data buffer used in filtering |
| 444 | 444 |
| 445 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 445 hfilter = BILINEAR_FILTERS_2TAP(xoffset); |
| 446 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 446 vfilter = BILINEAR_FILTERS_2TAP(yoffset); |
| 447 | 447 |
| 448 // First filter 1d Horizontal | 448 // First filter 1d Horizontal |
| 449 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, |
| 450 1, 5, 4, hfilter); | 450 1, 5, 4, hfilter); |
| 451 | 451 |
| 452 // Now filter Verticaly | 452 // Now filter Verticaly |
| 453 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); |
| 454 | 454 |
| 455 return vp9_variance4x4(temp2, 4, dst_ptr, dst_pixels_per_line, sse); | 455 return vp9_variance4x4(temp2, 4, dst_ptr, dst_pixels_per_line, sse); |
| 456 } | 456 } |
| 457 | 457 |
| 458 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, |
| 459 int src_pixels_per_line, | 459 int src_pixels_per_line, |
| 460 int xoffset, | 460 int xoffset, |
| 461 int yoffset, | 461 int yoffset, |
| 462 const uint8_t *dst_ptr, | 462 const uint8_t *dst_ptr, |
| 463 int dst_pixels_per_line, | 463 int dst_pixels_per_line, |
| 464 unsigned int *sse, | 464 unsigned int *sse, |
| 465 const uint8_t *second_pred) { | 465 const uint8_t *second_pred) { |
| 466 uint8_t temp2[20 * 16]; | 466 uint8_t temp2[20 * 16]; |
| 467 const int16_t *hfilter, *vfilter; | 467 const int16_t *hfilter, *vfilter; |
| 468 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 |
| 469 uint16_t fdata3[5 * 4]; // Temp data bufffer used in filtering | 469 uint16_t fdata3[5 * 4]; // Temp data buffer used in filtering |
| 470 | 470 |
| 471 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 471 hfilter = BILINEAR_FILTERS_2TAP(xoffset); |
| 472 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 472 vfilter = BILINEAR_FILTERS_2TAP(yoffset); |
| 473 | 473 |
| 474 // First filter 1d Horizontal | 474 // First filter 1d Horizontal |
| 475 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, |
| 476 1, 5, 4, hfilter); | 476 1, 5, 4, hfilter); |
| 477 | 477 |
| 478 // Now filter Verticaly | 478 // Now filter Verticaly |
| 479 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); |
| 480 comp_avg_pred(temp3, second_pred, 4, 4, temp2, 4); | 480 comp_avg_pred(temp3, second_pred, 4, 4, temp2, 4); |
| 481 return vp9_variance4x4(temp3, 4, dst_ptr, dst_pixels_per_line, sse); | 481 return vp9_variance4x4(temp3, 4, dst_ptr, dst_pixels_per_line, sse); |
| 482 } | 482 } |
| 483 | 483 |
| 484 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, |
| 485 int src_pixels_per_line, | 485 int src_pixels_per_line, |
| 486 int xoffset, | 486 int xoffset, |
| 487 int yoffset, | 487 int yoffset, |
| 488 const uint8_t *dst_ptr, | 488 const uint8_t *dst_ptr, |
| 489 int dst_pixels_per_line, | 489 int dst_pixels_per_line, |
| 490 unsigned int *sse) { | 490 unsigned int *sse) { |
| 491 uint16_t fdata3[9 * 8]; // Temp data bufffer used in filtering | 491 uint16_t fdata3[9 * 8]; // Temp data buffer used in filtering |
| 492 uint8_t temp2[20 * 16]; | 492 uint8_t temp2[20 * 16]; |
| 493 const int16_t *hfilter, *vfilter; | 493 const int16_t *hfilter, *vfilter; |
| 494 | 494 |
| 495 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 495 hfilter = BILINEAR_FILTERS_2TAP(xoffset); |
| 496 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 496 vfilter = BILINEAR_FILTERS_2TAP(yoffset); |
| 497 | 497 |
| 498 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, |
| 499 1, 9, 8, hfilter); | 499 1, 9, 8, hfilter); |
| 500 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); |
| 501 | 501 |
| 502 return vp9_variance8x8(temp2, 8, dst_ptr, dst_pixels_per_line, sse); | 502 return vp9_variance8x8(temp2, 8, dst_ptr, dst_pixels_per_line, sse); |
| 503 } | 503 } |
| 504 | 504 |
| 505 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, |
| 506 int src_pixels_per_line, | 506 int src_pixels_per_line, |
| 507 int xoffset, | 507 int xoffset, |
| 508 int yoffset, | 508 int yoffset, |
| 509 const uint8_t *dst_ptr, | 509 const uint8_t *dst_ptr, |
| 510 int dst_pixels_per_line, | 510 int dst_pixels_per_line, |
| 511 unsigned int *sse, | 511 unsigned int *sse, |
| 512 const uint8_t *second_pred) { | 512 const uint8_t *second_pred) { |
| 513 uint16_t fdata3[9 * 8]; // Temp data bufffer used in filtering | 513 uint16_t fdata3[9 * 8]; // Temp data buffer used in filtering |
| 514 uint8_t temp2[20 * 16]; | 514 uint8_t temp2[20 * 16]; |
| 515 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 |
| 516 const int16_t *hfilter, *vfilter; | 516 const int16_t *hfilter, *vfilter; |
| 517 | 517 |
| 518 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 518 hfilter = BILINEAR_FILTERS_2TAP(xoffset); |
| 519 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 519 vfilter = BILINEAR_FILTERS_2TAP(yoffset); |
| 520 | 520 |
| 521 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, |
| 522 1, 9, 8, hfilter); | 522 1, 9, 8, hfilter); |
| 523 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); |
| 524 comp_avg_pred(temp3, second_pred, 8, 8, temp2, 8); | 524 comp_avg_pred(temp3, second_pred, 8, 8, temp2, 8); |
| 525 return vp9_variance8x8(temp3, 8, dst_ptr, dst_pixels_per_line, sse); | 525 return vp9_variance8x8(temp3, 8, dst_ptr, dst_pixels_per_line, sse); |
| 526 } | 526 } |
| 527 | 527 |
| 528 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, |
| 529 int src_pixels_per_line, | 529 int src_pixels_per_line, |
| 530 int xoffset, | 530 int xoffset, |
| 531 int yoffset, | 531 int yoffset, |
| 532 const uint8_t *dst_ptr, | 532 const uint8_t *dst_ptr, |
| 533 int dst_pixels_per_line, | 533 int dst_pixels_per_line, |
| 534 unsigned int *sse) { | 534 unsigned int *sse) { |
| 535 uint16_t fdata3[17 * 16]; // Temp data bufffer used in filtering | 535 uint16_t fdata3[17 * 16]; // Temp data buffer used in filtering |
| 536 uint8_t temp2[20 * 16]; | 536 uint8_t temp2[20 * 16]; |
| 537 const int16_t *hfilter, *vfilter; | 537 const int16_t *hfilter, *vfilter; |
| 538 | 538 |
| 539 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 539 hfilter = BILINEAR_FILTERS_2TAP(xoffset); |
| 540 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 540 vfilter = BILINEAR_FILTERS_2TAP(yoffset); |
| 541 | 541 |
| 542 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, |
| 543 1, 17, 16, hfilter); | 543 1, 17, 16, hfilter); |
| 544 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); |
| 545 | 545 |
| 546 return vp9_variance16x16(temp2, 16, dst_ptr, dst_pixels_per_line, sse); | 546 return vp9_variance16x16(temp2, 16, dst_ptr, dst_pixels_per_line, sse); |
| 547 } | 547 } |
| 548 | 548 |
| 549 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, |
| 550 int src_pixels_per_line, | 550 int src_pixels_per_line, |
| 551 int xoffset, | 551 int xoffset, |
| 552 int yoffset, | 552 int yoffset, |
| 553 const uint8_t *dst_ptr, | 553 const uint8_t *dst_ptr, |
| 554 int dst_pixels_per_line, | 554 int dst_pixels_per_line, |
| 555 unsigned int *sse, | 555 unsigned int *sse, |
| 556 const uint8_t *second_pred) { | 556 const uint8_t *second_pred) { |
| 557 uint16_t fdata3[17 * 16]; | 557 uint16_t fdata3[17 * 16]; |
| 558 uint8_t temp2[20 * 16]; | 558 uint8_t temp2[20 * 16]; |
| 559 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 |
| 560 const int16_t *hfilter, *vfilter; | 560 const int16_t *hfilter, *vfilter; |
| 561 | 561 |
| 562 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 562 hfilter = BILINEAR_FILTERS_2TAP(xoffset); |
| 563 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 563 vfilter = BILINEAR_FILTERS_2TAP(yoffset); |
| 564 | 564 |
| 565 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, |
| 566 1, 17, 16, hfilter); | 566 1, 17, 16, hfilter); |
| 567 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); |
| 568 | 568 |
| 569 comp_avg_pred(temp3, second_pred, 16, 16, temp2, 16); | 569 comp_avg_pred(temp3, second_pred, 16, 16, temp2, 16); |
| 570 return vp9_variance16x16(temp3, 16, dst_ptr, dst_pixels_per_line, sse); | 570 return vp9_variance16x16(temp3, 16, dst_ptr, dst_pixels_per_line, sse); |
| 571 } | 571 } |
| 572 | 572 |
| 573 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, |
| 574 int src_pixels_per_line, | 574 int src_pixels_per_line, |
| 575 int xoffset, | 575 int xoffset, |
| 576 int yoffset, | 576 int yoffset, |
| 577 const uint8_t *dst_ptr, | 577 const uint8_t *dst_ptr, |
| 578 int dst_pixels_per_line, | 578 int dst_pixels_per_line, |
| 579 unsigned int *sse) { | 579 unsigned int *sse) { |
| 580 uint16_t fdata3[65 * 64]; // Temp data bufffer used in filtering | 580 uint16_t fdata3[65 * 64]; // Temp data buffer used in filtering |
| 581 uint8_t temp2[68 * 64]; | 581 uint8_t temp2[68 * 64]; |
| 582 const int16_t *hfilter, *vfilter; | 582 const int16_t *hfilter, *vfilter; |
| 583 | 583 |
| 584 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 584 hfilter = BILINEAR_FILTERS_2TAP(xoffset); |
| 585 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 585 vfilter = BILINEAR_FILTERS_2TAP(yoffset); |
| 586 | 586 |
| 587 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, |
| 588 1, 65, 64, hfilter); | 588 1, 65, 64, hfilter); |
| 589 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); |
| 590 | 590 |
| 591 return vp9_variance64x64(temp2, 64, dst_ptr, dst_pixels_per_line, sse); | 591 return vp9_variance64x64(temp2, 64, dst_ptr, dst_pixels_per_line, sse); |
| 592 } | 592 } |
| 593 | 593 |
| 594 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, |
| 595 int src_pixels_per_line, | 595 int src_pixels_per_line, |
| 596 int xoffset, | 596 int xoffset, |
| 597 int yoffset, | 597 int yoffset, |
| 598 const uint8_t *dst_ptr, | 598 const uint8_t *dst_ptr, |
| 599 int dst_pixels_per_line, | 599 int dst_pixels_per_line, |
| 600 unsigned int *sse, | 600 unsigned int *sse, |
| 601 const uint8_t *second_pred) { | 601 const uint8_t *second_pred) { |
| 602 uint16_t fdata3[65 * 64]; // Temp data bufffer used in filtering | 602 uint16_t fdata3[65 * 64]; // Temp data buffer used in filtering |
| 603 uint8_t temp2[68 * 64]; | 603 uint8_t temp2[68 * 64]; |
| 604 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 |
| 605 const int16_t *hfilter, *vfilter; | 605 const int16_t *hfilter, *vfilter; |
| 606 | 606 |
| 607 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 607 hfilter = BILINEAR_FILTERS_2TAP(xoffset); |
| 608 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 608 vfilter = BILINEAR_FILTERS_2TAP(yoffset); |
| 609 | 609 |
| 610 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, |
| 611 1, 65, 64, hfilter); | 611 1, 65, 64, hfilter); |
| 612 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); |
| 613 comp_avg_pred(temp3, second_pred, 64, 64, temp2, 64); | 613 comp_avg_pred(temp3, second_pred, 64, 64, temp2, 64); |
| 614 return vp9_variance64x64(temp3, 64, dst_ptr, dst_pixels_per_line, sse); | 614 return vp9_variance64x64(temp3, 64, dst_ptr, dst_pixels_per_line, sse); |
| 615 } | 615 } |
| 616 | 616 |
| 617 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, |
| 618 int src_pixels_per_line, | 618 int src_pixels_per_line, |
| 619 int xoffset, | 619 int xoffset, |
| 620 int yoffset, | 620 int yoffset, |
| 621 const uint8_t *dst_ptr, | 621 const uint8_t *dst_ptr, |
| 622 int dst_pixels_per_line, | 622 int dst_pixels_per_line, |
| 623 unsigned int *sse) { | 623 unsigned int *sse) { |
| 624 uint16_t fdata3[33 * 32]; // Temp data bufffer used in filtering | 624 uint16_t fdata3[33 * 32]; // Temp data buffer used in filtering |
| 625 uint8_t temp2[36 * 32]; | 625 uint8_t temp2[36 * 32]; |
| 626 const int16_t *hfilter, *vfilter; | 626 const int16_t *hfilter, *vfilter; |
| 627 | 627 |
| 628 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 628 hfilter = BILINEAR_FILTERS_2TAP(xoffset); |
| 629 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 629 vfilter = BILINEAR_FILTERS_2TAP(yoffset); |
| 630 | 630 |
| 631 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, |
| 632 1, 33, 32, hfilter); | 632 1, 33, 32, hfilter); |
| 633 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); |
| 634 | 634 |
| 635 return vp9_variance32x32(temp2, 32, dst_ptr, dst_pixels_per_line, sse); | 635 return vp9_variance32x32(temp2, 32, dst_ptr, dst_pixels_per_line, sse); |
| 636 } | 636 } |
| 637 | 637 |
| 638 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, |
| 639 int src_pixels_per_line, | 639 int src_pixels_per_line, |
| 640 int xoffset, | 640 int xoffset, |
| 641 int yoffset, | 641 int yoffset, |
| 642 const uint8_t *dst_ptr, | 642 const uint8_t *dst_ptr, |
| 643 int dst_pixels_per_line, | 643 int dst_pixels_per_line, |
| 644 unsigned int *sse, | 644 unsigned int *sse, |
| 645 const uint8_t *second_pred) { | 645 const uint8_t *second_pred) { |
| 646 uint16_t fdata3[33 * 32]; // Temp data bufffer used in filtering | 646 uint16_t fdata3[33 * 32]; // Temp data buffer used in filtering |
| 647 uint8_t temp2[36 * 32]; | 647 uint8_t temp2[36 * 32]; |
| 648 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 |
| 649 const int16_t *hfilter, *vfilter; | 649 const int16_t *hfilter, *vfilter; |
| 650 | 650 |
| 651 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 651 hfilter = BILINEAR_FILTERS_2TAP(xoffset); |
| 652 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 652 vfilter = BILINEAR_FILTERS_2TAP(yoffset); |
| 653 | 653 |
| 654 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, |
| 655 1, 33, 32, hfilter); | 655 1, 33, 32, hfilter); |
| 656 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); |
| 657 comp_avg_pred(temp3, second_pred, 32, 32, temp2, 32); | 657 comp_avg_pred(temp3, second_pred, 32, 32, temp2, 32); |
| 658 return vp9_variance32x32(temp3, 32, dst_ptr, dst_pixels_per_line, sse); | 658 return vp9_variance32x32(temp3, 32, dst_ptr, dst_pixels_per_line, sse); |
| 659 } | 659 } |
| 660 | 660 |
| 661 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, |
| 662 int source_stride, | 662 int source_stride, |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 778 return *sse; | 778 return *sse; |
| 779 } | 779 } |
| 780 | 780 |
| 781 unsigned int vp9_sub_pixel_variance16x8_c(const uint8_t *src_ptr, | 781 unsigned int vp9_sub_pixel_variance16x8_c(const uint8_t *src_ptr, |
| 782 int src_pixels_per_line, | 782 int src_pixels_per_line, |
| 783 int xoffset, | 783 int xoffset, |
| 784 int yoffset, | 784 int yoffset, |
| 785 const uint8_t *dst_ptr, | 785 const uint8_t *dst_ptr, |
| 786 int dst_pixels_per_line, | 786 int dst_pixels_per_line, |
| 787 unsigned int *sse) { | 787 unsigned int *sse) { |
| 788 uint16_t fdata3[16 * 9]; // Temp data bufffer used in filtering | 788 uint16_t fdata3[16 * 9]; // Temp data buffer used in filtering |
| 789 uint8_t temp2[20 * 16]; | 789 uint8_t temp2[20 * 16]; |
| 790 const int16_t *hfilter, *vfilter; | 790 const int16_t *hfilter, *vfilter; |
| 791 | 791 |
| 792 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 792 hfilter = BILINEAR_FILTERS_2TAP(xoffset); |
| 793 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 793 vfilter = BILINEAR_FILTERS_2TAP(yoffset); |
| 794 | 794 |
| 795 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, |
| 796 1, 9, 16, hfilter); | 796 1, 9, 16, hfilter); |
| 797 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); |
| 798 | 798 |
| 799 return vp9_variance16x8(temp2, 16, dst_ptr, dst_pixels_per_line, sse); | 799 return vp9_variance16x8(temp2, 16, dst_ptr, dst_pixels_per_line, sse); |
| 800 } | 800 } |
| 801 | 801 |
| 802 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, |
| 803 int src_pixels_per_line, | 803 int src_pixels_per_line, |
| 804 int xoffset, | 804 int xoffset, |
| 805 int yoffset, | 805 int yoffset, |
| 806 const uint8_t *dst_ptr, | 806 const uint8_t *dst_ptr, |
| 807 int dst_pixels_per_line, | 807 int dst_pixels_per_line, |
| 808 unsigned int *sse, | 808 unsigned int *sse, |
| 809 const uint8_t *second_pred) { | 809 const uint8_t *second_pred) { |
| 810 uint16_t fdata3[16 * 9]; // Temp data bufffer used in filtering | 810 uint16_t fdata3[16 * 9]; // Temp data buffer used in filtering |
| 811 uint8_t temp2[20 * 16]; | 811 uint8_t temp2[20 * 16]; |
| 812 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 |
| 813 const int16_t *hfilter, *vfilter; | 813 const int16_t *hfilter, *vfilter; |
| 814 | 814 |
| 815 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 815 hfilter = BILINEAR_FILTERS_2TAP(xoffset); |
| 816 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 816 vfilter = BILINEAR_FILTERS_2TAP(yoffset); |
| 817 | 817 |
| 818 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, |
| 819 1, 9, 16, hfilter); | 819 1, 9, 16, hfilter); |
| 820 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); |
| 821 comp_avg_pred(temp3, second_pred, 16, 8, temp2, 16); | 821 comp_avg_pred(temp3, second_pred, 16, 8, temp2, 16); |
| 822 return vp9_variance16x8(temp3, 16, dst_ptr, dst_pixels_per_line, sse); | 822 return vp9_variance16x8(temp3, 16, dst_ptr, dst_pixels_per_line, sse); |
| 823 } | 823 } |
| 824 | 824 |
| 825 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, |
| 826 int src_pixels_per_line, | 826 int src_pixels_per_line, |
| 827 int xoffset, | 827 int xoffset, |
| 828 int yoffset, | 828 int yoffset, |
| 829 const uint8_t *dst_ptr, | 829 const uint8_t *dst_ptr, |
| 830 int dst_pixels_per_line, | 830 int dst_pixels_per_line, |
| 831 unsigned int *sse) { | 831 unsigned int *sse) { |
| 832 uint16_t fdata3[9 * 16]; // Temp data bufffer used in filtering | 832 uint16_t fdata3[9 * 16]; // Temp data buffer used in filtering |
| 833 uint8_t temp2[20 * 16]; | 833 uint8_t temp2[20 * 16]; |
| 834 const int16_t *hfilter, *vfilter; | 834 const int16_t *hfilter, *vfilter; |
| 835 | 835 |
| 836 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 836 hfilter = BILINEAR_FILTERS_2TAP(xoffset); |
| 837 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 837 vfilter = BILINEAR_FILTERS_2TAP(yoffset); |
| 838 | 838 |
| 839 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, |
| 840 1, 17, 8, hfilter); | 840 1, 17, 8, hfilter); |
| 841 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); |
| 842 | 842 |
| 843 return vp9_variance8x16(temp2, 8, dst_ptr, dst_pixels_per_line, sse); | 843 return vp9_variance8x16(temp2, 8, dst_ptr, dst_pixels_per_line, sse); |
| 844 } | 844 } |
| 845 | 845 |
| 846 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, |
| 847 int src_pixels_per_line, | 847 int src_pixels_per_line, |
| 848 int xoffset, | 848 int xoffset, |
| 849 int yoffset, | 849 int yoffset, |
| 850 const uint8_t *dst_ptr, | 850 const uint8_t *dst_ptr, |
| 851 int dst_pixels_per_line, | 851 int dst_pixels_per_line, |
| 852 unsigned int *sse, | 852 unsigned int *sse, |
| 853 const uint8_t *second_pred) { | 853 const uint8_t *second_pred) { |
| 854 uint16_t fdata3[9 * 16]; // Temp data bufffer used in filtering | 854 uint16_t fdata3[9 * 16]; // Temp data buffer used in filtering |
| 855 uint8_t temp2[20 * 16]; | 855 uint8_t temp2[20 * 16]; |
| 856 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 |
| 857 const int16_t *hfilter, *vfilter; | 857 const int16_t *hfilter, *vfilter; |
| 858 | 858 |
| 859 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 859 hfilter = BILINEAR_FILTERS_2TAP(xoffset); |
| 860 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 860 vfilter = BILINEAR_FILTERS_2TAP(yoffset); |
| 861 | 861 |
| 862 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, |
| 863 1, 17, 8, hfilter); | 863 1, 17, 8, hfilter); |
| 864 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); |
| 865 comp_avg_pred(temp3, second_pred, 8, 16, temp2, 8); | 865 comp_avg_pred(temp3, second_pred, 8, 16, temp2, 8); |
| 866 return vp9_variance8x16(temp3, 8, dst_ptr, dst_pixels_per_line, sse); | 866 return vp9_variance8x16(temp3, 8, dst_ptr, dst_pixels_per_line, sse); |
| 867 } | 867 } |
| 868 | 868 |
| 869 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, |
| 870 int src_pixels_per_line, | 870 int src_pixels_per_line, |
| 871 int xoffset, | 871 int xoffset, |
| 872 int yoffset, | 872 int yoffset, |
| 873 const uint8_t *dst_ptr, | 873 const uint8_t *dst_ptr, |
| 874 int dst_pixels_per_line, | 874 int dst_pixels_per_line, |
| 875 unsigned int *sse) { | 875 unsigned int *sse) { |
| 876 uint16_t fdata3[8 * 5]; // Temp data bufffer used in filtering | 876 uint16_t fdata3[8 * 5]; // Temp data buffer used in filtering |
| 877 uint8_t temp2[20 * 16]; | 877 uint8_t temp2[20 * 16]; |
| 878 const int16_t *hfilter, *vfilter; | 878 const int16_t *hfilter, *vfilter; |
| 879 | 879 |
| 880 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 880 hfilter = BILINEAR_FILTERS_2TAP(xoffset); |
| 881 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 881 vfilter = BILINEAR_FILTERS_2TAP(yoffset); |
| 882 | 882 |
| 883 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, |
| 884 1, 5, 8, hfilter); | 884 1, 5, 8, hfilter); |
| 885 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); |
| 886 | 886 |
| 887 return vp9_variance8x4(temp2, 8, dst_ptr, dst_pixels_per_line, sse); | 887 return vp9_variance8x4(temp2, 8, dst_ptr, dst_pixels_per_line, sse); |
| 888 } | 888 } |
| 889 | 889 |
| 890 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, |
| 891 int src_pixels_per_line, | 891 int src_pixels_per_line, |
| 892 int xoffset, | 892 int xoffset, |
| 893 int yoffset, | 893 int yoffset, |
| 894 const uint8_t *dst_ptr, | 894 const uint8_t *dst_ptr, |
| 895 int dst_pixels_per_line, | 895 int dst_pixels_per_line, |
| 896 unsigned int *sse, | 896 unsigned int *sse, |
| 897 const uint8_t *second_pred) { | 897 const uint8_t *second_pred) { |
| 898 uint16_t fdata3[8 * 5]; // Temp data bufffer used in filtering | 898 uint16_t fdata3[8 * 5]; // Temp data buffer used in filtering |
| 899 uint8_t temp2[20 * 16]; | 899 uint8_t temp2[20 * 16]; |
| 900 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 |
| 901 const int16_t *hfilter, *vfilter; | 901 const int16_t *hfilter, *vfilter; |
| 902 | 902 |
| 903 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 903 hfilter = BILINEAR_FILTERS_2TAP(xoffset); |
| 904 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 904 vfilter = BILINEAR_FILTERS_2TAP(yoffset); |
| 905 | 905 |
| 906 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, |
| 907 1, 5, 8, hfilter); | 907 1, 5, 8, hfilter); |
| 908 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); |
| 909 comp_avg_pred(temp3, second_pred, 8, 4, temp2, 8); | 909 comp_avg_pred(temp3, second_pred, 8, 4, temp2, 8); |
| 910 return vp9_variance8x4(temp3, 8, dst_ptr, dst_pixels_per_line, sse); | 910 return vp9_variance8x4(temp3, 8, dst_ptr, dst_pixels_per_line, sse); |
| 911 } | 911 } |
| 912 | 912 |
| 913 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, |
| 914 int src_pixels_per_line, | 914 int src_pixels_per_line, |
| 915 int xoffset, | 915 int xoffset, |
| 916 int yoffset, | 916 int yoffset, |
| 917 const uint8_t *dst_ptr, | 917 const uint8_t *dst_ptr, |
| 918 int dst_pixels_per_line, | 918 int dst_pixels_per_line, |
| 919 unsigned int *sse) { | 919 unsigned int *sse) { |
| 920 uint16_t fdata3[5 * 8]; // Temp data bufffer used in filtering | 920 uint16_t fdata3[5 * 8]; // Temp data buffer used in filtering |
| 921 // 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 |
| 922 // 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. |
| 923 uint8_t temp2[20 * 16]; | 923 uint8_t temp2[20 * 16]; |
| 924 const int16_t *hfilter, *vfilter; | 924 const int16_t *hfilter, *vfilter; |
| 925 | 925 |
| 926 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 926 hfilter = BILINEAR_FILTERS_2TAP(xoffset); |
| 927 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 927 vfilter = BILINEAR_FILTERS_2TAP(yoffset); |
| 928 | 928 |
| 929 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, |
| 930 1, 9, 4, hfilter); | 930 1, 9, 4, hfilter); |
| 931 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); |
| 932 | 932 |
| 933 return vp9_variance4x8(temp2, 4, dst_ptr, dst_pixels_per_line, sse); | 933 return vp9_variance4x8(temp2, 4, dst_ptr, dst_pixels_per_line, sse); |
| 934 } | 934 } |
| 935 | 935 |
| 936 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, |
| 937 int src_pixels_per_line, | 937 int src_pixels_per_line, |
| 938 int xoffset, | 938 int xoffset, |
| 939 int yoffset, | 939 int yoffset, |
| 940 const uint8_t *dst_ptr, | 940 const uint8_t *dst_ptr, |
| 941 int dst_pixels_per_line, | 941 int dst_pixels_per_line, |
| 942 unsigned int *sse, | 942 unsigned int *sse, |
| 943 const uint8_t *second_pred) { | 943 const uint8_t *second_pred) { |
| 944 uint16_t fdata3[5 * 8]; // Temp data bufffer used in filtering | 944 uint16_t fdata3[5 * 8]; // Temp data buffer used in filtering |
| 945 uint8_t temp2[20 * 16]; | 945 uint8_t temp2[20 * 16]; |
| 946 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 |
| 947 const int16_t *hfilter, *vfilter; | 947 const int16_t *hfilter, *vfilter; |
| 948 | 948 |
| 949 hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset); | 949 hfilter = BILINEAR_FILTERS_2TAP(xoffset); |
| 950 vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset); | 950 vfilter = BILINEAR_FILTERS_2TAP(yoffset); |
| 951 | 951 |
| 952 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, |
| 953 1, 9, 4, hfilter); | 953 1, 9, 4, hfilter); |
| 954 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); |
| 955 comp_avg_pred(temp3, second_pred, 4, 8, temp2, 4); | 955 comp_avg_pred(temp3, second_pred, 4, 8, temp2, 4); |
| 956 return vp9_variance4x8(temp3, 4, dst_ptr, dst_pixels_per_line, sse); | 956 return vp9_variance4x8(temp3, 4, dst_ptr, dst_pixels_per_line, sse); |
| 957 } | 957 } |
| OLD | NEW |