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

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

Issue 261753013: Implement VP9/I444 encode support in the Chromoting host. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix CreateVP9Codec bug and unit-test build. Created 6 years, 7 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 | « no previous file | remoting/base/util.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef REMOTING_BASE_UTIL_H_ 5 #ifndef REMOTING_BASE_UTIL_H_
6 #define REMOTING_BASE_UTIL_H_ 6 #define REMOTING_BASE_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "media/base/video_frame.h" 10 #include "media/base/video_frame.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 int source_ystride, 43 int source_ystride,
44 int source_uvstride, 44 int source_uvstride,
45 const webrtc::DesktopSize& source_size, 45 const webrtc::DesktopSize& source_size,
46 const webrtc::DesktopRect& source_buffer_rect, 46 const webrtc::DesktopRect& source_buffer_rect,
47 uint8* dest_buffer, 47 uint8* dest_buffer,
48 int dest_stride, 48 int dest_stride,
49 const webrtc::DesktopSize& dest_size, 49 const webrtc::DesktopSize& dest_size,
50 const webrtc::DesktopRect& dest_buffer_rect, 50 const webrtc::DesktopRect& dest_buffer_rect,
51 const webrtc::DesktopRect& dest_rect); 51 const webrtc::DesktopRect& dest_rect);
52 52
53 // Convert RGB32 to YUV on a specific rectangle.
54 void ConvertRGB32ToYUVWithRect(const uint8* rgb_plane,
55 uint8* y_plane,
56 uint8* u_plane,
57 uint8* v_plane,
58 int x,
59 int y,
60 int width,
61 int height,
62 int rgb_stride,
63 int y_stride,
64 int uv_stride);
65
66 int RoundToTwosMultiple(int x); 53 int RoundToTwosMultiple(int x);
67 54
68 // Align the sides of the rectangle to multiples of 2 (expanding outwards). 55 // Align the sides of the rectangle to multiples of 2 (expanding outwards).
69 webrtc::DesktopRect AlignRect(const webrtc::DesktopRect& rect); 56 webrtc::DesktopRect AlignRect(const webrtc::DesktopRect& rect);
70 57
71 // Scales the supplied rectangle from |in_size| coordinates to |out_size|. 58 // Scales the supplied rectangle from |in_size| coordinates to |out_size|.
72 // If the result has non-integer coordinates then the smallest integer- 59 // If the result has non-integer coordinates then the smallest integer-
73 // coordinate rectangle that wholly encloses it is returned. 60 // coordinate rectangle that wholly encloses it is returned.
74 webrtc::DesktopRect ScaleRect(const webrtc::DesktopRect& rect, 61 webrtc::DesktopRect ScaleRect(const webrtc::DesktopRect& rect,
75 const webrtc::DesktopSize& in_size, 62 const webrtc::DesktopSize& in_size,
(...skipping 16 matching lines...) Expand all
92 79
93 // Checks if the given string is a valid UTF-8 string. 80 // Checks if the given string is a valid UTF-8 string.
94 bool StringIsUtf8(const char* data, size_t length); 81 bool StringIsUtf8(const char* data, size_t length);
95 82
96 bool DoesRectContain(const webrtc::DesktopRect& a, 83 bool DoesRectContain(const webrtc::DesktopRect& a,
97 const webrtc::DesktopRect& b); 84 const webrtc::DesktopRect& b);
98 85
99 } // namespace remoting 86 } // namespace remoting
100 87
101 #endif // REMOTING_BASE_UTIL_H_ 88 #endif // REMOTING_BASE_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/base/util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698