Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Side by Side Diff: source/libvpx/vp9/encoder/vp9_avg.c

Issue 1162573005: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_aq_variance.c ('k') | source/libvpx/vp9/encoder/vp9_dct.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_aq_variance.c ('k') | source/libvpx/vp9/encoder/vp9_dct.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698