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

Side by Side Diff: remoting/base/util.cc

Issue 4255001: Revert 64672 - Cleanups in the video encoding decoding code. Reenable VP8.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 1 month 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/base/util.h ('k') | remoting/client/chromoting_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/base/util.h" 5 #include "remoting/base/util.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace remoting { 9 namespace remoting {
10 10
11 int GetBytesPerPixel(PixelFormat format) { 11 int GetBytesPerPixel(PixelFormat format) {
12 // Note: The order is important here for performance. This is sorted from the 12 // Note: The order is important here for performance. This is sorted from the
13 // most common to the less common (PIXEL_FORMAT_ASCII is mostly used 13 // most common to the less common (PixelFormatAscii is mostly used
14 // just for testing). 14 // just for testing).
15 switch (format) { 15 switch (format) {
16 case PIXEL_FORMAT_RGB24: return 3; 16 case PixelFormatRgb24: return 3;
17 case PIXEL_FORMAT_RGB565: return 2; 17 case PixelFormatRgb565: return 2;
18 case PIXEL_FORMAT_RGB32: return 4; 18 case PixelFormatRgb32: return 4;
19 case PIXEL_FORMAT_ASCII: return 1; 19 case PixelFormatAscii: return 1;
20 default: 20 default:
21 NOTREACHED() << "Pixel format not supported"; 21 NOTREACHED() << "Pixel format not supported";
22 return 0; 22 return 0;
23 } 23 }
24 } 24 }
25 25
26 } // namespace remoting 26 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/base/util.h ('k') | remoting/client/chromoting_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698