| 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 #ifndef VP9_ENCODER_VP9_VARIANCE_H_ | 11 #ifndef VP9_ENCODER_VP9_VARIANCE_H_ |
| 12 #define VP9_ENCODER_VP9_VARIANCE_H_ | 12 #define VP9_ENCODER_VP9_VARIANCE_H_ |
| 13 | 13 |
| 14 #include "vpx/vpx_integer.h" | 14 #include "vpx/vpx_integer.h" |
| 15 // #include "./vpx_config.h" | 15 // #include "./vpx_config.h" |
| 16 | 16 |
| 17 void variance(const uint8_t *src_ptr, |
| 18 int source_stride, |
| 19 const uint8_t *ref_ptr, |
| 20 int recon_stride, |
| 21 int w, |
| 22 int h, |
| 23 unsigned int *sse, |
| 24 int *sum); |
| 25 |
| 17 typedef unsigned int(*vp9_sad_fn_t)(const uint8_t *src_ptr, | 26 typedef unsigned int(*vp9_sad_fn_t)(const uint8_t *src_ptr, |
| 18 int source_stride, | 27 int source_stride, |
| 19 const uint8_t *ref_ptr, | 28 const uint8_t *ref_ptr, |
| 20 int ref_stride, | 29 int ref_stride, |
| 21 unsigned int max_sad); | 30 unsigned int max_sad); |
| 22 | 31 |
| 23 typedef unsigned int(*vp9_sad_avg_fn_t)(const uint8_t *src_ptr, | 32 typedef unsigned int(*vp9_sad_avg_fn_t)(const uint8_t *src_ptr, |
| 24 int source_stride, | 33 int source_stride, |
| 25 const uint8_t *ref_ptr, | 34 const uint8_t *ref_ptr, |
| 26 int ref_stride, | 35 int ref_stride, |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 69 |
| 61 typedef unsigned int (*vp9_subp_avg_variance_fn_t)(const uint8_t *src_ptr, | 70 typedef unsigned int (*vp9_subp_avg_variance_fn_t)(const uint8_t *src_ptr, |
| 62 int source_stride, | 71 int source_stride, |
| 63 int xoffset, | 72 int xoffset, |
| 64 int yoffset, | 73 int yoffset, |
| 65 const uint8_t *ref_ptr, | 74 const uint8_t *ref_ptr, |
| 66 int Refstride, | 75 int Refstride, |
| 67 unsigned int *sse, | 76 unsigned int *sse, |
| 68 const uint8_t *second_pred); | 77 const uint8_t *second_pred); |
| 69 | 78 |
| 70 typedef void (*vp9_ssimpf_fn_t)(uint8_t *s, int sp, uint8_t *r, | |
| 71 int rp, unsigned long *sum_s, | |
| 72 unsigned long *sum_r, unsigned long *sum_sq_s, | |
| 73 unsigned long *sum_sq_r, | |
| 74 unsigned long *sum_sxr); | |
| 75 | |
| 76 typedef unsigned int (*vp9_getmbss_fn_t)(const short *); | 79 typedef unsigned int (*vp9_getmbss_fn_t)(const short *); |
| 77 | 80 |
| 78 typedef unsigned int (*vp9_get16x16prederror_fn_t)(const uint8_t *src_ptr, | 81 typedef unsigned int (*vp9_get16x16prederror_fn_t)(const uint8_t *src_ptr, |
| 79 int source_stride, | 82 int source_stride, |
| 80 const uint8_t *ref_ptr, | 83 const uint8_t *ref_ptr, |
| 81 int ref_stride); | 84 int ref_stride); |
| 82 | 85 |
| 83 typedef struct vp9_variance_vtable { | 86 typedef struct vp9_variance_vtable { |
| 84 vp9_sad_fn_t sdf; | 87 vp9_sad_fn_t sdf; |
| 85 vp9_sad_avg_fn_t sdaf; | 88 vp9_sad_avg_fn_t sdaf; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 103 int tmp; | 106 int tmp; |
| 104 tmp = pred[j] + ref[j]; | 107 tmp = pred[j] + ref[j]; |
| 105 comp_pred[j] = (tmp + 1) >> 1; | 108 comp_pred[j] = (tmp + 1) >> 1; |
| 106 } | 109 } |
| 107 comp_pred += width; | 110 comp_pred += width; |
| 108 pred += width; | 111 pred += width; |
| 109 ref += ref_stride; | 112 ref += ref_stride; |
| 110 } | 113 } |
| 111 } | 114 } |
| 112 #endif // VP9_ENCODER_VP9_VARIANCE_H_ | 115 #endif // VP9_ENCODER_VP9_VARIANCE_H_ |
| OLD | NEW |