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

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: 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
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..7e40db6119651efffe4baf04418fe42812220d2f 100644
--- a/media/gpu/vaapi_video_decode_accelerator.cc
+++ b/media/gpu/vaapi_video_decode_accelerator.cc
@@ -249,10 +249,16 @@ class VaapiVideoDecodeAccelerator::VaapiVP9Accelerator
const scoped_refptr<VP9Picture>& pic,
const Vp9SegmentationParams& seg,
const Vp9LoopFilterParams& lf,
- const std::vector<scoped_refptr<VP9Picture>>& ref_pictures) override;
+ const std::vector<scoped_refptr<VP9Picture>>& ref_pictures,
+ const base::Closure& done_cb) override;
bool OutputPicture(const scoped_refptr<VP9Picture>& pic) override;
+ bool RequiresFrameContext() 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 +625,11 @@ void VaapiVideoDecodeAccelerator::DecodeTask() {
break;
+ case AcceleratedVideoDecoder::kNeedContextUpdate:
+ // This should not happen as we return false from RequiresFrameContext.
+ 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) {

Powered by Google App Engine
This is Rietveld 408576698