Skip to content

Commit 5723b7e

Browse files
ricardosalvetibkosuri
authored andcommitted
gstreamer1.0-plugins-base: refresh patches based on v1.28.2
Refresh local changes on top of the v1.28.2 release, which is now available in oe-core. Co-developed-by: Bala Sai Kosuri <bkosuri@qti.qualcomm.com> Signed-off-by: Bala Sai Kosuri <bkosuri@qti.qualcomm.com> Signed-off-by: Ricardo Salveti <ricardo.salveti@oss.qualcomm.com>
1 parent 0b19e96 commit 5723b7e

2 files changed

Lines changed: 116 additions & 22 deletions

File tree

recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-video-Add-support-for-NV12_Q08C-compressed-8-bit-for.patch

Lines changed: 67 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@ Subject: [PATCH] video: Add support for NV12_Q08C (compressed 8-bit) format
66
Upstream-Status: Denied [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9712]
77

88
Signed-off-by: Pratik Pachange <ppachang@qti.qualcomm.com>
9+
Signed-off-by: Bala Sai Kosuri <bkosuri@qti.qualcomm.com>
910
---
10-
gst-libs/gst/video/video-format.c | 23 ++++++++++++++++++++++
11-
gst-libs/gst/video/video-format.h | 10 +++++++++-
12-
gst-libs/gst/video/video-info.c | 32 +++++++++++++++++++++++++++++++
13-
gst-libs/gst/video/video-scaler.c | 1 +
14-
tests/check/libs/video.c | 4 ++++
15-
5 files changed, 69 insertions(+), 1 deletion(-)
11+
gst-libs/gst/video/video-format.c | 23 +++++++++++++++++++++
12+
gst-libs/gst/video/video-format.h | 10 ++++++++-
13+
gst-libs/gst/video/video-info-dma.c | 1 +
14+
gst-libs/gst/video/video-info.c | 32 +++++++++++++++++++++++++++++
15+
gst-libs/gst/video/video-scaler.c | 1 +
16+
tests/check/elements/videoconvert.c | 3 +++
17+
tests/check/elements/videoscale.c | 1 +
18+
tests/check/libs/video.c | 8 ++++++--
19+
8 files changed, 76 insertions(+), 3 deletions(-)
1620

