New issue
Advanced search Search tips

Issue 834649 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

video_VideoEncodeAccelerator.vp8.bvt failed at Kevin/Bob

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

Issue description

Version: 10569.0.0

FlushEncoderDone() checks the number of encoded frames are 1 frame more than number of the frame to encode. For example, we encode 40 frames but get 41 encoded frames.

https://cros-goldeneye.corp.google.com/chromeos/healthmonitoring/testDetails?testName=video_VideoEncodeAccelerator&suite=&daysBack=7&board=&architecture=&boardFamily=gru&buildConfig=&reason=&version=&milestone=&dut=&token=AIQH9qP-4VmoOYM_fxZ3j7mQB6vf%3A1524116279282
 
After checking the encoded video the last frame is broken. Also other V4L2 devices don't have this issue. I suspect the bug occurs at the driver of RK3399 VP8 encoder.

Comment 2 by tfiga@chromium.org, Apr 19 2018

I'd say it's more likely to be a problem with the rockchip libv4l plugin. The driver operates in 1:1 mode, so it always returns as many buffers as it has queued.
When flush is done, the rockchip vpu driver should return a zero-size EOS buffer. But I got a non-zero EOS buffer. So I guess the bug might be here.
This CL fixed the non-zero EOS buffer issue.
https://chromium-review.googlesource.com/#/c/chromiumos/third_party/kernel/+/1021004/

However, there are still some failed test cases related to change/force the bit rate. Here are the failed test cases:

- ForceBitrate/VideoEncodeAcceleratorTest.TestSimpleEncode/0
- MidStreamParamSwitchBitrate/VideoEncodeAcceleratorTest.TestSimpleEncode/0
- MultipleEncoders/VideoEncodeAcceleratorTest.TestSimpleEncode/1

Updated:

Seems it's not related to the bit rate. When I run TestSimpleEncode test case with "--num_frames_to_encode=300", it always return 293 frames only. So this failure only appears when verifying bit rate because we force to encode more frames.
https://cs.chromium.org/chromium/src/media/gpu/video_encode_accelerator_unittest.cc?l=694

The comment says one buffer might contain multiple frames. I think it's time to parse it because we would verify the frame number.

Comment 7 by tfiga@google.com, Apr 20 2018

I don't think it's physically possible to have multiple frames in one CAPTURE buffer in case of Rockchip encoder. The hardware always generates only the DCT part for one frame and driver injects a header, which plugin generated and passed through a control.
Correct the number in #5: In ForceBitrate test case we encode 500 frames but get 493 frames. 

Re #7, Yeah you're right. I checked the output file it only contains 493 frames. So there are 7 frames missing.

This is the command I ran:
$ ./video_encode_accelerator_unittest --test_stream_data=tulip2-1280x720-1b95123232922fe0067869c74e19cd09.yuv:1280:720:11:out1.vp8:200000:30:200000:30 --gtest_filter=ForceBitrate/VideoEncodeAcceleratorTest.TestSimpleEncode/0
I found why it failed, I set the wrong bit rate in #8. For 1280x720 we should set 1200000 instead of 200000.
Labels: Merge-Request-67
This failure is also occurs at R67, please approve to merge back.
Labels: -Pri-3 Pri-1
Project Member

Comment 12 by bugdroid1@chromium.org, Apr 23 2018

Labels: merge-merged-chromeos-4.4
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/ff7f229879ca1a0cd90dc1d5cfad8dc3e6c1bc67

commit ff7f229879ca1a0cd90dc1d5cfad8dc3e6c1bc67
Author: Chih-Yu Huang <akahuang@google.com>
Date: Mon Apr 23 08:36:51 2018

CHROMIUM: media: rockchip-vpu: Not assemble bitstream for EOS buffer.

We use zero-size buffer with EOS flag to indicate flush is done. We
should not assemble the bitstream for this buffer.

BUG= chromium:834649 
TEST=pass video_encode_accelerator_unittest
     SimpleEncode/VideoEncodeAcceleratorTest.TestSimpleEncode/0

Change-Id: I8cfcff6c0c41329d9b18327dba49a6c55978c8bd
Signed-off-by: Chih-Yu Huang <akahuang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1021004
Reviewed-by: Tomasz Figa <tfiga@chromium.org>

[modify] https://crrev.com/ff7f229879ca1a0cd90dc1d5cfad8dc3e6c1bc67/drivers/media/platform/rockchip-vpu/rockchip_vpu_enc.c

#9 and #12 seem inconsistent, like #12 is addressing something else.   Tested on Tot, etc.?

Comment 14 by hiroh@chromium.org, Apr 23 2018

#9 mentioned about the failure on #8. It was temporary akahuang@'s mistake.
#12 is a CL to fix test failure on M67 and M68. Could you approve the CL in #12?

Thanks
Status: Verified (was: Started)
The CL in #12 is landed at 10610.0.0, and the test went back to green. Please approve this CL, thanks.
Project Member

Comment 16 by sheriffbot@chromium.org, Apr 24 2018

Labels: -Merge-Request-67 Merge-Approved-67 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M67. Please go ahead and merge the CL to branch 3396 manually. Please contact milestone owner if you have questions.
Owners: cmasso@(Android), cmasso@(iOS), kbleicher@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 17 by bugdroid1@chromium.org, Apr 24 2018

Labels: merge-merged-release-R67-10575.B-chromeos-4.4
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/cf48060cc8a28aaff3f7e97860e360bb06978d0c

commit cf48060cc8a28aaff3f7e97860e360bb06978d0c
Author: Chih-Yu Huang <akahuang@google.com>
Date: Tue Apr 24 04:56:44 2018

CHROMIUM: media: rockchip-vpu: Not assemble bitstream for EOS buffer.

We use zero-size buffer with EOS flag to indicate flush is done. We
should not assemble the bitstream for this buffer.

BUG= chromium:834649 
TEST=pass video_encode_accelerator_unittest
     SimpleEncode/VideoEncodeAcceleratorTest.TestSimpleEncode/0

Change-Id: I8cfcff6c0c41329d9b18327dba49a6c55978c8bd
Signed-off-by: Chih-Yu Huang <akahuang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1021004
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
(cherry picked from commit ff7f229879ca1a0cd90dc1d5cfad8dc3e6c1bc67)
Reviewed-on: https://chromium-review.googlesource.com/1025152

[modify] https://crrev.com/cf48060cc8a28aaff3f7e97860e360bb06978d0c/drivers/media/platform/rockchip-vpu/rockchip_vpu_enc.c

Project Member

Comment 18 by sheriffbot@chromium.org, Apr 27 2018

This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible!

If all merges have been completed, please remove any remaining Merge-Approved labels from this issue.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 19 by sheriffbot@chromium.org, Apr 30 2018

This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible!

If all merges have been completed, please remove any remaining Merge-Approved labels from this issue.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Merge-Approved-67
Status: Fixed (was: Verified)
The fix landed to 67 branch few days ago. Removing Merge-Approved-67. Also, I believe this is "Fixed", not "Verified".

Sign in to add a comment