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

Side by Side Diff: media/base/video_util.h

Issue 388363002: Use SkSrc_Mode in SkCanvasVideoRenderer, to prevent transparent video frames from blending with reu… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: static_cast<SkColor> instead of (unsigned int) Created 6 years, 5 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 | « media/base/video_frame.cc ('k') | media/base/video_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 MEDIA_BASE_VIDEO_UTIL_H_ 5 #ifndef MEDIA_BASE_VIDEO_UTIL_H_
6 #define MEDIA_BASE_VIDEO_UTIL_H_ 6 #define MEDIA_BASE_VIDEO_UTIL_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "media/base/media_export.h" 9 #include "media/base/media_export.h"
10 #include "ui/gfx/rect.h" 10 #include "ui/gfx/rect.h"
(...skipping 26 matching lines...) Expand all
37 37
38 // |plane| is one of VideoFrame::kYPlane, VideoFrame::kUPlane, 38 // |plane| is one of VideoFrame::kYPlane, VideoFrame::kUPlane,
39 // VideoFrame::kVPlane or VideoFrame::kAPlane 39 // VideoFrame::kVPlane or VideoFrame::kAPlane
40 MEDIA_EXPORT void CopyPlane(size_t plane, const uint8* source, int stride, 40 MEDIA_EXPORT void CopyPlane(size_t plane, const uint8* source, int stride,
41 int rows, VideoFrame* frame); 41 int rows, VideoFrame* frame);
42 42
43 43
44 // Fills |frame| containing YUV data to the given color values. 44 // Fills |frame| containing YUV data to the given color values.
45 MEDIA_EXPORT void FillYUV(VideoFrame* frame, uint8 y, uint8 u, uint8 v); 45 MEDIA_EXPORT void FillYUV(VideoFrame* frame, uint8 y, uint8 u, uint8 v);
46 46
47 // Fills |frame| containing YUVA data with the given color values.
48 MEDIA_EXPORT void FillYUVA(VideoFrame* frame,
49 uint8 y,
50 uint8 u,
51 uint8 v,
52 uint8 a);
53
47 // Creates a border in |frame| such that all pixels outside of 54 // Creates a border in |frame| such that all pixels outside of
48 // |view_area| are black. The size and position of |view_area| 55 // |view_area| are black. The size and position of |view_area|
49 // must be even to align correctly with the color planes. 56 // must be even to align correctly with the color planes.
50 // Only YV12 format video frames are currently supported. 57 // Only YV12 format video frames are currently supported.
51 MEDIA_EXPORT void LetterboxYUV(VideoFrame* frame, 58 MEDIA_EXPORT void LetterboxYUV(VideoFrame* frame,
52 const gfx::Rect& view_area); 59 const gfx::Rect& view_area);
53 60
54 // Rotates |src| plane by |rotation| degree with possible flipping vertically 61 // Rotates |src| plane by |rotation| degree with possible flipping vertically
55 // and horizontally. 62 // and horizontally.
56 // |rotation| is limited to {0, 90, 180, 270}. 63 // |rotation| is limited to {0, 90, 180, 270}.
(...skipping 23 matching lines...) Expand all
80 // Copy an RGB bitmap into the specified |region_in_frame| of a YUV video frame. 87 // Copy an RGB bitmap into the specified |region_in_frame| of a YUV video frame.
81 // Fills the regions outside |region_in_frame| with black. 88 // Fills the regions outside |region_in_frame| with black.
82 MEDIA_EXPORT void CopyRGBToVideoFrame(const uint8* source, 89 MEDIA_EXPORT void CopyRGBToVideoFrame(const uint8* source,
83 int stride, 90 int stride,
84 const gfx::Rect& region_in_frame, 91 const gfx::Rect& region_in_frame,
85 VideoFrame* frame); 92 VideoFrame* frame);
86 93
87 } // namespace media 94 } // namespace media
88 95
89 #endif // MEDIA_BASE_VIDEO_UTIL_H_ 96 #endif // MEDIA_BASE_VIDEO_UTIL_H_
OLDNEW
« no previous file with comments | « media/base/video_frame.cc ('k') | media/base/video_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698