OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/vaapi_video_decode_accelerator.h" | 5 #include "media/gpu/vaapi_video_decode_accelerator.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 1716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1727 | 1727 |
1728 return new VaapiVP9Picture(va_surface); | 1728 return new VaapiVP9Picture(va_surface); |
1729 } | 1729 } |
1730 | 1730 |
1731 bool VaapiVideoDecodeAccelerator::VaapiVP9Accelerator::SubmitDecode( | 1731 bool VaapiVideoDecodeAccelerator::VaapiVP9Accelerator::SubmitDecode( |
1732 const scoped_refptr<VP9Picture>& pic, | 1732 const scoped_refptr<VP9Picture>& pic, |
1733 const Vp9SegmentationParams& seg, | 1733 const Vp9SegmentationParams& seg, |
1734 const Vp9LoopFilterParams& lf, | 1734 const Vp9LoopFilterParams& lf, |
1735 const std::vector<scoped_refptr<VP9Picture>>& ref_pictures, | 1735 const std::vector<scoped_refptr<VP9Picture>>& ref_pictures, |
1736 const base::Closure& done_cb) { | 1736 const base::Closure& done_cb) { |
1737 // TODO(posciak): We don't currently have the ability to know when the surface | 1737 // |done_cb| should be null as we return false from IsFrameContextRequired(). |
1738 // is decoded, as we submit both the decode job and output independently and | 1738 DCHECK(done_cb.is_null()); |
1739 // don't wait for just the decode to be finished, instead relying on the | |
1740 // driver to execute them in correct order. | |
1741 DCHECK(!done_cb.is_null()); | |
1742 | 1739 |
1743 VADecPictureParameterBufferVP9 pic_param; | 1740 VADecPictureParameterBufferVP9 pic_param; |
1744 memset(&pic_param, 0, sizeof(pic_param)); | 1741 memset(&pic_param, 0, sizeof(pic_param)); |
1745 | 1742 |
1746 const Vp9FrameHeader* frame_hdr = pic->frame_hdr.get(); | 1743 const Vp9FrameHeader* frame_hdr = pic->frame_hdr.get(); |
1747 DCHECK(frame_hdr); | 1744 DCHECK(frame_hdr); |
1748 | 1745 |
1749 if (frame_hdr->profile != 0) { | 1746 if (frame_hdr->profile != 0) { |
1750 DVLOG(1) << "Unsupported profile" << frame_hdr->profile; | 1747 DVLOG(1) << "Unsupported profile" << frame_hdr->profile; |
1751 return false; | 1748 return false; |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1883 return vaapi_pic->dec_surface(); | 1880 return vaapi_pic->dec_surface(); |
1884 } | 1881 } |
1885 | 1882 |
1886 // static | 1883 // static |
1887 VideoDecodeAccelerator::SupportedProfiles | 1884 VideoDecodeAccelerator::SupportedProfiles |
1888 VaapiVideoDecodeAccelerator::GetSupportedProfiles() { | 1885 VaapiVideoDecodeAccelerator::GetSupportedProfiles() { |
1889 return VaapiWrapper::GetSupportedDecodeProfiles(); | 1886 return VaapiWrapper::GetSupportedDecodeProfiles(); |
1890 } | 1887 } |
1891 | 1888 |
1892 } // namespace media | 1889 } // namespace media |
OLD | NEW |