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

Unified Diff: media/filters/vpx_video_decoder.h

Issue 1561703002: media/vpx: Add support for VP9 alpha channel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move alpha decoding to its own function Created 4 years, 11 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
Index: media/filters/vpx_video_decoder.h
diff --git a/media/filters/vpx_video_decoder.h b/media/filters/vpx_video_decoder.h
index c900017184ba491ff69173bdb4a99f8a320098a4..3490ff746b177ca5d88a0519ffacd82e8506b65f 100644
--- a/media/filters/vpx_video_decoder.h
+++ b/media/filters/vpx_video_decoder.h
@@ -55,6 +55,9 @@ class MEDIA_EXPORT VpxVideoDecoder : public VideoDecoder {
kError
};
+ // Return values for decoding alpha plane.
+ enum AlphaDecodeStatus { kOk, kNoAlphaPlaneData, kError };
+
// Handles (re-)initializing the decoder with a (new) config.
// Returns true when initialization was successful.
bool ConfigureDecoder(const VideoDecoderConfig& config);
@@ -68,8 +71,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_;
DecoderState state_;

Powered by Google App Engine
This is Rietveld 408576698