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

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

Issue 668403002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_aq_variance.c ('k') | source/libvpx/vp9/encoder/vp9_bitstream.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright (c) 2014 The WebM project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10 #include "vp9/common/vp9_common.h"
11 #include "vpx_ports/mem.h"
12
13 unsigned int vp9_avg_8x8_c(const uint8_t *s, int p) {
14 int i, j;
15 int sum = 0;
16 for (i = 0; i < 8; ++i, s+=p)
17 for (j = 0; j < 8; sum += s[j], ++j) {}
18
19 return (sum + 32) >> 6;
20 }
21
22 #if CONFIG_VP9_HIGHBITDEPTH
23 unsigned int vp9_highbd_avg_8x8_c(const uint8_t *s8, int p) {
24 int i, j;
25 int sum = 0;
26 const uint16_t* s = CONVERT_TO_SHORTPTR(s8);
27 for (i = 0; i < 8; ++i, s+=p)
28 for (j = 0; j < 8; sum += s[j], ++j) {}
29
30 return (sum + 32) >> 6;
31 }
32 #endif // CONFIG_VP9_HIGHBITDEPTH
33
OLDNEW
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_aq_variance.c ('k') | source/libvpx/vp9/encoder/vp9_bitstream.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698