New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 830327 link

Starred by 0 users

Issue metadata

Status: Assigned
Owner:
User never visited
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Fix video encoder drain implementation of mtk-vcodec on MTK8173 platform

Project Member Reported by akahuang@chromium.org, Apr 9 2018

Issue description

In  issue 820313 , we check the flush function in VEA unittest. But currently mtk-vcodec encoder doesn't support flush correctly. We should implement the flush and remove the boards from the blacklist of flush at:

chromiumos/src/third_party/autotest/files/client/site_tests/video_VideoEncodeAccelerator/video_VideoEncodeAccelerator.py "has_broken_flush" method.

 

Comment 1 by tfiga@chromium.org, Apr 9 2018

Components: OS>Kernel>Video
Labels: OS-Chrome

Comment 2 by tfiga@chromium.org, May 10 2018

Labels: media-kernel-backlog
Labels: media-kernel-good-first-bug
Aka, are you working on this? If not, we should make it Available, for anyone interested to be able to pick it.
Labels: media-kernel-fbuergisser
Owner: ----
Status: Available (was: Untriaged)
Owner: fbuergisser@chromium.org
Status: Assigned (was: Available)
Summary: Fix video encoder drain implementation of mtk-vcodec on MTK8173 platform (was: Fix video encoder flush implementation of mtk-vcodec on MTK8173 platform)
Assigning to Francois, who kindly offered to help with this.

Some hints on how to proceed with this:

The drain sequence is documented in the memory-to-memory statful encoder specification:
https://hverkuil.home.xs4all.nl/request-api/uapi/v4l/dev-encoder.html#drain

There is also a bit more condensed form in the general description of the VIDIOC_ENCODER_CMD ioctl:
https://hverkuil.home.xs4all.nl/request-api/uapi/v4l/vidioc-encoder-cmd.html#c.VIDIOC_TRY_ENCODER_CMD

The Rockchip VPU driver is currently implementing the sequence relatively close to the specification:
https://chromium.googlesource.com/chromiumos/third_party/kernel/+/ed8d49d095e6a87b7fd2b5d346031c2b5b86efbe/drivers/media/platform/rockchip-vpu/rockchip_vpu_enc.c#1077

It still has some differences in few corner cases, since it was implemented for the earlier version of the specification:
 - doesn't restart decoding when CAPTURE queue streaming is restarted,
 - returns -EINVAL on V4L2_ENC_CMD_START, if the OUTPUT queue is not streaming - it's currently an undocumented case, so we can ignore it for now.
These shouldn't affect the video_encode_accelerator_unittest results.

For reference, the CL that added the implementation for this driver:
https://chromium.googlesource.com/chromiumos/third_party/kernel/+/cc6b4e8c5741666a247af3bf3faae0c7d0017981%5E%21/

There is also a brand new document on how to run the video "unit" tests:
https://chromium.googlesource.com/chromium/src/+/HEAD/docs/media/gpu/vdatest_usage.md

Note that the test currently skips the flush testing on drivers which don't implement the VIDIOC_TRY_ENCODER_CMD ioctl: https://cs.chromium.org/chromium/src/media/gpu/v4l2/v4l2_video_encode_accelerator.cc?rcl=a007ecdfe31c796dca77305da540e5a1b71add23&l=185.
You should be able to see a log message in such case.

Sign in to add a comment