Commit adaba6b8 authored by Alexandre Courbot's avatar Alexandre Courbot Committed by Commit Bot

media/gpu/v4l2vda: correctly specify egl format and size for imported output buffers

Imported output frames must have the EGL format and size, otherwise the
image processor will complain of the mismatch since crrev.com/c/1939078.

BUG=chromium:1030190
TEST=vdatests passing on Hana.

Change-Id: I75356aff8c4b0fefb0d60bdce6d4eda889cc25fe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1948372
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Chih-Yu Huang <akahuang@chromium.org>
Auto-Submit: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: default avatarChih-Yu Huang <akahuang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#720894}
parent eea9a67a
...@@ -689,15 +689,15 @@ void V4L2VideoDecodeAccelerator::ImportBufferForPictureTask( ...@@ -689,15 +689,15 @@ void V4L2VideoDecodeAccelerator::ImportBufferForPictureTask(
DCHECK(!iter->output_frame); DCHECK(!iter->output_frame);
auto layout = VideoFrameLayout::Create( auto layout = VideoFrameLayout::Create(
Fourcc::FromV4L2PixFmt(output_format_fourcc_).ToVideoPixelFormat(), Fourcc::FromV4L2PixFmt(egl_image_format_fourcc_).ToVideoPixelFormat(),
coded_size_); egl_image_size_);
if (!layout) { if (!layout) {
VLOGF(1) << "Cannot create layout!"; VLOGF(1) << "Cannot create layout!";
NOTIFY_ERROR(INVALID_ARGUMENT); NOTIFY_ERROR(INVALID_ARGUMENT);
return; return;
} }
iter->output_frame = VideoFrame::WrapExternalDmabufs( iter->output_frame = VideoFrame::WrapExternalDmabufs(
*layout, gfx::Rect(visible_size_), visible_size_, *layout, gfx::Rect(visible_size_), egl_image_size_,
DuplicateFDs(dmabuf_fds), base::TimeDelta()); DuplicateFDs(dmabuf_fds), base::TimeDelta());
} }
......
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