stm-st-stm32mp: gstreamer-plugins-bad: v4l2codecs: add support of encoding from UYVY

Add UYVY support in order to be aligned with stateful v4l2 codecs
such as v4l2jpegenc.

https://onedigi.atlassian.net/browse/DEL-9546

Change-Id: I8c8e0b328aa3ea2325085d26cad0c14549b25f5a
Reviewed-on: https://gerrit.st.com/c/oeivi/oe/st/meta-opensdk/+/436381
ACI: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Tested-by: Christophe PRIOUZEAU <christophe.priouzeau@st.com>
Reviewed-by: Christophe PRIOUZEAU <christophe.priouzeau@st.com>
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
This commit is contained in:
Christophe Priouzeau 2025-02-12 09:29:22 +01:00 committed by Arturo Buzarra
parent 0d10d91ed2
commit a4d8a1a985
2 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,41 @@
From 0a93b2551d40fd6d4b4d222f552d329ea17524db Mon Sep 17 00:00:00 2001
From: Hugues Fruchet <hugues.fruchet@foss.st.com>
Date: Wed, 29 Jan 2025 15:43:14 +0100
Subject: [PATCH] v4l2codecs: add support of encoding from UYVY
Add support of encoding from UYVY
Upstream-Status: Pending
---
sys/v4l2codecs/gstv4l2format.c | 1 +
sys/v4l2codecs/gstv4l2format.h | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/sys/v4l2codecs/gstv4l2format.c b/sys/v4l2codecs/gstv4l2format.c
index 2d930d1..57b3e9a 100644
--- a/sys/v4l2codecs/gstv4l2format.c
+++ b/sys/v4l2codecs/gstv4l2format.c
@@ -35,6 +35,7 @@ static struct FormatEntry format_map[] = {
{V4L2_PIX_FMT_NV12M, 2, GST_VIDEO_FORMAT_NV12, 8, 420},
{V4L2_PIX_FMT_NV12, 1, GST_VIDEO_FORMAT_NV12, 8, 420},
{V4L2_PIX_FMT_YUYV, 1, GST_VIDEO_FORMAT_YUY2, 8, 422},
+ {V4L2_PIX_FMT_UYVY, 1, GST_VIDEO_FORMAT_UYVY, 8, 422},
{V4L2_PIX_FMT_SUNXI_TILED_NV12, 1, GST_VIDEO_FORMAT_NV12_32L32, 8, 422},
{V4L2_PIX_FMT_NV12_4L4, 1, GST_VIDEO_FORMAT_NV12_4L4, 8, 420},
{V4L2_PIX_FMT_MM21, 2, GST_VIDEO_FORMAT_NV12_16L32S, 8, 420},
diff --git a/sys/v4l2codecs/gstv4l2format.h b/sys/v4l2codecs/gstv4l2format.h
index 2bf675f..c0c2ccd 100644
--- a/sys/v4l2codecs/gstv4l2format.h
+++ b/sys/v4l2codecs/gstv4l2format.h
@@ -24,7 +24,7 @@
#include <gst/video/video.h>
#include "linux/videodev2.h"
-#define GST_V4L2_DEFAULT_VIDEO_FORMATS "{ NV12, YUY2, NV12_4L4, NV12_32L32, NV12_16L32S, I420, P010_10LE, RGB16, BGRx, BGRA, RGBx, RGBA, xBGR, ABGR, xRGB, ARGB}"
+#define GST_V4L2_DEFAULT_VIDEO_FORMATS "{ NV12, YUY2, UYVY, NV12_4L4, NV12_32L32, NV12_16L32S, I420, P010_10LE, RGB16, BGRx, BGRA, RGBx, RGBA, xBGR, ABGR, xRGB, ARGB}"
gboolean gst_v4l2_format_to_video_info (struct v4l2_format * fmt,
GstVideoInfo * out_info);
--
2.25.1

View File

@ -79,6 +79,7 @@ SRC_URI:append = " \
file://0082-Revert-waylandsink-match-drm-kernel-driver-alignment.patch \ file://0082-Revert-waylandsink-match-drm-kernel-driver-alignment.patch \
file://0083-Revert-gtkwaylandsink-match-drm-kernel-driver-alignm.patch \ file://0083-Revert-gtkwaylandsink-match-drm-kernel-driver-alignm.patch \
file://0084-v4l2codecs-h264enc-add-support-of-DCT-8x8.patch \ file://0084-v4l2codecs-h264enc-add-support-of-DCT-8x8.patch \
file://0085-v4l2codecs-add-support-of-encoding-from-UYVY.patch \
" "
PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}" PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}"