summaryrefslogtreecommitdiffstats
path: root/media/base/video_util.cc
diff options
context:
space:
mode:
authorvigneshv@chromium.org <vigneshv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-19 23:43:32 +0000
committervigneshv@chromium.org <vigneshv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-19 23:43:32 +0000
commit6ac955b41814da1eebf56244a147f3fad00f5aa7 (patch)
tree9671f7731055aa027d63e56290722d7ec012756f /media/base/video_util.cc
parente69198bfdb89c4658a023c05c4929e9617ac2828 (diff)
downloadchromium_src-6ac955b41814da1eebf56244a147f3fad00f5aa7.zip
chromium_src-6ac955b41814da1eebf56244a147f3fad00f5aa7.tar.gz
chromium_src-6ac955b41814da1eebf56244a147f3fad00f5aa7.tar.bz2
media: Add support for playback of VP8 Alpha video streams
BUG=147355 TEST=VP8 Alpha video streams play TBR=sky Review URL: https://chromiumcodereview.appspot.com/13886011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195339 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/video_util.cc')
-rw-r--r--media/base/video_util.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/media/base/video_util.cc b/media/base/video_util.cc
index 972ac17..e1de7bd 100644
--- a/media/base/video_util.cc
+++ b/media/base/video_util.cc
@@ -62,6 +62,16 @@ void CopyVPlane(const uint8* source, int stride, int rows, VideoFrame* frame) {
CopyPlane(VideoFrame::kVPlane, source, stride, rows, frame);
}
+void CopyAPlane(const uint8* source, int stride, int rows, VideoFrame* frame) {
+ CopyPlane(VideoFrame::kAPlane, source, stride, rows, frame);
+}
+
+void MakeOpaqueAPlane(int stride, int rows, VideoFrame* frame) {
+ int rows_to_clear = std::min(frame->rows(VideoFrame::kAPlane), rows);
+ memset(frame->data(VideoFrame::kAPlane), 255,
+ frame->stride(VideoFrame::kAPlane) * rows_to_clear);
+}
+
void FillYUV(VideoFrame* frame, uint8 y, uint8 u, uint8 v) {
// Fill the Y plane.
uint8* y_plane = frame->data(VideoFrame::kYPlane);