Commit f1abe1e0 authored by Hirokazu Honda's avatar Hirokazu Honda Committed by Commit Bot

media/gpu/V4L2VEA: Fix wrong V4L2PixFmtToVideoPixelFormat call on V4L2VEA

V4L2VEA wrongly calls V4L2Device::V4L2PixFmtToVideoPixelFormat to
VideoPixelFormat in VideoFrameLayout::Create. Just pass the VideoPixelFormat
without calling.

BUG=chromium:907132
TEST=VEA unittest on peach_pit

Change-Id: I3800cc81403a19e7521f724f972f63e937f0873b
Reviewed-on: https://chromium-review.googlesource.com/c/1345700Reviewed-by: default avatarPawel Osciak <posciak@chromium.org>
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609936}
parent b1b8cec6
...@@ -210,16 +210,14 @@ bool V4L2VideoEncodeAccelerator::Initialize(const Config& config, ...@@ -210,16 +210,14 @@ bool V4L2VideoEncodeAccelerator::Initialize(const Config& config,
return false; return false;
} }
auto input_layout = VideoFrameLayout::Create( auto input_layout =
V4L2Device::V4L2PixFmtToVideoPixelFormat(config.input_format), VideoFrameLayout::Create(config.input_format, visible_size_);
visible_size_);
if (!input_layout) { if (!input_layout) {
VLOGF(1) << "Invalid image processor input layout"; VLOGF(1) << "Invalid image processor input layout";
return false; return false;
} }
auto output_layout = VideoFrameLayout::Create( auto output_layout =
V4L2Device::V4L2PixFmtToVideoPixelFormat(device_input_format_), VideoFrameLayout::Create(device_input_format_, input_allocated_size_);
input_allocated_size_);
if (!output_layout) { if (!output_layout) {
VLOGF(1) << "Invalid image processor output layout"; VLOGF(1) << "Invalid image processor output layout";
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