Commit 4c4dd4d0 authored by Chih-Yu Huang's avatar Chih-Yu Huang Committed by Commit Bot

media/gpu/v4l2svda: Wait for ImageProcessor flushed before changing surface.

Originally when changing resolution, V4L2SVDA just abondoned the
surfaces at the image processor. This CL changes V4L2SVDA wait for
image processor flushed all surface before changing resolution.

Bug: b:143263138
Test: Run video_decode_accelerator_tests on kukui
Test: Pass CTS mentioned at issue on kukui
Change-Id: I5fb4dc164ba9b1d25a78694e706afdfd7d2acd6d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1888866
Commit-Queue: Chih-Yu Huang <akahuang@chromium.org>
Reviewed-by: default avatarHirokazu Honda <hiroh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#710713}
parent 797fdd54
......@@ -1187,6 +1187,10 @@ bool V4L2SliceVideoDecodeAccelerator::FinishSurfaceSetChange() {
if (!surfaces_at_device_.empty())
return false;
// Wait until all pending frames in image processor are processed.
if (image_processor_ && !surfaces_at_ip_.empty())
return false;
DCHECK_EQ(state_, kIdle);
DCHECK(decoder_display_queue_.empty());
// All output buffers should've been returned from decoder and device by now.
......@@ -1201,7 +1205,6 @@ bool V4L2SliceVideoDecodeAccelerator::FinishSurfaceSetChange() {
}
image_processor_ = nullptr;
surfaces_at_ip_ = {};
// Dequeued decoded surfaces may be pended in pending_picture_ready_ if they
// are waiting for some pictures to be cleared. We should post them right away
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment