summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland/0108-V4L2VDA-Use-correct-size-to-allocate-CAPTURE-buffer.patch
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2023-01-10 08:59:03 -0300
committerGitHub <noreply@github.com>2023-01-10 08:59:03 -0300
commit1c7f17f6063d0b747d94a17059b176f3ebdb3e3e (patch)
tree5da96ff55339ea98501a9e1f7544a243b20e9983 /dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland/0108-V4L2VDA-Use-correct-size-to-allocate-CAPTURE-buffer.patch
parentbd8ff87bf68f52b3933c5d1e9f83c610f18a963d (diff)
parent481b7f0468b3f5928f8f0fc6aa21e4836fb3f3c5 (diff)
downloadmeta-freescale-1c7f17f6063d0b747d94a17059b176f3ebdb3e3e.tar.gz
Merge pull request #1380 from Freescale/backport-1375-to-kirkstone
[Backport kirkstone] chromium-ozone-wayland: add bbappend and patches as per NXP 5.15.71_2…
Diffstat (limited to 'dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland/0108-V4L2VDA-Use-correct-size-to-allocate-CAPTURE-buffer.patch')
-rw-r--r--dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland/0108-V4L2VDA-Use-correct-size-to-allocate-CAPTURE-buffer.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland/0108-V4L2VDA-Use-correct-size-to-allocate-CAPTURE-buffer.patch b/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland/0108-V4L2VDA-Use-correct-size-to-allocate-CAPTURE-buffer.patch
new file mode 100644
index 00000000..d10e7046
--- /dev/null
+++ b/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland/0108-V4L2VDA-Use-correct-size-to-allocate-CAPTURE-buffer.patch
@@ -0,0 +1,43 @@
1From cd2caf4313d91197092dce6262a6f4b325501c04 Mon Sep 17 00:00:00 2001
2From: Hou Qi <qi.hou@nxp.com>
3Date: Sun, 4 Sep 2022 20:19:05 +0800
4Subject: [PATCH 08/17] V4L2VDA: Use correct size to allocate CAPTURE buffer
5
6Upstream-Status: Inappropriate [NXP specific]
7---
8 media/gpu/v4l2/v4l2_video_decode_accelerator.cc | 9 ++++++---
9 1 file changed, 6 insertions(+), 3 deletions(-)
10
11diff --git a/media/gpu/v4l2/v4l2_video_decode_accelerator.cc b/media/gpu/v4l2/v4l2_video_decode_accelerator.cc
12index 54c72c6148d94..018fe8c25f506 100644
13--- a/media/gpu/v4l2/v4l2_video_decode_accelerator.cc
14+++ b/media/gpu/v4l2/v4l2_video_decode_accelerator.cc
15@@ -2189,7 +2189,10 @@ bool V4L2VideoDecodeAccelerator::CreateBuffersForFormat(
16 DCHECK(decoder_thread_.task_runner()->BelongsToCurrentThread());
17 size_t egl_image_planes_count;
18
19- coded_size_.SetSize(format.fmt.pix_mp.width, format.fmt.pix_mp.height);
20+ if (V4L2_TYPE_IS_MULTIPLANAR(format.type))
21+ coded_size_.SetSize(format.fmt.pix_mp.width, format.fmt.pix_mp.height);
22+ else
23+ coded_size_.SetSize(format.fmt.pix.width, format.fmt.pix.height);
24 visible_size_ = visible_size;
25 egl_image_size_ = coded_size_;
26 if (image_processor_device_) {
27@@ -2207,11 +2210,11 @@ bool V4L2VideoDecodeAccelerator::CreateBuffersForFormat(
28 // In practice, this applies to all Image Processors, i.e. Mediatek devices.
29 DCHECK_EQ(coded_size_, output_size);
30 } else {
31- egl_image_planes_count = format.fmt.pix_mp.num_planes;
32+ egl_image_planes_count = V4L2_TYPE_IS_MULTIPLANAR(format.type) ? format.fmt.pix_mp.num_planes : 1;
33 }
34 VLOGF(2) << "new resolution: " << coded_size_.ToString()
35 << ", visible size: " << visible_size_.ToString()
36- << ", decoder output planes count: " << format.fmt.pix_mp.num_planes
37+ << ", decoder output planes count: " << egl_image_planes_count
38 << ", EGLImage size: " << egl_image_size_.ToString()
39 << ", EGLImage plane count: " << egl_image_planes_count;
40
41--
422.17.1
43