Commit 28c9dc67 authored by Alexandre Courbot's avatar Alexandre Courbot Committed by Commit Bot

Revert "media/gpu/v4l2svda: fix stateless API specification violation"

This reverts commit 91b0391f.

Reason for revert: 

Bug: chromium:968392
Test: Checked that video_VideoSeek.vp8.switchres passed on Kevin.

Original change's description:
> media/gpu/v4l2svda: fix stateless API specification violation
> 
> The stateless API states that resolution of frames should be set on the
> OUTPUT queue, and the coded resolution read back from the CAPTURE queue.
> However we were setting the resolution on the CAPTURE queue and
> expecting the ioctl to update it to the coded resolution.
> 
> This works with our current kernel drivers, but is not correct with
> respect to the stateless codec API specification. The kernel drivers
> have been updated to support the correct behavior, so carry that change
> into Chromium as well.
> 
> Bug: 948534
> Test: Checked that VDA unittest passes on Kevin and Minnie with kernel
> driver fixes.
> 
> Change-Id: I8f589f81ae1a7d8223235739f0748e58ac25e342
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1553124
> Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
> Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#659876}

TBR=tfiga@chromium.org,hiroh@chromium.org,acourbot@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 948534
Change-Id: I710af049273963ec34786633b0afb67736df2249
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1636992
Auto-Submit: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: default avatarHirokazu Honda <hiroh@chromium.org>
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Cr-Commit-Position: refs/heads/master@{#664676}
parent 9b066521
...@@ -508,28 +508,16 @@ bool V4L2SliceVideoDecodeAccelerator::CreateOutputBuffers() { ...@@ -508,28 +508,16 @@ bool V4L2SliceVideoDecodeAccelerator::CreateOutputBuffers() {
DCHECK_GT(num_pictures, 0u); DCHECK_GT(num_pictures, 0u);
DCHECK(!pic_size.IsEmpty()); DCHECK(!pic_size.IsEmpty());
// Set the frame size on the OUTPUT queue
struct v4l2_format format; struct v4l2_format format;
memset(&format, 0, sizeof(format)); memset(&format, 0, sizeof(format));
format.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
if (device_->Ioctl(VIDIOC_G_FMT, &format) != 0) { format.fmt.pix_mp.pixelformat = output_format_fourcc_;
VPLOGF(1) << "Failed getting format of output queue";
NOTIFY_ERROR(PLATFORM_FAILURE);
return false;
}
format.fmt.pix_mp.width = pic_size.width(); format.fmt.pix_mp.width = pic_size.width();
format.fmt.pix_mp.height = pic_size.height(); format.fmt.pix_mp.height = pic_size.height();
if (device_->Ioctl(VIDIOC_S_FMT, &format) != 0) { format.fmt.pix_mp.num_planes = output_planes_count_;
VPLOGF(1) << "Failed changing resolution of output queue";
NOTIFY_ERROR(PLATFORM_FAILURE);
return false;
}
// Get the coded size from the CAPTURE queue if (device_->Ioctl(VIDIOC_S_FMT, &format) != 0) {
memset(&format, 0, sizeof(format)); VPLOGF(1) << "Failed setting format to: " << output_format_fourcc_;
format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
if (device_->Ioctl(VIDIOC_G_FMT, &format) != 0) {
VPLOGF(1) << "Failed getting format of capture queue";
NOTIFY_ERROR(PLATFORM_FAILURE); NOTIFY_ERROR(PLATFORM_FAILURE);
return false; return false;
} }
......
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