From 481b7f0468b3f5928f8f0fc6aa21e4836fb3f3c5 Mon Sep 17 00:00:00 2001 From: Chris Dimich Date: Mon, 9 Jan 2023 10:52:50 -0800 Subject: chromium-ozone-wayland: add bbappend and patches as per NXP 5.15.71_2.2.0 rel Changes include: - support on i.MX 8 series platform. - 8MM/8MP/8MQ support h264/hevc/vp8/vp9 hardware decoding. - 8QM/8QXP support h264/hevc/vp8 hardware decoding. - support seek, playrate change and resolution change. - support video acceleration for online media platform such as Youtube, bilibili. Signed-off-by: Chris Dimich (cherry picked from commit 23bdb51b7858db363e56f7748f5523d44f78ac98) --- ...-OUTPUT-format-with-parsed-resolution-for.patch | 76 ++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland/0114-V4L2VDA-Set-OUTPUT-format-with-parsed-resolution-for.patch (limited to 'dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland/0114-V4L2VDA-Set-OUTPUT-format-with-parsed-resolution-for.patch') diff --git a/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland/0114-V4L2VDA-Set-OUTPUT-format-with-parsed-resolution-for.patch b/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland/0114-V4L2VDA-Set-OUTPUT-format-with-parsed-resolution-for.patch new file mode 100644 index 00000000..6bde73d6 --- /dev/null +++ b/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland/0114-V4L2VDA-Set-OUTPUT-format-with-parsed-resolution-for.patch @@ -0,0 +1,76 @@ +From b37891b75a53061ce6bdaaab926c2b630f6c1a61 Mon Sep 17 00:00:00 2001 +From: Hou Qi +Date: Mon, 5 Sep 2022 12:23:04 +0800 +Subject: [PATCH 14/17] V4L2VDA: Set OUTPUT format with parsed resolution for + amphion + +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_decode_accelerator.cc | 13 +++++++++++-- + media/gpu/v4l2/v4l2_video_decode_accelerator.h | 2 +- + 2 files changed, 12 insertions(+), 3 deletions(-) + +diff --git a/media/gpu/v4l2/v4l2_video_decode_accelerator.cc b/media/gpu/v4l2/v4l2_video_decode_accelerator.cc +index ff543f6865802..fba38c4021855 100644 +--- a/media/gpu/v4l2/v4l2_video_decode_accelerator.cc ++++ b/media/gpu/v4l2/v4l2_video_decode_accelerator.cc +@@ -320,6 +320,9 @@ bool V4L2VideoDecodeAccelerator::CheckConfig(const Config& config) { + return false; + } + ++ int width, height; ++ height = config.initial_expected_coded_size.height(); ++ width = config.initial_expected_coded_size.width(); + // Capabilities check. + struct v4l2_capability caps; + unsigned int device_caps; +@@ -357,7 +360,7 @@ bool V4L2VideoDecodeAccelerator::CheckConfig(const Config& config) { + if (!output_queue_) + return false; + +- if (!SetupFormats()) ++ if (!SetupFormats(width, height)) + return false; + + // We have confirmed that |config| is supported, tell the good news to the +@@ -2266,7 +2269,7 @@ bool V4L2VideoDecodeAccelerator::CreateInputBuffers() { + return true; + } + +-bool V4L2VideoDecodeAccelerator::SetupFormats() { ++bool V4L2VideoDecodeAccelerator::SetupFormats(int width, int height) { + DCHECK(decoder_thread_.task_runner()->BelongsToCurrentThread()); + DCHECK_EQ(decoder_state_, kInitialized); + DCHECK(!input_queue_->IsStreaming()); +@@ -2306,6 +2309,12 @@ bool V4L2VideoDecodeAccelerator::SetupFormats() { + format.fmt.pix_mp.pixelformat = input_format_fourcc_; + format.fmt.pix_mp.plane_fmt[0].sizeimage = input_size; + format.fmt.pix_mp.num_planes = 1; ++ // For VP8, VC1l, rv, Amphion needs to set correct resolution for ++ // OUTPUT queue as it will be added to amphion customized header. ++ if(V4L2_PIX_FMT_VP8 == input_format_fourcc_){ ++ format.fmt.pix_mp.width = width; ++ format.fmt.pix_mp.height = height; ++ } + } else { + format.type = V4L2_BUF_TYPE_VIDEO_OUTPUT; + format.fmt.pix.pixelformat = input_format_fourcc_; +diff --git a/media/gpu/v4l2/v4l2_video_decode_accelerator.h b/media/gpu/v4l2/v4l2_video_decode_accelerator.h +index 163907129a095..d16ee5857785b 100644 +--- a/media/gpu/v4l2/v4l2_video_decode_accelerator.h ++++ b/media/gpu/v4l2/v4l2_video_decode_accelerator.h +@@ -395,7 +395,7 @@ class MEDIA_GPU_EXPORT V4L2VideoDecodeAccelerator + bool DestroyOutputBuffers(); + + // Set input and output formats before starting decode. +- bool SetupFormats(); ++ bool SetupFormats(int, int); + // Reset image processor and drop all processing frames. + bool ResetImageProcessor(); + +-- +2.17.1 + -- cgit v1.2.3-54-g00ecf