summaryrefslogtreecommitdiff
path: root/dynamic-layers
diff options
context:
space:
mode:
authorJan Remmet <j.remmet@phytec.de>2018-08-16 12:55:34 +0200
committerStefan Müller-Klieser <s.mueller-klieser@phytec.de>2018-08-20 17:22:59 +0200
commit69f4f1626aca598f8f3e444749e700c0722c6a5b (patch)
tree4c91878cd6093740b35a6a6250f89b19ae443dda /dynamic-layers
parent8f92d86b6dea06959bf518d90e8a314687fa51bb (diff)
downloadmeta-yogurt-69f4f1626aca598f8f3e444749e700c0722c6a5b.tar.bz2
meta-yogurt-69f4f1626aca598f8f3e444749e700c0722c6a5b.zip
gstreamer1.0-plugins: move patch to dynamic layer
This only apply on layer gstreamer1.0 version of gstreamer1.0-plugins-base and gstreamer1.0-plugins-good Signed-off-by: Jan Remmet <j.remmet@phytec.de> Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de>
Diffstat (limited to 'dynamic-layers')
-rw-r--r--dynamic-layers/gstreamer1.0/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/grayxx-base.patch189
-rw-r--r--dynamic-layers/gstreamer1.0/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend5
-rw-r--r--dynamic-layers/gstreamer1.0/recipes-multimedia/gstreamer1.0-plugins-good/grayxx.patch48
-rw-r--r--dynamic-layers/gstreamer1.0/recipes-multimedia/gstreamer1.0-plugins-good_%.bbappend6
4 files changed, 248 insertions, 0 deletions
diff --git a/dynamic-layers/gstreamer1.0/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/grayxx-base.patch b/dynamic-layers/gstreamer1.0/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/grayxx-base.patch
new file mode 100644
index 0000000..63eac70
--- /dev/null
+++ b/dynamic-layers/gstreamer1.0/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/grayxx-base.patch
@@ -0,0 +1,189 @@
+Index: gst-plugins-base-1.14.0/gst-libs/gst/video/video-converter.c
+===================================================================
+--- gst-plugins-base-1.14.0.orig/gst-libs/gst/video/video-converter.c
++++ gst-plugins-base-1.14.0/gst-libs/gst/video/video-converter.c
+@@ -5941,6 +5941,8 @@ setup_scale (GstVideoConverter * convert
+ #if G_BYTE_ORDER == G_LITTLE_ENDIAN
+ case GST_VIDEO_FORMAT_GRAY16_BE:
+ #else
++ case GST_VIDEO_FORMAT_GRAY10_LE:
++ case GST_VIDEO_FORMAT_GRAY12_LE:
+ case GST_VIDEO_FORMAT_GRAY16_LE:
+ #endif
+ if (method != GST_VIDEO_RESAMPLER_METHOD_NEAREST) {
+Index: gst-plugins-base-1.14.0/gst-libs/gst/video/video-format.c
+===================================================================
+--- gst-plugins-base-1.14.0.orig/gst-libs/gst/video/video-format.c
++++ gst-plugins-base-1.14.0/gst-libs/gst/video/video-format.c
+@@ -1094,6 +1094,76 @@ pack_GRAY8 (const GstVideoFormatInfo * i
+ video_orc_pack_GRAY8 (d, src, width);
+ }
+
++#define PACK_GRAY10_LE GST_VIDEO_FORMAT_AYUV64, unpack_GRAY10_LE, 1, pack_GRAY10_LE
++static void
++unpack_GRAY10_LE (const GstVideoFormatInfo * info, GstVideoPackFlags flags,
++ gpointer dest, const gpointer data[GST_VIDEO_MAX_PLANES],
++ const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
++{
++ int i;
++ const guint16 *restrict s = GET_LINE (y);
++ guint16 *restrict d = dest;
++
++ s += x;
++
++ for (i = 0; i < width; i++) {
++ d[i * 4 + 0] = 0xffff;
++ d[i * 4 + 1] = GST_READ_UINT16_LE (s + i) << 6;
++ d[i * 4 + 2] = 0x8000;
++ d[i * 4 + 3] = 0x8000;
++ }
++}
++
++static void
++pack_GRAY10_LE (const GstVideoFormatInfo * info, GstVideoPackFlags flags,
++ const gpointer src, gint sstride, gpointer data[GST_VIDEO_MAX_PLANES],
++ const gint stride[GST_VIDEO_MAX_PLANES], GstVideoChromaSite chroma_site,
++ gint y, gint width)
++{
++ int i;
++ guint16 *restrict d = GET_LINE (y);
++ const guint16 *restrict s = src;
++
++ for (i = 0; i < width; i++) {
++ GST_WRITE_UINT16_LE (d + i, s[i * 4 + 1] >> 6);
++ }
++}
++
++#define PACK_GRAY12_LE GST_VIDEO_FORMAT_AYUV64, unpack_GRAY12_LE, 1, pack_GRAY12_LE
++static void
++unpack_GRAY12_LE (const GstVideoFormatInfo * info, GstVideoPackFlags flags,
++ gpointer dest, const gpointer data[GST_VIDEO_MAX_PLANES],
++ const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
++{
++ int i;
++ const guint16 *restrict s = GET_LINE (y);
++ guint16 *restrict d = dest;
++
++ s += x;
++
++ for (i = 0; i < width; i++) {
++ d[i * 4 + 0] = 0xffff;
++ d[i * 4 + 1] = GST_READ_UINT16_LE (s + i) << 4;
++ d[i * 4 + 2] = 0x8000;
++ d[i * 4 + 3] = 0x8000;
++ }
++}
++
++static void
++pack_GRAY12_LE (const GstVideoFormatInfo * info, GstVideoPackFlags flags,
++ const gpointer src, gint sstride, gpointer data[GST_VIDEO_MAX_PLANES],
++ const gint stride[GST_VIDEO_MAX_PLANES], GstVideoChromaSite chroma_site,
++ gint y, gint width)
++{
++ int i;
++ guint16 *restrict d = GET_LINE (y);
++ const guint16 *restrict s = src;
++
++ for (i = 0; i < width; i++) {
++ GST_WRITE_UINT16_LE (d + i, s[i * 4 + 1] >> 4);
++ }
++}
++
+ #define PACK_GRAY16_BE GST_VIDEO_FORMAT_AYUV64, unpack_GRAY16_BE, 1, pack_GRAY16_BE
+ static void
+ unpack_GRAY16_BE (const GstVideoFormatInfo * info, GstVideoPackFlags flags,
+@@ -4945,6 +5015,7 @@ typedef struct
+ #define DPTH10_10_10 10, 3, { 0, 0, 0, 0 }, { 10, 10, 10, 0 }
+ #define DPTH10_10_10_10 10, 4, { 0, 0, 0, 0 }, { 10, 10, 10, 10 }
+ #define DPTH10_10_10_HI 16, 3, { 6, 6, 6, 0 }, { 10, 10, 10, 0 }
++#define DPTH12 12, 1, { 0, 0, 0, 0 }, { 12, 0, 0, 0 }
+ #define DPTH12_12_12 12, 3, { 0, 0, 0, 0 }, { 12, 12, 12, 0 }
+ #define DPTH12_12_12_12 12, 4, { 0, 0, 0, 0 }, { 12, 12, 12, 12 }
+ #define DPTH16 16, 1, { 0, 0, 0, 0 }, { 16, 0, 0, 0 }
+@@ -5112,6 +5183,10 @@ static const VideoFormat formats[] = {
+
+ MAKE_GRAY_FORMAT (GRAY8, "raw video", DPTH8, PSTR1, PLANE0, OFFS0, SUB4,
+ PACK_GRAY8),
++ MAKE_GRAY_LE_FORMAT (GRAY10_LE, "raw video", DPTH10, PSTR2, PLANE0, OFFS0,
++ SUB4, PACK_GRAY10_LE),
++ MAKE_GRAY_LE_FORMAT (GRAY12_LE, "raw video", DPTH12, PSTR2, PLANE0, OFFS0,
++ SUB4, PACK_GRAY12_LE),
+ MAKE_GRAY_FORMAT (GRAY16_BE, "raw video", DPTH16, PSTR2, PLANE0, OFFS0, SUB4,
+ PACK_GRAY16_BE),
+ MAKE_GRAY_LE_FORMAT (GRAY16_LE, "raw video", DPTH16, PSTR2, PLANE0, OFFS0,
+@@ -5466,6 +5541,10 @@ gst_video_format_from_fourcc (guint32 fo
+ case GST_MAKE_FOURCC ('Y', '8', ' ', ' '):
+ case GST_MAKE_FOURCC ('G', 'R', 'E', 'Y'):
+ return GST_VIDEO_FORMAT_GRAY8;
++ case GST_MAKE_FOURCC ('Y', '1', '0', ' '):
++ return GST_VIDEO_FORMAT_GRAY10_LE;
++ case GST_MAKE_FOURCC ('Y', '1', '2', ' '):
++ return GST_VIDEO_FORMAT_GRAY12_LE;
+ case GST_MAKE_FOURCC ('Y', '1', '6', ' '):
+ return GST_VIDEO_FORMAT_GRAY16_LE;
+ case GST_MAKE_FOURCC ('U', 'Y', 'V', 'P'):
+Index: gst-plugins-base-1.14.0/gst-libs/gst/video/video-format.h
+===================================================================
+--- gst-plugins-base-1.14.0.orig/gst-libs/gst/video/video-format.h
++++ gst-plugins-base-1.14.0/gst-libs/gst/video/video-format.h
+@@ -61,6 +61,7 @@ G_BEGIN_DECLS
+ * @GST_VIDEO_FORMAT_NV12_10LE32: 10-bit variant of @GST_VIDEO_FORMAT_NV12, packed into 32bit words (MSB 2 bits padding) (Since: 1.14)
+ * @GST_VIDEO_FORMAT_GRAY8: 8-bit grayscale
+ * @GST_VIDEO_FORMAT_GRAY10_LE32: 10-bit grayscale, packed into 32bit words (2 bits padding) (Since: 1.14)
++ * @GST_VIDEO_FORMAT_GRAY12_LE32: 12-bit grayscale, packed into 32bit words (2 bits padding)
+ * @GST_VIDEO_FORMAT_GRAY16_BE: 16-bit grayscale, most significant byte first
+ * @GST_VIDEO_FORMAT_GRAY16_LE: 16-bit grayscale, least significant byte first
+ * @GST_VIDEO_FORMAT_v308: packed 4:4:4 YUV (Y-U-V ...)
+@@ -143,6 +144,8 @@ typedef enum {
+ GST_VIDEO_FORMAT_NV12,
+ GST_VIDEO_FORMAT_NV21,
+ GST_VIDEO_FORMAT_GRAY8,
++ GST_VIDEO_FORMAT_GRAY10_LE,
++ GST_VIDEO_FORMAT_GRAY12_LE,
+ GST_VIDEO_FORMAT_GRAY16_BE,
+ GST_VIDEO_FORMAT_GRAY16_LE,
+ GST_VIDEO_FORMAT_v308,
+@@ -542,7 +545,8 @@ gconstpointer gst_video_format_get_pale
+
+ #define GST_VIDEO_FORMATS_ALL "{ I420, YV12, YUY2, UYVY, AYUV, RGBx, " \
+ "BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, " \
+- "Y444, v210, v216, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, " \
++ "Y444, v210, v216, NV12, NV21, GRAY8, " \
++ "GRAY10_LE, GRAY12_LE, GRAY16_BE, GRAY16_LE, v308, RGB16, " \
+ "BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, " \
+ "AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, " \
+ "Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, " \
+Index: gst-plugins-base-1.14.0/gst-libs/gst/video/video-info.c
+===================================================================
+--- gst-plugins-base-1.14.0.orig/gst-libs/gst/video/video-info.c
++++ gst-plugins-base-1.14.0/gst-libs/gst/video/video-info.c
+@@ -749,6 +749,8 @@ fill_planes (GstVideoInfo * info)
+ info->offset[0] = 0;
+ info->size = info->stride[0] * height;
+ break;
++ case GST_VIDEO_FORMAT_GRAY10_LE:
++ case GST_VIDEO_FORMAT_GRAY12_LE:
+ case GST_VIDEO_FORMAT_GRAY16_BE:
+ case GST_VIDEO_FORMAT_GRAY16_LE:
+ info->stride[0] = GST_ROUND_UP_4 (width * 2);
+Index: gst-plugins-base-1.14.0/gst-libs/gst/video/video-scaler.c
+===================================================================
+--- gst-plugins-base-1.14.0.orig/gst-libs/gst/video/video-scaler.c
++++ gst-plugins-base-1.14.0/gst-libs/gst/video/video-scaler.c
+@@ -1239,6 +1239,16 @@ get_functions (GstVideoScaler * hscale,
+ *bits = 16;
+ *n_elems = 4;
+ break;
++ case GST_VIDEO_FORMAT_GRAY10_LE:
++ bits = 10;
++ *n_elems = 1;
++ mono = TRUE;
++ break;
++ case GST_VIDEO_FORMAT_GRAY12_LE:
++ bits = 12;
++ *n_elems = 1;
++ mono = TRUE;
++ break;
+ case GST_VIDEO_FORMAT_GRAY16_LE:
+ case GST_VIDEO_FORMAT_GRAY16_BE:
+ *bits = 16;
diff --git a/dynamic-layers/gstreamer1.0/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend b/dynamic-layers/gstreamer1.0/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend
new file mode 100644
index 0000000..d3ff457
--- /dev/null
+++ b/dynamic-layers/gstreamer1.0/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend
@@ -0,0 +1,5 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
+
+SRC_URI += "\
+ file://grayxx-base.patch \
+"
diff --git a/dynamic-layers/gstreamer1.0/recipes-multimedia/gstreamer1.0-plugins-good/grayxx.patch b/dynamic-layers/gstreamer1.0/recipes-multimedia/gstreamer1.0-plugins-good/grayxx.patch
new file mode 100644
index 0000000..5d7bfc8
--- /dev/null
+++ b/dynamic-layers/gstreamer1.0/recipes-multimedia/gstreamer1.0-plugins-good/grayxx.patch
@@ -0,0 +1,48 @@
+Index: gst-plugins-good-1.8.3/sys/v4l2/gstv4l2object.c
+===================================================================
+--- gst-plugins-good-1.8.3.orig/sys/v4l2/gstv4l2object.c
++++ gst-plugins-good-1.8.3/sys/v4l2/gstv4l2object.c
+@@ -1244,6 +1244,12 @@ gst_v4l2_object_v4l2fourcc_to_video_form
+ case V4L2_PIX_FMT_GREY: /* 8 Greyscale */
+ format = GST_VIDEO_FORMAT_GRAY8;
+ break;
++ case V4L2_PIX_FMT_Y10:
++ format = GST_VIDEO_FORMAT_GRAY10_LE;
++ break;
++ case V4L2_PIX_FMT_Y12:
++ format = GST_VIDEO_FORMAT_GRAY12_LE;
++ break;
+ case V4L2_PIX_FMT_Y16:
+ format = GST_VIDEO_FORMAT_GRAY16_LE;
+ break;
+@@ -1474,6 +1480,8 @@ gst_v4l2_object_v4l2fourcc_to_bare_struc
+ structure = gst_structure_new_empty ("video/x-vp8");
+ break;
+ case V4L2_PIX_FMT_GREY: /* 8 Greyscale */
++ case V4L2_PIX_FMT_Y10:
++ case V4L2_PIX_FMT_Y12:
+ case V4L2_PIX_FMT_Y16:
+ case V4L2_PIX_FMT_Y16_BE:
+ case V4L2_PIX_FMT_XRGB555:
+@@ -1562,8 +1570,6 @@ gst_v4l2_object_v4l2fourcc_to_bare_struc
+ case V4L2_PIX_FMT_HI240: /* 8 8-bit color */
+ case V4L2_PIX_FMT_Y4:
+ case V4L2_PIX_FMT_Y6:
+- case V4L2_PIX_FMT_Y10:
+- case V4L2_PIX_FMT_Y12:
+ case V4L2_PIX_FMT_Y10BPACK:
+ case V4L2_PIX_FMT_YUV444:
+ case V4L2_PIX_FMT_YUV555:
+@@ -1793,6 +1799,12 @@ gst_v4l2_object_get_caps_info (GstV4l2Ob
+ case GST_VIDEO_FORMAT_GRAY8:
+ fourcc = V4L2_PIX_FMT_GREY;
+ break;
++ case GST_VIDEO_FORMAT_GRAY10_LE:
++ fourcc = V4L2_PIX_FMT_Y10;
++ break;
++ case GST_VIDEO_FORMAT_GRAY12_LE:
++ fourcc = V4L2_PIX_FMT_Y12;
++ break;
+ case GST_VIDEO_FORMAT_GRAY16_LE:
+ fourcc = V4L2_PIX_FMT_Y16;
+ break;
diff --git a/dynamic-layers/gstreamer1.0/recipes-multimedia/gstreamer1.0-plugins-good_%.bbappend b/dynamic-layers/gstreamer1.0/recipes-multimedia/gstreamer1.0-plugins-good_%.bbappend
new file mode 100644
index 0000000..7c8cf5c
--- /dev/null
+++ b/dynamic-layers/gstreamer1.0/recipes-multimedia/gstreamer1.0-plugins-good_%.bbappend
@@ -0,0 +1,6 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
+
+SRC_URI += "\
+ file://grayxx.patch \
+"
+PACKAGECONFIG_append = " v4l2"