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

Unified Diff: media/gpu/vaapi_video_decode_accelerator.cc

Issue 2229353002: V4L2SVDA: Add a VP9Accelerator implementation utilizing the V4L2 VP9 frame API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: compilation fixes Created 4 years, 4 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/gpu/v4l2_slice_video_decode_accelerator.cc ('k') | media/gpu/vp9_decoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/vaapi_video_decode_accelerator.cc
diff --git a/media/gpu/vaapi_video_decode_accelerator.cc b/media/gpu/vaapi_video_decode_accelerator.cc
index 5d4d866f85bf2367af8a8684b3e87c3b0ffda465..1d986fc826794efc63a40e6520c864d1a9d0cc0f 100644
--- a/media/gpu/vaapi_video_decode_accelerator.cc
+++ b/media/gpu/vaapi_video_decode_accelerator.cc
@@ -245,14 +245,19 @@ class VaapiVideoDecodeAccelerator::VaapiVP9Accelerator
// VP9Decoder::VP9Accelerator implementation.
scoped_refptr<VP9Picture> CreateVP9Picture() override;
- bool SubmitDecode(
- const scoped_refptr<VP9Picture>& pic,
- const Vp9SegmentationParams& seg,
- const Vp9LoopFilterParams& lf,
- const std::vector<scoped_refptr<VP9Picture>>& ref_pictures) override;
+ bool SubmitDecode(const scoped_refptr<VP9Picture>& pic,
+ const Vp9SegmentationParams& seg,
+ const Vp9LoopFilterParams& lf,
+ const std::vector<scoped_refptr<VP9Picture>>& ref_pictures,
+ const base::Closure& done_cb) override;
bool OutputPicture(const scoped_refptr<VP9Picture>& pic) override;
+ bool IsFrameContextRequired() const override { return false; }
+
+ bool GetFrameContext(const scoped_refptr<VP9Picture>& pic,
+ Vp9FrameContext* frame_ctx) override;
+
private:
scoped_refptr<VaapiDecodeSurface> VP9PictureToVaapiDecodeSurface(
const scoped_refptr<VP9Picture>& pic);
@@ -619,6 +624,12 @@ void VaapiVideoDecodeAccelerator::DecodeTask() {
break;
+ case AcceleratedVideoDecoder::kNeedContextUpdate:
+ // This should not happen as we return false from
+ // IsFrameContextRequired().
+ NOTREACHED() << "Context updates not supported";
+ return;
+
case AcceleratedVideoDecoder::kDecodeError:
RETURN_AND_NOTIFY_ON_FAILURE(false, "Error decoding stream",
PLATFORM_FAILURE, );
@@ -1719,7 +1730,14 @@ bool VaapiVideoDecodeAccelerator::VaapiVP9Accelerator::SubmitDecode(
const scoped_refptr<VP9Picture>& pic,
const Vp9SegmentationParams& seg,
const Vp9LoopFilterParams& lf,
- const std::vector<scoped_refptr<VP9Picture>>& ref_pictures) {
+ const std::vector<scoped_refptr<VP9Picture>>& ref_pictures,
+ const base::Closure& done_cb) {
+ // TODO(posciak): We don't currently have the ability to know when the surface
+ // is decoded, as we submit both the decode job and output independently and
+ // don't wait for just the decode to be finished, instead relying on the
+ // driver to execute them in correct order.
+ DCHECK(!done_cb.is_null());
+
VADecPictureParameterBufferVP9 pic_param;
memset(&pic_param, 0, sizeof(pic_param));
@@ -1848,6 +1866,13 @@ bool VaapiVideoDecodeAccelerator::VaapiVP9Accelerator::OutputPicture(
return true;
}
+bool VaapiVideoDecodeAccelerator::VaapiVP9Accelerator::GetFrameContext(
+ const scoped_refptr<VP9Picture>& pic,
+ Vp9FrameContext* frame_ctx) {
+ NOTIMPLEMENTED() << "Frame context update not supported";
+ return false;
+}
+
scoped_refptr<VaapiVideoDecodeAccelerator::VaapiDecodeSurface>
VaapiVideoDecodeAccelerator::VaapiVP9Accelerator::
VP9PictureToVaapiDecodeSurface(const scoped_refptr<VP9Picture>& pic) {
« no previous file with comments | « media/gpu/v4l2_slice_video_decode_accelerator.cc ('k') | media/gpu/vp9_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698