1721
diff --git a/gst-libs/gst/video/video-format.c b/gst-libs/gst/video/video-format.c
1822
index 9bd9c69..b28abc3 100644
@@ -44,9 +48,9 @@ index 9bd9c69..b28abc3 100644
4448
static void
4549
unpack_AV12 (const GstVideoFormatInfo * info, GstVideoPackFlags flags,
4650
@@ -8108,6 +8126,9 @@ static const VideoFormat formats[] = {
47-
PSTR8888, PLANE0, OFFS0, SUB4444, PACK_Y416_BE),
48-
MAKE_GRAY_LE_FORMAT (GRAY10_LE16, "raw video", DPTH10, PSTR2, PLANE0, OFFS0,
49-
SUB4, PACK_GRAY10_LE16),
51+
PLANE0, OFFS0, SUB4444, PACK_BGR10A2_LE),
52+
MAKE_RGB_LE_FORMAT (RGB10x2_LE, "raw video", DPTH10_10_10, PSTR444,
53+
PLANE0, OFFS0, SUB4444, PACK_RGB10A2_LE),
5054
+ MAKE_YUV_FORMAT (NV12_Q08C, "raw video",
5155
+ GST_MAKE_FOURCC ('Q', '0', '8', 'C'), DPTH888, PSTR122, PLANE011,
5256
+ OFFS001, SUB420, PACK_NV12_Q08C),
@@ -67,16 +71,16 @@ index b59ec38..6593f8a 100644
6771
--- a/gst-libs/gst/video/video-format.h
6872
+++ b/gst-libs/gst/video/video-format.h
6973
@@ -174,6 +174,7 @@ G_BEGIN_DECLS
70-
* @GST_VIDEO_FORMAT_Y416_LE: packed 4:4:4:4 YUV, 16 bits per channel(U-Y-V-A) (Since: 1.26)
71-
* @GST_VIDEO_FORMAT_Y416_BE: packed 4:4:4:4 YUV, 16 bits per channel(U-Y-V-A) (Since: 1.26)
72-
* @GST_VIDEO_FORMAT_GRAY10_LE16: 10-bit grayscale, packed into 16bit words (6 bits padding) (Since: 1.26)
74+
* @GST_VIDEO_FORMAT_NV16_10LE40: Fully packed variant of NV16_10LE32 (Since: 1.28)
75+
* @GST_VIDEO_FORMAT_BGR10x2_LE: packed 4:4:4 RGB (B-G-R-x), 10 bits for R/G/B channel and MSB 2 bits for padding (Since: 1.28)
76+
* @GST_VIDEO_FORMAT_RGB10x2_LE: packed 4:4:4 RGB (R-G-B-x), 10 bits for R/G/B channel and MSB 2 bits for padding (Since: 1.28)
7377
+ * @GST_VIDEO_FORMAT_NV12_Q08C: Qualcomm NV12 8bit compressed format
7478
*
7579
* Enum value describing the most common video formats.
7680
*
7781
@@ -670,6 +671,13 @@ typedef enum {
7882
*/
79-
GST_VIDEO_FORMAT_GRAY10_LE16,
83+
GST_VIDEO_FORMAT_RGB10x2_LE,
8084

8185
+ /**
8286
+ * GST_VIDEO_FORMAT_NV12_Q08C:
@@ -92,11 +96,23 @@ index b59ec38..6593f8a 100644
9296
*
9397
* Since: 1.26
9498
*/
95-
-#define GST_VIDEO_FORMAT_LAST (GST_VIDEO_FORMAT_GRAY10_LE16 + 1)
99+
-#define GST_VIDEO_FORMAT_LAST (GST_VIDEO_FORMAT_RGB10x2_LE + 1)
96100
+#define GST_VIDEO_FORMAT_LAST (GST_VIDEO_FORMAT_NV12_Q08C + 1)
97101

98102
#define GST_VIDEO_MAX_PLANES 4
99103
#define GST_VIDEO_MAX_COMPONENTS 4
104+
diff --git a/gst-libs/gst/video/video-info-dma.c b/gst-libs/gst/video/video-info-dma.c
105+
index 16c1cff..4a2c486 100644
106+
--- a/gst-libs/gst/video/video-info-dma.c
107+
+++ b/gst-libs/gst/video/video-info-dma.c
108+
@@ -596,6 +596,7 @@ static const struct FormatMap
109+
{GST_VIDEO_FORMAT_GRAY16_BE, DRM_FORMAT_R16 | DRM_FORMAT_BIG_ENDIAN, DRM_FORMAT_MOD_LINEAR},
110+
{GST_VIDEO_FORMAT_NV16_10LE40, DRM_FORMAT_NV20, DRM_FORMAT_MOD_LINEAR},
111+
{GST_VIDEO_FORMAT_P016_LE, DRM_FORMAT_P016, DRM_FORMAT_MOD_LINEAR},
112+
+ {GST_VIDEO_FORMAT_NV12_Q08C, DRM_FORMAT_NV12, DRM_FORMAT_MOD_QCOM_COMPRESSED},
113+
};
114+
/* *INDENT-ON* */
115+
100116
diff --git a/gst-libs/gst/video/video-info.c b/gst-libs/gst/video/video-info.c
101117
index 04d52b0..f86b9b3 100644
102118
--- a/gst-libs/gst/video/video-info.c
@@ -152,10 +168,47 @@ index d645087..0fa9e3d 100644
152168
*bits = 8;
153169
*n_elems = 2;
154170
break;
171+
diff --git a/tests/check/elements/videoconvert.c b/tests/check/elements/videoconvert.c
172+
index 420564a..4668a9b 100644
173+
--- a/tests/check/elements/videoconvert.c
174+
+++ b/tests/check/elements/videoconvert.c
175+
@@ -76,6 +76,9 @@ check_pad_template (GstPadTemplate * tmpl)
176+
if (i == GST_VIDEO_FORMAT_DMA_DRM)
177+
continue;
178+
179+
+ if (i == GST_VIDEO_FORMAT_NV12_Q08C)
180+
+ continue;
181+
+
182+
if (!formats_supported[i]) {
183+
g_error ("videoconvert doesn't support format '%s'",
184+
gst_video_format_to_string ((GstVideoFormat) i));
185+
diff --git a/tests/check/elements/videoscale.c b/tests/check/elements/videoscale.c
186+
index b2297cb..5edca5a 100644
187+
--- a/tests/check/elements/videoscale.c
188+
+++ b/tests/check/elements/videoscale.c
189+
@@ -122,6 +122,7 @@ check_pad_template (GstPadTemplate * tmpl)
190+
case GST_VIDEO_FORMAT_DMA_DRM:
191+
case GST_VIDEO_FORMAT_MT2110T:
192+
case GST_VIDEO_FORMAT_MT2110R:
193+
+ case GST_VIDEO_FORMAT_NV12_Q08C:
194+
GST_LOG ("Ignoring lack of support for format %s", fmt_str);
195+
break;
196+
default:
155197
diff --git a/tests/check/libs/video.c b/tests/check/libs/video.c
156198
index 78a1786..5f8af9d 100644
157199
--- a/tests/check/libs/video.c
158200
+++ b/tests/check/libs/video.c
201+
@@ -389,8 +389,8 @@ GST_START_TEST (test_video_formats_all)
202+
fail_if (gst_video_format_from_string (fmt_str) ==
203+
GST_VIDEO_FORMAT_UNKNOWN);
204+
}
205+
- /* Take into account GST_VIDEO_FORMAT_ENCODED, UNKNOWN and DMA_DRM. */
206+
- fail_unless_equals_int (num, GST_VIDEO_FORMAT_LAST - 3);
207+
+ /* Take into account GST_VIDEO_FORMAT_ENCODED, UNKNOWN, DMA_DRM and NV12_Q08C */
208+
+ fail_unless_equals_int (num, GST_VIDEO_FORMAT_LAST - 4);
209+
210+
gst_caps_unref (caps);
211+
}
159212
@@ -2185,6 +2185,9 @@ GST_START_TEST (test_video_pack_unpack2)
160213
if (format == GST_VIDEO_FORMAT_DMA_DRM)
161214
continue;

recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-video-Add-support-for-NV12_Q10LE32C-compressed-10-bi.patch

Lines changed: 49 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,15 @@ Subject: [PATCH] video: Add support for NV12_Q10LE32C (compressed 10-bit)
77
Upstream-Status: Denied [Same reason as 8-bit compressed format, https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9712]
88

99
Signed-off-by: Hui Liu <huliu@qti.qualcomm.com>
10+
Signed-off-by: Bala Sai Kosuri <bkosuri@qti.qualcomm.com>
1011
---
11-
gst-libs/gst/video/video-format.c | 23 +++++++++++++++++++++
12-
gst-libs/gst/video/video-format.h | 10 ++++++++-
13-
gst-libs/gst/video/video-info.c | 34 +++++++++++++++++++++++++++++++
14-
tests/check/libs/video.c | 4 ++++
15-
4 files changed, 70 insertions(+), 1 deletion(-)
12+
gst-libs/gst/video/video-format.c | 23 +++++++++++++++++++
13+
gst-libs/gst/video/video-format.h | 10 ++++++++-
14+
gst-libs/gst/video/video-info.c | 34 +++++++++++++++++++++++++++++
15+
tests/check/elements/videoconvert.c | 3 +++
16+
tests/check/elements/videoscale.c | 1 +
17+
tests/check/libs/video.c | 9 ++++++--
18+
6 files changed, 77 insertions(+), 3 deletions(-)
1619

