Index: media/filters/vpx_video_decoder.cc |
diff --git a/media/filters/vpx_video_decoder.cc b/media/filters/vpx_video_decoder.cc |
index 40814bb273ad5a3f5cc18e96ea9172f9fd4e929b..65d9742af10ea2bf75b2ece03d319eb1e8a112bd 100644 |
--- a/media/filters/vpx_video_decoder.cc |
+++ b/media/filters/vpx_video_decoder.cc |
@@ -380,11 +380,11 @@ bool VpxVideoDecoder::ConfigureDecoder(const VideoDecoderConfig& config) { |
return false; |
// These are the combinations of codec-pixel format supported in principle. |
- // Note that VP9 does not support Alpha in the current implementation. |
DCHECK( |
(config.codec() == kCodecVP8 && config.format() == PIXEL_FORMAT_YV12) || |
(config.codec() == kCodecVP8 && config.format() == PIXEL_FORMAT_YV12A) || |
(config.codec() == kCodecVP9 && config.format() == PIXEL_FORMAT_YV12) || |
+ (config.codec() == kCodecVP9 && config.format() == PIXEL_FORMAT_YV12A) || |
(config.codec() == kCodecVP9 && config.format() == PIXEL_FORMAT_YV24)); |
#if !defined(DISABLE_FFMPEG_VIDEO_DECODERS) |
@@ -400,9 +400,10 @@ bool VpxVideoDecoder::ConfigureDecoder(const VideoDecoderConfig& config) { |
if (!vpx_codec_) |
return false; |
- // Configure VP9 to decode on our buffers to skip a data copy on decoding. |
- if (config.codec() == kCodecVP9) { |
- DCHECK_NE(PIXEL_FORMAT_YV12A, config.format()); |
+ // Configure non-YV12A VP9 to decode on our buffers to skip a data copy on |
DaleCurtis
2016/01/05 21:22:21
I guess we can't copy into one of the buffers sinc
vignesh
2016/01/06 00:07:49
The thing is that the Y, U and V planes come from
DaleCurtis
2016/01/06 00:18:02
Hmm, could you over allocate the first buffer and
vignesh
2016/01/08 17:53:40
Good point, i will try it out and update the CL.
vignesh
2016/01/08 19:21:33
ok, i looked into this and i'm a little confused.
DaleCurtis
2016/01/08 19:29:03
Yes, you'd need to add a WrapExternalYUVA method a
|
+ // decoding. We do not use our buffers for YV12A VP9 since it involves two |
+ // different instances of the decoder. |
+ if (config.codec() == kCodecVP9 && config.format() != PIXEL_FORMAT_YV12A) { |
DCHECK(vpx_codec_get_caps(vpx_codec_->iface) & |
VPX_CODEC_CAP_EXTERNAL_FRAME_BUFFER); |
@@ -581,7 +582,7 @@ bool VpxVideoDecoder::CopyVpxImageToVideoFrame( |
if (memory_pool_.get()) { |
DCHECK_EQ(kCodecVP9, config_.codec()); |
- DCHECK(!vpx_codec_alpha_) << "Uh-oh, VP9 and Alpha shouldn't coexist."; |
+ DCHECK(!vpx_codec_alpha_); |
*video_frame = VideoFrame::WrapExternalYuvData( |
codec_format, |
coded_size, gfx::Rect(visible_size), config_.natural_size(), |