diff options
Diffstat (limited to 'dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland/0115-V4L2VDA-Add-V4L2_PIX_FMT_NV12M_8L128-format-for-amph.patch')
-rw-r--r-- | dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland/0115-V4L2VDA-Add-V4L2_PIX_FMT_NV12M_8L128-format-for-amph.patch | 101 |
1 files changed, 0 insertions, 101 deletions
diff --git a/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland/0115-V4L2VDA-Add-V4L2_PIX_FMT_NV12M_8L128-format-for-amph.patch b/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland/0115-V4L2VDA-Add-V4L2_PIX_FMT_NV12M_8L128-format-for-amph.patch deleted file mode 100644 index e9afc8e6..00000000 --- a/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland/0115-V4L2VDA-Add-V4L2_PIX_FMT_NV12M_8L128-format-for-amph.patch +++ /dev/null | |||
@@ -1,101 +0,0 @@ | |||
1 | From 4a3c50348edb021d0529d350aabcd78cc0c75164 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hou Qi <qi.hou@nxp.com> | ||
3 | Date: Fri, 9 Sep 2022 10:06:51 +0800 | ||
4 | Subject: [PATCH 15/17] V4L2VDA: Add V4L2_PIX_FMT_NV12M_8L128 format for | ||
5 | amphion | ||
6 | |||
7 | Upstream-Status: Inappropriate [NXP specific] | ||
8 | --- | ||
9 | media/gpu/chromeos/fourcc.cc | 2 ++ | ||
10 | media/gpu/chromeos/fourcc.h | 4 ++++ | ||
11 | media/gpu/v4l2/generic_v4l2_device.cc | 4 ++++ | ||
12 | media/gpu/v4l2/v4l2_video_decode_accelerator.cc | 9 +++++++-- | ||
13 | 4 files changed, 17 insertions(+), 2 deletions(-) | ||
14 | |||
15 | diff --git a/media/gpu/chromeos/fourcc.cc b/media/gpu/chromeos/fourcc.cc | ||
16 | index 80f392ebf5e41..e8239121d8e96 100644 | ||
17 | --- a/media/gpu/chromeos/fourcc.cc | ||
18 | +++ b/media/gpu/chromeos/fourcc.cc | ||
19 | @@ -26,6 +26,7 @@ absl::optional<Fourcc> Fourcc::FromUint32(uint32_t fourcc) { | ||
20 | case YM12: | ||
21 | case YM21: | ||
22 | case YUYV: | ||
23 | + case NA12: | ||
24 | case NV12: | ||
25 | case NV21: | ||
26 | case NM12: | ||
27 | @@ -149,6 +150,7 @@ VideoPixelFormat Fourcc::ToVideoPixelFormat() const { | ||
28 | return PIXEL_FORMAT_YUY2; | ||
29 | case NV12: | ||
30 | case NM12: | ||
31 | + case NA12: | ||
32 | return PIXEL_FORMAT_NV12; | ||
33 | case NV21: | ||
34 | case NM21: | ||
35 | diff --git a/media/gpu/chromeos/fourcc.h b/media/gpu/chromeos/fourcc.h | ||
36 | index c4b233ac64562..27f1b679435b1 100644 | ||
37 | --- a/media/gpu/chromeos/fourcc.h | ||
38 | +++ b/media/gpu/chromeos/fourcc.h | ||
39 | @@ -68,6 +68,10 @@ class MEDIA_GPU_EXPORT Fourcc { | ||
40 | // Maps to PIXEL_FORMAT_NV21, V4L2_PIX_FMT_NV21M. | ||
41 | NM21 = ComposeFourcc('N', 'M', '2', '1'), | ||
42 | |||
43 | + // Tiled YUV formats, non contiguous planes. | ||
44 | + // Maps to V4L2_PIX_FMT_NV12M_8L128. | ||
45 | + NA12 = ComposeFourcc('N', 'A', '1', '2'), | ||
46 | + | ||
47 | // YUV422 single-planar format. | ||
48 | // https://linuxtv.org/downloads/v4l-dvb-apis-new/userspace-api/v4l/pixfmt-yuv422p.html | ||
49 | // Maps to PIXEL_FORMAT_I422, V4L2_PIX_FMT_YUV422P. | ||
50 | diff --git a/media/gpu/v4l2/generic_v4l2_device.cc b/media/gpu/v4l2/generic_v4l2_device.cc | ||
51 | index a578768f8d3b1..d7b57d180f7f7 100644 | ||
52 | --- a/media/gpu/v4l2/generic_v4l2_device.cc | ||
53 | +++ b/media/gpu/v4l2/generic_v4l2_device.cc | ||
54 | @@ -46,6 +46,9 @@ using media_gpu_v4l2::InitializeStubs; | ||
55 | using media_gpu_v4l2::StubPathMap; | ||
56 | #endif | ||
57 | |||
58 | +/* Tiled YUV formats, non contiguous planes */ | ||
59 | +#define V4L2_PIX_FMT_NV12M_8L128 v4l2_fourcc('N', 'A', '1', '2') /* Y/CbCr 4:2:0 8x128 tiles */ | ||
60 | + | ||
61 | namespace media { | ||
62 | |||
63 | namespace { | ||
64 | @@ -54,6 +57,7 @@ uint32_t V4L2PixFmtToDrmFormat(uint32_t format) { | ||
65 | switch (format) { | ||
66 | case V4L2_PIX_FMT_NV12: | ||
67 | case V4L2_PIX_FMT_NV12M: | ||
68 | + case V4L2_PIX_FMT_NV12M_8L128: | ||
69 | return DRM_FORMAT_NV12; | ||
70 | |||
71 | case V4L2_PIX_FMT_YUV420: | ||
72 | diff --git a/media/gpu/v4l2/v4l2_video_decode_accelerator.cc b/media/gpu/v4l2/v4l2_video_decode_accelerator.cc | ||
73 | index fba38c4021855..a37efa9a708e8 100644 | ||
74 | --- a/media/gpu/v4l2/v4l2_video_decode_accelerator.cc | ||
75 | +++ b/media/gpu/v4l2/v4l2_video_decode_accelerator.cc | ||
76 | @@ -1356,8 +1356,9 @@ void V4L2VideoDecodeAccelerator::Enqueue() { | ||
77 | // yet. Also, V4L2VDA calls STREAMOFF and STREAMON after resolution | ||
78 | // change. They implicitly send a V4L2_DEC_CMD_STOP and V4L2_DEC_CMD_START | ||
79 | // to the decoder. | ||
80 | - if (input_queue_->QueuedBuffersCount() > 0) | ||
81 | - break; | ||
82 | + if (input_queue_->QueuedBuffersCount() > 0) { | ||
83 | + // break; | ||
84 | + } | ||
85 | |||
86 | if (coded_size_.IsEmpty() || !input_queue_->IsStreaming()) { | ||
87 | // In these situations, we should call NotifyFlushDone() immediately: | ||
88 | @@ -1499,6 +1500,10 @@ bool V4L2VideoDecodeAccelerator::DequeueOutputBuffer() { | ||
89 | // Dequeue a completed output (VIDEO_CAPTURE) buffer, and queue to the | ||
90 | // completed queue. | ||
91 | auto ret = output_queue_->DequeueBuffer(); | ||
92 | + if (errno == EPIPE) { | ||
93 | + VLOG(1) << "Got eos"; | ||
94 | + flush_awaiting_last_output_buffer_ = false; | ||
95 | + } | ||
96 | if (ret.first == false) { | ||
97 | LOG(ERROR) << "Error in Dequeue output buffer"; | ||
98 | NOTIFY_ERROR(PLATFORM_FAILURE); | ||
99 | -- | ||
100 | 2.17.1 | ||
101 | |||