1720
diff --git a/gst-libs/gst/video/video-format.c b/gst-libs/gst/video/video-format.c
1821
index b28abc3..61a9912 100644
@@ -67,10 +70,10 @@ index 6593f8a..6c4d61d 100644
6770
--- a/gst-libs/gst/video/video-format.h
6871
+++ b/gst-libs/gst/video/video-format.h
6972
@@ -175,6 +175,7 @@ G_BEGIN_DECLS
70-
* @GST_VIDEO_FORMAT_Y416_BE: packed 4:4:4:4 YUV, 16 bits per channel(U-Y-V-A) (Since: 1.26)
71-
* @GST_VIDEO_FORMAT_GRAY10_LE16: 10-bit grayscale, packed into 16bit words (6 bits padding) (Since: 1.26)
73+
* @GST_VIDEO_FORMAT_BGR10x2_LE: packed 4:4:4 RGB (B-G-R-x), 10 bits for R/G/B channel and MSB 2 bits for padding (Since: 1.28)
74+
* @GST_VIDEO_FORMAT_RGB10x2_LE: packed 4:4:4 RGB (R-G-B-x), 10 bits for R/G/B channel and MSB 2 bits for padding (Since: 1.28)
7275
* @GST_VIDEO_FORMAT_NV12_Q08C: Qualcomm NV12 8bit compressed format
73-
+ * @GST_VIDEO_FORMAT_NV12_Q10LE32C: Qualcomm NV12 10-bit compressed format.
76+
+ * @GST_VIDEO_FORMAT_NV12_Q10LE32C: Qualcomm NV12 10bit compressed format
7477
*
7578
* Enum value describing the most common video formats.
7679
*
@@ -142,10 +145,48 @@ index f86b9b3..0e31528 100644
142145
case GST_VIDEO_FORMAT_ENCODED:
143146
case GST_VIDEO_FORMAT_DMA_DRM:
144147
break;
148+
diff --git a/tests/check/elements/videoconvert.c b/tests/check/elements/videoconvert.c
149+
index 4668a9b..a600e8b 100644
150+
--- a/tests/check/elements/videoconvert.c
151+
+++ b/tests/check/elements/videoconvert.c
152+
@@ -79,6 +79,9 @@ check_pad_template (GstPadTemplate * tmpl)
153+
if (i == GST_VIDEO_FORMAT_NV12_Q08C)
154+
continue;
155+
156+
+ if (i == GST_VIDEO_FORMAT_NV12_Q10LE32C)
157+
+ continue;
158+
+
159+
if (!formats_supported[i]) {
160+
g_error ("videoconvert doesn't support format '%s'",
161+
gst_video_format_to_string ((GstVideoFormat) i));
162+
diff --git a/tests/check/elements/videoscale.c b/tests/check/elements/videoscale.c
163+
index 5edca5a..4d6bbbb 100644
164+
--- a/tests/check/elements/videoscale.c
165+
+++ b/tests/check/elements/videoscale.c
166+
@@ -123,6 +123,7 @@ check_pad_template (GstPadTemplate * tmpl)
167+
case GST_VIDEO_FORMAT_MT2110T:
168+
case GST_VIDEO_FORMAT_MT2110R:
169+
case GST_VIDEO_FORMAT_NV12_Q08C:
170+
+ case GST_VIDEO_FORMAT_NV12_Q10LE32C:
171+
GST_LOG ("Ignoring lack of support for format %s", fmt_str);
172+
break;
173+
default:
145174
diff --git a/tests/check/libs/video.c b/tests/check/libs/video.c
146175
index 5f8af9d..dd3d696 100644
147176
--- a/tests/check/libs/video.c
148177
+++ b/tests/check/libs/video.c
178+
@@ -389,8 +389,9 @@ GST_START_TEST (test_video_formats_all)
179+
fail_if (gst_video_format_from_string (fmt_str) ==
180+
GST_VIDEO_FORMAT_UNKNOWN);
181+
}
182+
- /* Take into account GST_VIDEO_FORMAT_ENCODED, UNKNOWN, DMA_DRM and NV12_Q08C */
183+
- fail_unless_equals_int (num, GST_VIDEO_FORMAT_LAST - 4);
184+
+ /* Take into account GST_VIDEO_FORMAT_ENCODED, UNKNOWN, DMA_DRM, NV12_Q08C
185+
+ * and NV12_Q10LE32C. */
186+
+ fail_unless_equals_int (num, GST_VIDEO_FORMAT_LAST - 5);
187+
188+
gst_caps_unref (caps);
189+
}
149190
@@ -2188,6 +2188,9 @@ GST_START_TEST (test_video_pack_unpack2)
150191
if (format == GST_VIDEO_FORMAT_NV12_Q08C)
151192
continue;

0 commit comments

Comments
 (0)