OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 #include "./vp9_rtcd.h" |
10 #include "vp9/common/vp9_common.h" | 11 #include "vp9/common/vp9_common.h" |
11 #include "vpx_ports/mem.h" | 12 #include "vpx_ports/mem.h" |
12 | 13 |
13 unsigned int vp9_avg_8x8_c(const uint8_t *s, int p) { | 14 unsigned int vp9_avg_8x8_c(const uint8_t *s, int p) { |
14 int i, j; | 15 int i, j; |
15 int sum = 0; | 16 int sum = 0; |
16 for (i = 0; i < 8; ++i, s+=p) | 17 for (i = 0; i < 8; ++i, s+=p) |
17 for (j = 0; j < 8; sum += s[j], ++j) {} | 18 for (j = 0; j < 8; sum += s[j], ++j) {} |
18 | 19 |
19 return (sum + 32) >> 6; | 20 return (sum + 32) >> 6; |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 for (j = 0; j < 8; ++j) { | 202 for (j = 0; j < 8; ++j) { |
202 int diff = abs(s[j]-d[j]); | 203 int diff = abs(s[j]-d[j]); |
203 *min = diff < *min ? diff : *min; | 204 *min = diff < *min ? diff : *min; |
204 *max = diff > *max ? diff : *max; | 205 *max = diff > *max ? diff : *max; |
205 } | 206 } |
206 } | 207 } |
207 } | 208 } |
208 #endif // CONFIG_VP9_HIGHBITDEPTH | 209 #endif // CONFIG_VP9_HIGHBITDEPTH |
209 | 210 |
210 | 211 |
OLD | NEW |