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

Unified Diff: remoting/base/util.h

Issue 9568048: Allow the Chromoting client plugin to support up-scaling, albeit slowly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/base/decoder_vp8.cc ('k') | remoting/base/util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/base/util.h
diff --git a/remoting/base/util.h b/remoting/base/util.h
index 6049298173ae48fbb54ffadd142227c84854c83a..a628cb0d85a5ca713d74bb94cda9289d7f73761e 100644
--- a/remoting/base/util.h
+++ b/remoting/base/util.h
@@ -15,6 +15,14 @@ namespace remoting {
// Return a string that contains the current date formatted as 'MMDD/HHMMSS:'.
std::string GetTimestampString();
+// Calculate the offset of a specific pixel in an RGB32 buffer.
+int CalculateRGBOffset(int x, int y, int stride);
+
+// Calculate the offset of a specific pixel in a YV12/YUV420 buffer. Note that
+// the X and Y coordinates must both be even owing to the YV12 buffer layout.
+int CalculateYOffset(int x, int y, int stride);
+int CalculateUVOffset(int x, int y, int stride);
+
// Convert and scale YUV to RGB32 on a specific rectangle. The source and
// destination buffers are assumed to contain only |source_buffer_rect| and
// |dest_buffer_rect| areas correspondingly. The scaling factor is determined
« no previous file with comments | « remoting/base/decoder_vp8.cc ('k') | remoting/base/util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698