[go: nahoru, domu]

Reland "v4l2_SVDA, Vaapi_VDA: Support VP9 show_existing_frame feature.""

This reverts commit e90cd145dd6709ae07f8ac43b29072c01a49d435.

In gpu_video_decoder, |available_pictures_| tracks the number of
picture buffers which are not sent to display.
In DimissPictureBuffer(), we should not decrease the value if the
buffer also at display.

|available_pictures_| is only used at CanReadWithoutStalling() method,
and no one will call this method from GpuVideoDecoder, so we calculate
the value instead of tracking the value to reduce the code complexity.

BUG=755887
BUG=890629
BUG=892514
TEST=Play some videos at Youtube and check Chrome doesn't crash
TEST=pass video_YouTubeHTML5, video_ChromeVidResChangeHWDecode,
          video_VideoDecodeMemoryUsage, video_VideoSeek autotest

Original change's description:
> v4l2_SVDA, Vaapi_VDA: Support VP9 show_existing_frame feature.
>
> For VP9 video, when the flag "show_existing_frame" is set, the
decoder
> should output the specified reference picture which is decoded
> previously. Originally V4L2 slice VDA and Vaapi VDA didn't handle
this
> situation that the reference picture is sent to client but not
> returned back.
> This CL supports this feature at these two VDA. If the reference
picture
> is sent to client side, then VDA just sends it directly.
>
> BUG=755887
> TEST=./video_decode_accelerator_unittest --ozone-platform=gbm
>
--test_video_data=vp90_2_10_show_existing_frame2.vp9.ivf:352:288:16:16:35:150:12
>      on Kevin and Eve device.
> TEST=Run AppRTC on Scarlet successfully
> TEST=Pass media:media_unittests

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I3db1f5b650a5dec67bf46d439a6eeb4a2f3d995a
Reviewed-on: https://chromium-review.googlesource.com/c/1258787
Commit-Queue: Chih-Yu Huang <akahuang@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Pawel Osciak <posciak@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Dan Sanders <sandersd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601861}
19 files changed