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

Unified Diff: media/filters/vpx_video_decoder.h

Issue 2096813002: media/vpx: Add support for VP9 alpha channel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add test files for real Created 4 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 | « media/base/video_frame.cc ('k') | media/filters/vpx_video_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/vpx_video_decoder.h
diff --git a/media/filters/vpx_video_decoder.h b/media/filters/vpx_video_decoder.h
index 5b0e5c03a6f4b10ec750c6d4bb36e6b8d9bb83f5..f3e341e64498fbf87e95b1bd47d17f83dd5bb7e1 100644
--- a/media/filters/vpx_video_decoder.h
+++ b/media/filters/vpx_video_decoder.h
@@ -55,6 +55,14 @@ class MEDIA_EXPORT VpxVideoDecoder : public VideoDecoder {
kError
};
+ // Return values for decoding alpha plane.
+ enum AlphaDecodeStatus {
+ kAlphaPlaneProcessed, // Alpha plane (if found) was decoded successfully.
+ kNoAlphaPlaneData, // Alpha plane was found, but decoder did not return any
+ // data.
+ kAlphaPlaneError // Fatal error occured when trying to decode alpha plane.
+ };
+
// Handles (re-)initializing the decoder with a (new) config.
// Returns true when initialization was successful.
bool ConfigureDecoder(const VideoDecoderConfig& config);
@@ -74,8 +82,14 @@ class MEDIA_EXPORT VpxVideoDecoder : public VideoDecoder {
scoped_refptr<VideoFrame>* video_frame);
bool CopyVpxImageToVideoFrame(const struct vpx_image* vpx_image,
+ const struct vpx_image* vpx_image_alpha,
scoped_refptr<VideoFrame>* video_frame);
+ AlphaDecodeStatus DecodeAlphaPlane(
+ const struct vpx_image* vpx_image,
+ const struct vpx_image** vpx_image_alpha,
+ const scoped_refptr<DecoderBuffer>& buffer);
+
base::ThreadChecker thread_checker_;
// |state_| must only be read and written to on |offload_task_runner_| if it
« no previous file with comments | « media/base/video_frame.cc ('k') | media/filters/vpx_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698