| 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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 } | 291 } |
| 292 } | 292 } |
| 293 | 293 |
| 294 void highbd_variance(const uint8_t *a8, int a_stride, | 294 void highbd_variance(const uint8_t *a8, int a_stride, |
| 295 const uint8_t *b8, int b_stride, | 295 const uint8_t *b8, int b_stride, |
| 296 int w, int h, unsigned int *sse, | 296 int w, int h, unsigned int *sse, |
| 297 int *sum) { | 297 int *sum) { |
| 298 uint64_t sse_long = 0; | 298 uint64_t sse_long = 0; |
| 299 uint64_t sum_long = 0; | 299 uint64_t sum_long = 0; |
| 300 highbd_variance64(a8, a_stride, b8, b_stride, w, h, &sse_long, &sum_long); | 300 highbd_variance64(a8, a_stride, b8, b_stride, w, h, &sse_long, &sum_long); |
| 301 *sse = sse_long; | 301 *sse = (unsigned int)sse_long; |
| 302 *sum = sum_long; | 302 *sum = (int)sum_long; |
| 303 } | 303 } |
| 304 | 304 |
| 305 void highbd_10_variance(const uint8_t *a8, int a_stride, | 305 void highbd_10_variance(const uint8_t *a8, int a_stride, |
| 306 const uint8_t *b8, int b_stride, | 306 const uint8_t *b8, int b_stride, |
| 307 int w, int h, unsigned int *sse, | 307 int w, int h, unsigned int *sse, |
| 308 int *sum) { | 308 int *sum) { |
| 309 uint64_t sse_long = 0; | 309 uint64_t sse_long = 0; |
| 310 uint64_t sum_long = 0; | 310 uint64_t sum_long = 0; |
| 311 highbd_variance64(a8, a_stride, b8, b_stride, w, h, &sse_long, &sum_long); | 311 highbd_variance64(a8, a_stride, b8, b_stride, w, h, &sse_long, &sum_long); |
| 312 *sum = ROUND_POWER_OF_TWO(sum_long, 2); | 312 *sum = (int)ROUND_POWER_OF_TWO(sum_long, 2); |
| 313 *sse = ROUND_POWER_OF_TWO(sse_long, 4); | 313 *sse = (unsigned int)ROUND_POWER_OF_TWO(sse_long, 4); |
| 314 } | 314 } |
| 315 | 315 |
| 316 void highbd_12_variance(const uint8_t *a8, int a_stride, | 316 void highbd_12_variance(const uint8_t *a8, int a_stride, |
| 317 const uint8_t *b8, int b_stride, | 317 const uint8_t *b8, int b_stride, |
| 318 int w, int h, unsigned int *sse, | 318 int w, int h, unsigned int *sse, |
| 319 int *sum) { | 319 int *sum) { |
| 320 uint64_t sse_long = 0; | 320 uint64_t sse_long = 0; |
| 321 uint64_t sum_long = 0; | 321 uint64_t sum_long = 0; |
| 322 highbd_variance64(a8, a_stride, b8, b_stride, w, h, &sse_long, &sum_long); | 322 highbd_variance64(a8, a_stride, b8, b_stride, w, h, &sse_long, &sum_long); |
| 323 *sum = ROUND_POWER_OF_TWO(sum_long, 4); | 323 *sum = (int)ROUND_POWER_OF_TWO(sum_long, 4); |
| 324 *sse = ROUND_POWER_OF_TWO(sse_long, 8); | 324 *sse = (unsigned int)ROUND_POWER_OF_TWO(sse_long, 8); |
| 325 } | 325 } |
| 326 | 326 |
| 327 static void highbd_var_filter_block2d_bil_first_pass( | 327 static void highbd_var_filter_block2d_bil_first_pass( |
| 328 const uint8_t *src_ptr8, | 328 const uint8_t *src_ptr8, |
| 329 uint16_t *output_ptr, | 329 uint16_t *output_ptr, |
| 330 unsigned int src_pixels_per_line, | 330 unsigned int src_pixels_per_line, |
| 331 int pixel_step, | 331 int pixel_step, |
| 332 unsigned int output_height, | 332 unsigned int output_height, |
| 333 unsigned int output_width, | 333 unsigned int output_width, |
| 334 const int16_t *vp9_filter) { | 334 const int16_t *vp9_filter) { |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 for (j = 0; j < width; j++) { | 642 for (j = 0; j < width; j++) { |
| 643 const int tmp = pred[j] + ref[j]; | 643 const int tmp = pred[j] + ref[j]; |
| 644 comp_pred[j] = ROUND_POWER_OF_TWO(tmp, 1); | 644 comp_pred[j] = ROUND_POWER_OF_TWO(tmp, 1); |
| 645 } | 645 } |
| 646 comp_pred += width; | 646 comp_pred += width; |
| 647 pred += width; | 647 pred += width; |
| 648 ref += ref_stride; | 648 ref += ref_stride; |
| 649 } | 649 } |
| 650 } | 650 } |
| 651 #endif // CONFIG_VP9_HIGHBITDEPTH | 651 #endif // CONFIG_VP9_HIGHBITDEPTH |
| OLD | NEW |