diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-26 15:33:15 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-26 15:33:15 +0000 |
commit | 47379e92dad68b0bedd344be841248a6498f79e8 (patch) | |
tree | a43af9bf9735f1a38fcfcdbbfff933f4e87f5178 /remoting/base/decoder.h | |
parent | 376d1e164bdfde1ca048d1dac77028b7b8af531e (diff) | |
download | chromium_src-47379e92dad68b0bedd344be841248a6498f79e8.zip chromium_src-47379e92dad68b0bedd344be841248a6498f79e8.tar.gz chromium_src-47379e92dad68b0bedd344be841248a6498f79e8.tar.bz2 |
2. Implement scale-to-fit and clipping in DecoderVp8
Perform color space conversion and scaling in DecoderVp8 using fast SIMD routines. Also move clipping to DecoderVp8 to save more CPU cycles.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/7396005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94099 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/base/decoder.h')
-rw-r--r-- | remoting/base/decoder.h | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/remoting/base/decoder.h b/remoting/base/decoder.h index c82f242..a0a9244 100644 --- a/remoting/base/decoder.h +++ b/remoting/base/decoder.h @@ -37,9 +37,7 @@ class Decoder { Decoder() {} virtual ~Decoder() {} - // Initializes the decoder to draw into the given |frame|. The |clip| - // specifies the region to draw into. The clip region must fit inside - // the dimensions of frame. Failure to do so will CHECK fail. + // Initializes the decoder to draw into the given |frame|. virtual void Initialize(scoped_refptr<media::VideoFrame> frame) = 0; // Feeds more data into the decoder. @@ -59,6 +57,25 @@ class Decoder { virtual bool IsReadyForData() = 0; virtual VideoPacketFormat::Encoding Encoding() = 0; + + // Set the scale factors of the decoded output. If the decoder doesn't support + // scaling then this all is ignored. + // If both |horizontal_ratio| and |vertical_ratio| equal 1.0 then scaling is + // turned off. + virtual void SetScaleRatios(double horizontal_ratio, double vertical_ratio) {} + + // Set the clipping rectangle to the decoder. Decoder should respect this and + // only output changes in this rectangle. The new clipping rectangle will be + // effective on the next decoded video frame. + // + // When scaling is enabled clipping rectangles are ignored. + virtual void SetClipRect(const gfx::Rect& clip_rect) {} + + // Force decoder to output a video frame with content in |rects| using the + // last decoded video frame. + // + // Coordinates of rectangles supplied here are before scaling. + virtual void RefreshRects(const std::vector<gfx::Rect>& rects) {} }; } // namespace remoting |