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

Side by Side Diff: remoting/host/differ_block.cc

Issue 2690003: Copy the (early prototype of) remoting in Chrome into the public tree.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 | Annotate | Revision Log
« no previous file with comments | « remoting/host/differ_block.h ('k') | remoting/host/differ_block_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "differ_block.h"
6
7 #include <stdlib.h>
8
9 namespace remoting {
10
11 // TODO(fbarchard): Use common header for block size.
12 int kBlockWidth = 32;
13 int kBlockHeight = 32;
14 int kBytesPerPixel = 3;
15
16 int BlockDifference(const uint8* image1, const uint8* image2, int stride) {
17 int diff = 0;
18 for (int y = 0; y < kBlockHeight; ++y) {
19 for (int x = 0; x < kBlockWidth * kBytesPerPixel; ++x) {
20 diff += abs(image1[x] - image2[x]);
21 }
22 image1 += stride;
23 image2 += stride;
24 }
25 return diff;
26 }
27
28 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/differ_block.h ('k') | remoting/host/differ_block_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698