summaryrefslogtreecommitdiffstats
path: root/patches/gst-plugins-bad-0.10.10
diff options
context:
space:
mode:
authorLuotao Fu <l.fu@pengutronix.de>2009-02-20 14:04:47 +0000
committerLuotao Fu <l.fu@pengutronix.de>2009-02-20 14:04:47 +0000
commit1fd50ec7a44dec9c6174c3a96a469ca19e908b85 (patch)
treefc8e7ea6dfea1eef0042e67d4cf9c0294c0a2911 /patches/gst-plugins-bad-0.10.10
parentfac6d57db4b2ea14dcc843ab24359dfcdc33a949 (diff)
downloadptxdist-1fd50ec7a44dec9c6174c3a96a469ca19e908b85.tar.gz
ptxdist-1fd50ec7a44dec9c6174c3a96a469ca19e908b85.tar.xz
* GStreamer plugins version bump
* port rgb666 support back from Phytec BSP * remove obsolete patchstacks and already mainlined patches git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@9799 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'patches/gst-plugins-bad-0.10.10')
-rw-r--r--patches/gst-plugins-bad-0.10.10/generic/0002--remove-endianness-swapping.patch45
-rw-r--r--patches/gst-plugins-bad-0.10.10/generic/0003--add-rgb666-support.patch52
-rw-r--r--patches/gst-plugins-bad-0.10.10/generic/bayer2rgb_configurable_first_line.diff120
-rw-r--r--patches/gst-plugins-bad-0.10.10/generic/series3
4 files changed, 220 insertions, 0 deletions
diff --git a/patches/gst-plugins-bad-0.10.10/generic/0002--remove-endianness-swapping.patch b/patches/gst-plugins-bad-0.10.10/generic/0002--remove-endianness-swapping.patch
new file mode 100644
index 000000000..154950eb0
--- /dev/null
+++ b/patches/gst-plugins-bad-0.10.10/generic/0002--remove-endianness-swapping.patch
@@ -0,0 +1,45 @@
+From: Luotao Fu <lfu@pengutronix.de>
+Date: Thu, 11 Dec 2008 11:57:48 +0100
+Subject: [PATCH] remove endianness swapping
+
+ Swapping r- g- and bmask here is weird. It turns i.E. RGB888 to BGR888. For
+ formats like RGB666 it turns the mask into a mess. Seems that gstreamer
+ treat all True color as Big Endian. Still I doubt that it makes sense to
+ swap the masks. I'm however not quite sure about this, comments are highly
+ welcome.
+
+Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
+---
+ sys/fbdev/gstfbdevsink.c | 14 +-------------
+ 1 files changed, 1 insertions(+), 13 deletions(-)
+
+diff --git a/sys/fbdev/gstfbdevsink.c b/sys/fbdev/gstfbdevsink.c
+index c9a7e14..c01e5b6 100644
+--- sys/fbdev/gstfbdevsink.c
++++ sys/fbdev/gstfbdevsink.c
+@@ -158,21 +158,9 @@ gst_fbdevsink_getcaps (GstBaseSink * bsink)
+
+ switch (fbdevsink->varinfo.bits_per_pixel) {
+ case 32:
+- /* swap endian of masks */
+- rmask = swapendian (rmask);
+- gmask = swapendian (gmask);
+- bmask = swapendian (bmask);
++ case 24:
+ endianness = 4321;
+ break;
+- case 24:{
+- /* swap red and blue masks */
+- uint32_t t = rmask;
+-
+- rmask = bmask;
+- bmask = t;
+- endianness = 4321;
+- break;
+- }
+ case 15:
+ case 16:
+ endianness = 1234;
+--
+1.5.6.5
+
diff --git a/patches/gst-plugins-bad-0.10.10/generic/0003--add-rgb666-support.patch b/patches/gst-plugins-bad-0.10.10/generic/0003--add-rgb666-support.patch
new file mode 100644
index 000000000..bb6eb67fb
--- /dev/null
+++ b/patches/gst-plugins-bad-0.10.10/generic/0003--add-rgb666-support.patch
@@ -0,0 +1,52 @@
+From: Luotao Fu <lfu@pengutronix.de>
+Date: Thu, 11 Dec 2008 12:03:59 +0100
+Subject: [PATCH] add rgb666 support
+
+ This one adds support for rgb666 to fbdevsink. It's an exotic format, but still
+ can be found on especially some embedded devices. The Modelines are taken
+ directly from video.h of the video plugin, which is included by gstdevsink.
+ It'd probably be cleaner to split this in a separate patch for plugins-base.
+ I put the stuffs together for now for easier review. Patches for some sources
+ with rgb666 capability are coming soon.
+
+Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
+---
+ sys/fbdev/gstfbdevsink.c | 19 +++++++++++++++++++
+ 1 files changed, 19 insertions(+), 0 deletions(-)
+
+diff --git a/sys/fbdev/gstfbdevsink.c b/sys/fbdev/gstfbdevsink.c
+index c01e5b6..e764c5e 100644
+--- sys/fbdev/gstfbdevsink.c
++++ sys/fbdev/gstfbdevsink.c
+@@ -76,9 +76,28 @@ static GstCaps *gst_fbdevsink_getcaps (GstBaseSink * bsink);
+
+ static GstVideoSinkClass *parent_class = NULL;
+
++#define GST_VIDEO_BYTE1_MASK_18 "0x0003F000"
++#define GST_VIDEO_BYTE2_MASK_18 "0x00000FC0"
++#define GST_VIDEO_BYTE3_MASK_18 "0x0000003F"
++#define __GST_VIDEO_CAPS_MAKE_18(R, G, B) \
++ "video/x-raw-rgb, " \
++ "bpp = (int) 32, " \
++ "depth = (int) 18, " \
++ "endianness = (int) BIG_ENDIAN, " \
++ "red_mask = (int) " GST_VIDEO_BYTE ## R ## _MASK_18 ", " \
++ "green_mask = (int) " GST_VIDEO_BYTE ## G ## _MASK_18 ", " \
++ "blue_mask = (int) " GST_VIDEO_BYTE ## B ## _MASK_18 ", " \
++ "width = " GST_VIDEO_SIZE_RANGE ", " \
++ "height = " GST_VIDEO_SIZE_RANGE ", " \
++ "framerate = " GST_VIDEO_FPS_RANGE
++
++#define GST_VIDEO_CAPS_RGB666 \
++ __GST_VIDEO_CAPS_MAKE_18 (1, 2, 3)
++
+ #define GST_FBDEV_TEMPLATE_CAPS \
+ GST_VIDEO_CAPS_RGB_15 \
+ ";" GST_VIDEO_CAPS_RGB_16 \
++ ";" GST_VIDEO_CAPS_RGB666 \
+ ";" GST_VIDEO_CAPS_BGR \
+ ";" GST_VIDEO_CAPS_BGRx \
+ ";" GST_VIDEO_CAPS_xBGR \
+--
+1.5.6.5
+
diff --git a/patches/gst-plugins-bad-0.10.10/generic/bayer2rgb_configurable_first_line.diff b/patches/gst-plugins-bad-0.10.10/generic/bayer2rgb_configurable_first_line.diff
new file mode 100644
index 000000000..9c786700a
--- /dev/null
+++ b/patches/gst-plugins-bad-0.10.10/generic/bayer2rgb_configurable_first_line.diff
@@ -0,0 +1,120 @@
+Subject: gst-plugins-bad bayer2rgb: Make first line configurable
+From: Sascha Hauer <s.hauer@pengutronix.de>
+
+Since people can't agree whether the first line of a bayer pattern
+is a blue/green line or a green/red line make it configurable.
+
+Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
+
+---
+ gst/bayer/gstbayer2rgb.c | 36 +++++++++++++++++++++++++++---------
+ 1 file changed, 27 insertions(+), 9 deletions(-)
+
+Index: gst-plugins-bad-0.10.8/gst/bayer/gstbayer2rgb.c
+===================================================================
+--- gst-plugins-bad-0.10.8.orig/gst/bayer/gstbayer2rgb.c
++++ gst-plugins-bad-0.10.8/gst/bayer/gstbayer2rgb.c
+@@ -108,6 +108,7 @@ struct _GstBayer2RGB
+ int r_off; /* offset for red */
+ int g_off; /* offset for green */
+ int b_off; /* offset for blue */
++ gboolean bg_first; /* first line is blue/green */
+ };
+
+ struct _GstBayer2RGBClass
+@@ -138,7 +139,8 @@ GST_ELEMENT_DETAILS ("Bayer to RGB decod
+
+ enum
+ {
+- PROP_0
++ PROP_0,
++ PROP_BGFIRST,
+ };
+
+ #define DEBUG_INIT(bla) \
+@@ -195,6 +197,13 @@ gst_bayer2rgb_class_init (GstBayer2RGBCl
+ GST_DEBUG_FUNCPTR (gst_bayer2rgb_set_caps);
+ GST_BASE_TRANSFORM_CLASS (klass)->transform =
+ GST_DEBUG_FUNCPTR (gst_bayer2rgb_transform);
++
++ g_object_class_install_property(gobject_class, PROP_BGFIRST,
++ g_param_spec_boolean("bg_first",
++ "B/G first",
++ "First line is a blue/green line",
++ TRUE,
++ G_PARAM_READWRITE));
+ }
+
+ static void
+@@ -209,8 +218,12 @@ static void
+ gst_bayer2rgb_set_property (GObject * object, guint prop_id,
+ const GValue * value, GParamSpec * pspec)
+ {
++ GstBayer2RGB *filter = GST_BAYER2RGB (object);
+
+ switch (prop_id) {
++ case PROP_BGFIRST:
++ filter->bg_first = g_value_get_boolean(value);
++ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+@@ -221,8 +234,12 @@ static void
+ gst_bayer2rgb_get_property (GObject * object, guint prop_id,
+ GValue * value, GParamSpec * pspec)
+ {
++ GstBayer2RGB *filter = GST_BAYER2RGB (object);
+
+ switch (prop_id) {
++ case PROP_BGFIRST:
++ g_value_set_boolean(value, filter->bg_first);
++ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+@@ -291,6 +308,7 @@ gst_bayer2rgb_reset (GstBayer2RGB * filt
+ filter->r_off = 0;
+ filter->g_off = 0;
+ filter->b_off = 0;
++ filter->bg_first = 1;
+ }
+
+ static GstCaps *
+@@ -468,19 +486,19 @@ do_row0_col0 (uint8_t * input, uint8_t *
+ int type;
+
+ /* Horizontal edges */
+- hborder (input, output, 0, GREENB, filter);
++ hborder (input, output, 0, filter->bg_first ? GREENB : RED, filter);
+ if (filter->height & 1)
+- type = GREENB; /* odd # rows, "bottom" edge same as top */
++ type = filter->bg_first ? GREENB : RED; /* odd # rows, "bottom" edge same as top */
+ else
+- type = RED; /* even #, bottom side different */
++ type = filter->bg_first ? RED : GREENB; /* even #, bottom side different */
+ hborder (input, output, 1, type, filter);
+
+ /* Vertical edges */
+- vborder (input, output, 0, GREENR, filter);
++ vborder (input, output, 0, filter->bg_first ? GREENR : BLUE, filter);
+ if (filter->width & 1)
+- type = GREENR; /* odd # cols, "right" edge same as left */
++ type = filter->bg_first ? GREENR : BLUE; /* odd # cols, "right" edge same as left */
+ else
+- type = RED; /* even #, right side different */
++ type = filter->bg_first ? RED : GREENB; /* even #, right side different */
+ vborder (input, output, 1, type, filter);
+ }
+
+@@ -565,9 +583,9 @@ do_body (uint8_t * input, uint8_t * outp
+ * be RED for odd-numbered rows and GREENB for even rows.
+ */
+ if (h & 1)
+- type = RED;
++ type = filter->bg_first ? RED : GREENB;
+ else
+- type = GREENB;
++ type = filter->bg_first ? GREENB : RED;
+ /* Calculate the starting position for the row */
+ op = h * filter->width * filter->pixsize; /* output (converted) pos */
+ ip = h * filter->stride; /* input (bayer data) pos */
diff --git a/patches/gst-plugins-bad-0.10.10/generic/series b/patches/gst-plugins-bad-0.10.10/generic/series
new file mode 100644
index 000000000..accdfb0d1
--- /dev/null
+++ b/patches/gst-plugins-bad-0.10.10/generic/series
@@ -0,0 +1,3 @@
+bayer2rgb_configurable_first_line.diff
+0002--remove-endianness-swapping.patch -p0
+0003--add-rgb666-support.patch -p0