diff options
author | Chris Dimich <chris.dimich@boundarydevices.com> | 2023-01-09 10:52:50 -0800 |
---|---|---|
committer | Chris Dimich <chris.dimich@boundarydevices.com> | 2023-01-09 10:52:50 -0800 |
commit | 23bdb51b7858db363e56f7748f5523d44f78ac98 (patch) | |
tree | 1b45857028a39ebbaf3c4fe3875441a5257af772 /dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland/0114-V4L2VDA-Set-OUTPUT-format-with-parsed-resolution-for.patch | |
parent | 10c960f0eaa5fb774a676707c5148e29a6ae09b3 (diff) | |
download | meta-freescale-23bdb51b7858db363e56f7748f5523d44f78ac98.tar.gz |
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 <chris.dimich@boundarydevices.com>
Diffstat (limited to 'dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland/0114-V4L2VDA-Set-OUTPUT-format-with-parsed-resolution-for.patch')
-rw-r--r-- | dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland/0114-V4L2VDA-Set-OUTPUT-format-with-parsed-resolution-for.patch | 76 |
1 files changed, 76 insertions, 0 deletions
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 @@ | |||
1 | From b37891b75a53061ce6bdaaab926c2b630f6c1a61 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hou Qi <qi.hou@nxp.com> | ||
3 | Date: Mon, 5 Sep 2022 12:23:04 +0800 | ||
4 | Subject: [PATCH 14/17] V4L2VDA: Set OUTPUT format with parsed resolution for | ||
5 | amphion | ||
6 | |||
7 | For VP8, VC1l, rv, Amphion needs to set correct resolution for OUTPUT | ||
8 | queue as it will be added to amphion customized header. | ||
9 | |||
10 | Upstream-Status: Inappropriate [NXP specific] | ||
11 | --- | ||
12 | media/gpu/v4l2/v4l2_video_decode_accelerator.cc | 13 +++++++++++-- | ||
13 | media/gpu/v4l2/v4l2_video_decode_accelerator.h | 2 +- | ||
14 | 2 files changed, 12 insertions(+), 3 deletions(-) | ||
15 | |||
16 | diff --git a/media/gpu/v4l2/v4l2_video_decode_accelerator.cc b/media/gpu/v4l2/v4l2_video_decode_accelerator.cc | ||
17 | index ff543f6865802..fba38c4021855 100644 | ||
18 | --- a/media/gpu/v4l2/v4l2_video_decode_accelerator.cc | ||
19 | +++ b/media/gpu/v4l2/v4l2_video_decode_accelerator.cc | ||
20 | @@ -320,6 +320,9 @@ bool V4L2VideoDecodeAccelerator::CheckConfig(const Config& config) { | ||
21 | return false; | ||
22 | } | ||
23 | |||
24 | + int width, height; | ||
25 | + height = config.initial_expected_coded_size.height(); | ||
26 | + width = config.initial_expected_coded_size.width(); | ||
27 | // Capabilities check. | ||
28 | struct v4l2_capability caps; | ||
29 | unsigned int device_caps; | ||
30 | @@ -357,7 +360,7 @@ bool V4L2VideoDecodeAccelerator::CheckConfig(const Config& config) { | ||
31 | if (!output_queue_) | ||
32 | return false; | ||
33 | |||
34 | - if (!SetupFormats()) | ||
35 | + if (!SetupFormats(width, height)) | ||
36 | return false; | ||
37 | |||
38 | // We have confirmed that |config| is supported, tell the good news to the | ||
39 | @@ -2266,7 +2269,7 @@ bool V4L2VideoDecodeAccelerator::CreateInputBuffers() { | ||
40 | return true; | ||
41 | } | ||
42 | |||
43 | -bool V4L2VideoDecodeAccelerator::SetupFormats() { | ||
44 | +bool V4L2VideoDecodeAccelerator::SetupFormats(int width, int height) { | ||
45 | DCHECK(decoder_thread_.task_runner()->BelongsToCurrentThread()); | ||
46 | DCHECK_EQ(decoder_state_, kInitialized); | ||
47 | DCHECK(!input_queue_->IsStreaming()); | ||
48 | @@ -2306,6 +2309,12 @@ bool V4L2VideoDecodeAccelerator::SetupFormats() { | ||
49 | format.fmt.pix_mp.pixelformat = input_format_fourcc_; | ||
50 | format.fmt.pix_mp.plane_fmt[0].sizeimage = input_size; | ||
51 | format.fmt.pix_mp.num_planes = 1; | ||
52 | + // For VP8, VC1l, rv, Amphion needs to set correct resolution for | ||
53 | + // OUTPUT queue as it will be added to amphion customized header. | ||
54 | + if(V4L2_PIX_FMT_VP8 == input_format_fourcc_){ | ||
55 | + format.fmt.pix_mp.width = width; | ||
56 | + format.fmt.pix_mp.height = height; | ||
57 | + } | ||
58 | } else { | ||
59 | format.type = V4L2_BUF_TYPE_VIDEO_OUTPUT; | ||
60 | format.fmt.pix.pixelformat = input_format_fourcc_; | ||
61 | diff --git a/media/gpu/v4l2/v4l2_video_decode_accelerator.h b/media/gpu/v4l2/v4l2_video_decode_accelerator.h | ||
62 | index 163907129a095..d16ee5857785b 100644 | ||
63 | --- a/media/gpu/v4l2/v4l2_video_decode_accelerator.h | ||
64 | +++ b/media/gpu/v4l2/v4l2_video_decode_accelerator.h | ||
65 | @@ -395,7 +395,7 @@ class MEDIA_GPU_EXPORT V4L2VideoDecodeAccelerator | ||
66 | bool DestroyOutputBuffers(); | ||
67 | |||
68 | // Set input and output formats before starting decode. | ||
69 | - bool SetupFormats(); | ||
70 | + bool SetupFormats(int, int); | ||
71 | // Reset image processor and drop all processing frames. | ||
72 | bool ResetImageProcessor(); | ||
73 | |||
74 | -- | ||
75 | 2.17.1 | ||
76 | |||