chromium-ozone-wayland: Add V4L2VD support for amphion vp8 format [LF-13950]

Signed-off-by: Hou Qi <qi.hou@nxp.com>
This commit is contained in:
Hou Qi 2024-11-19 10:34:22 +09:00
parent 862cd4ec06
commit fc6ee9bef3
2 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,37 @@
From 13e0146475ec26b59c706249c7a61c7d9ee2d360 Mon Sep 17 00:00:00 2001
From: Hou Qi <qi.hou@nxp.com>
Date: Mon, 18 Nov 2024 14:59:51 +0900
Subject: [PATCH] V4L2VideoDecoder: Set OUTPUT format with parsed resolution
For VP8, VC1l, rv, amphion needs to set correct resolution for OUTPUT
queue as it will be added to amphion customized header.
Upstream-Status: Inappropriate [NXP specific]
---
media/gpu/v4l2/v4l2_video_decoder.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/media/gpu/v4l2/v4l2_video_decoder.cc b/media/gpu/v4l2/v4l2_video_decoder.cc
index d0f35414c69c9..05c8d61f5f9fb 100644
--- a/media/gpu/v4l2/v4l2_video_decoder.cc
+++ b/media/gpu/v4l2/v4l2_video_decoder.cc
@@ -328,6 +328,7 @@ void V4L2VideoDecoder::Initialize(const VideoDecoderConfig& config,
aspect_ratio_ = config.aspect_ratio();
color_space_ = config.color_space_info();
current_resolution_ = config.visible_rect().size();
+ VLOGF(3) << "resolution is " << current_resolution_.width() << "x" << current_resolution_.height();
if (profile_ == VIDEO_CODEC_PROFILE_UNKNOWN) {
VLOGF(1) << "Unknown profile.";
@@ -632,7 +633,7 @@ bool V4L2VideoDecoder::SetupInputFormat() {
// Setup the input format.
auto format =
- input_queue_->SetFormat(input_format_fourcc_, gfx::Size(), input_size);
+ input_queue_->SetFormat(input_format_fourcc_, current_resolution_, input_size);
if (!format) {
VPLOGF(1) << "Failed to call IOCTL to set input format.";
return false;
--
2.34.1

View File

@ -31,6 +31,7 @@ VDA_PATCH_SET = " \
file://0118-V4L2VideoDecoder-Fix-amphion-report-size-mismatch.patch \
file://0119-VideoDecoderPipeline-Get-V4L2VideoDecoder-supported-.patch \
file://0120-V4L2VideoDecoder-Fix-amphion-cannot-streamoff-after-.patch \
file://0121-V4L2VideoDecoder-Set-OUTPUT-format-with-parsed-resol.patch \
"
SRC_URI:append:mx8-nxp-bsp = " ${VDA_PATCH_SET}"
SRC_URI:append:mx95-nxp-bsp = " ${VDA_PATCH_SET}"