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

Side by Side Diff: media/gpu/android_video_decode_accelerator.cc

Issue 2392343007: Revert of Attach color space information to hardware decoded NV12 video frames. (patchset #11 id:20… (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « media/filters/h264_parser.cc ('k') | media/gpu/dxva_picture_buffer_win.h » ('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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #include "media/gpu/android_video_decode_accelerator.h" 5 #include "media/gpu/android_video_decode_accelerator.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 return; 821 return;
822 } 822 }
823 823
824 PictureBuffer& picture_buffer = it->second; 824 PictureBuffer& picture_buffer = it->second;
825 const bool size_changed = picture_buffer.size() != size_; 825 const bool size_changed = picture_buffer.size() != size_;
826 if (size_changed) 826 if (size_changed)
827 picture_buffer.set_size(size_); 827 picture_buffer.set_size(size_);
828 828
829 const bool allow_overlay = picture_buffer_manager_.ArePicturesOverlayable(); 829 const bool allow_overlay = picture_buffer_manager_.ArePicturesOverlayable();
830 UMA_HISTOGRAM_BOOLEAN("Media.AVDA.FrameSentAsOverlay", allow_overlay); 830 UMA_HISTOGRAM_BOOLEAN("Media.AVDA.FrameSentAsOverlay", allow_overlay);
831 // TODO(hubbe): Insert the correct color space. http://crbug.com/647725
832 Picture picture(picture_buffer_id, bitstream_id, gfx::Rect(size_), 831 Picture picture(picture_buffer_id, bitstream_id, gfx::Rect(size_),
833 gfx::ColorSpace(), allow_overlay); 832 allow_overlay);
834 picture.set_size_changed(size_changed); 833 picture.set_size_changed(size_changed);
835 834
836 // Notify picture ready before calling UseCodecBufferForPictureBuffer() since 835 // Notify picture ready before calling UseCodecBufferForPictureBuffer() since
837 // that process may be slow and shouldn't delay delivery of the frame to the 836 // that process may be slow and shouldn't delay delivery of the frame to the
838 // renderer. The picture is only used on the same thread as this method is 837 // renderer. The picture is only used on the same thread as this method is
839 // called, so it is safe to do this. 838 // called, so it is safe to do this.
840 NotifyPictureReady(picture); 839 NotifyPictureReady(picture);
841 840
842 // Connect the PictureBuffer to the decoded frame. 841 // Connect the PictureBuffer to the decoded frame.
843 picture_buffer_manager_.UseCodecBufferForPictureBuffer(codec_buffer_index, 842 picture_buffer_manager_.UseCodecBufferForPictureBuffer(codec_buffer_index,
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
1588 1587
1589 bool AndroidVideoDecodeAccelerator::IsMediaCodecSoftwareDecodingForbidden() 1588 bool AndroidVideoDecodeAccelerator::IsMediaCodecSoftwareDecodingForbidden()
1590 const { 1589 const {
1591 // Prevent MediaCodec from using its internal software decoders when we have 1590 // Prevent MediaCodec from using its internal software decoders when we have
1592 // more secure and up to date versions in the renderer process. 1591 // more secure and up to date versions in the renderer process.
1593 return !config_.is_encrypted && (codec_config_->codec_ == kCodecVP8 || 1592 return !config_.is_encrypted && (codec_config_->codec_ == kCodecVP8 ||
1594 codec_config_->codec_ == kCodecVP9); 1593 codec_config_->codec_ == kCodecVP9);
1595 } 1594 }
1596 1595
1597 } // namespace media 1596 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/h264_parser.cc ('k') | media/gpu/dxva_picture_buffer_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698