Signed-off-by: Robert Schwebel <[email protected]> --- .../0002--remove-endianness-swapping.patch | 45 -------- .../0003--add-rgb666-support.patch | 52 --------- .../bayer2rgb_configurable_first_line.diff | 120 -------------------- patches/gst-plugins-bad-0.10.17/series | 3 - .../0002--remove-endianness-swapping.patch | 42 +++++++ .../0003--add-rgb666-support.patch | 49 ++++++++ .../bayer2rgb_configurable_first_line.diff | 120 ++++++++++++++++++++ patches/gst-plugins-bad-0.10.19/series | 3 + rules/gst-plugins-bad.make | 2 +- 9 files changed, 215 insertions(+), 221 deletions(-) delete mode 100644 patches/gst-plugins-bad-0.10.17/0002--remove-endianness-swapping.patch delete mode 100644 patches/gst-plugins-bad-0.10.17/0003--add-rgb666-support.patch delete mode 100644 patches/gst-plugins-bad-0.10.17/bayer2rgb_configurable_first_line.diff delete mode 100644 patches/gst-plugins-bad-0.10.17/series create mode 100644 patches/gst-plugins-bad-0.10.19/0002--remove-endianness-swapping.patch create mode 100644 patches/gst-plugins-bad-0.10.19/0003--add-rgb666-support.patch create mode 100644 patches/gst-plugins-bad-0.10.19/bayer2rgb_configurable_first_line.diff create mode 100644 patches/gst-plugins-bad-0.10.19/series
diff --git a/patches/gst-plugins-bad-0.10.17/0002--remove-endianness-swapping.patch b/patches/gst-plugins-bad-0.10.17/0002--remove-endianness-swapping.patch deleted file mode 100644 index 154950e..0000000 --- a/patches/gst-plugins-bad-0.10.17/0002--remove-endianness-swapping.patch +++ /dev/null @@ -1,45 +0,0 @@ -From: Luotao Fu <[email protected]> -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 <[email protected]> ---- - 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.17/0003--add-rgb666-support.patch b/patches/gst-plugins-bad-0.10.17/0003--add-rgb666-support.patch deleted file mode 100644 index bb6eb67..0000000 --- a/patches/gst-plugins-bad-0.10.17/0003--add-rgb666-support.patch +++ /dev/null @@ -1,52 +0,0 @@ -From: Luotao Fu <[email protected]> -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 <[email protected]> ---- - 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.17/bayer2rgb_configurable_first_line.diff b/patches/gst-plugins-bad-0.10.17/bayer2rgb_configurable_first_line.diff deleted file mode 100644 index 9c78670..0000000 --- a/patches/gst-plugins-bad-0.10.17/bayer2rgb_configurable_first_line.diff +++ /dev/null @@ -1,120 +0,0 @@ -Subject: gst-plugins-bad bayer2rgb: Make first line configurable -From: Sascha Hauer <[email protected]> - -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 <[email protected]> - ---- - 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.17/series b/patches/gst-plugins-bad-0.10.17/series deleted file mode 100644 index accdfb0..0000000 --- a/patches/gst-plugins-bad-0.10.17/series +++ /dev/null @@ -1,3 +0,0 @@ -bayer2rgb_configurable_first_line.diff -0002--remove-endianness-swapping.patch -p0 -0003--add-rgb666-support.patch -p0 diff --git a/patches/gst-plugins-bad-0.10.19/0002--remove-endianness-swapping.patch b/patches/gst-plugins-bad-0.10.19/0002--remove-endianness-swapping.patch new file mode 100644 index 0000000..d97514f --- /dev/null +++ b/patches/gst-plugins-bad-0.10.19/0002--remove-endianness-swapping.patch @@ -0,0 +1,42 @@ +From: Luotao Fu <[email protected]> +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 <[email protected]> +--- + sys/fbdev/gstfbdevsink.c | 14 +------------- + 1 files changed, 1 insertions(+), 13 deletions(-) + +Index: sys/fbdev/gstfbdevsink.c +=================================================================== +--- sys/fbdev/gstfbdevsink.c.orig ++++ sys/fbdev/gstfbdevsink.c +@@ -153,21 +153,9 @@ gst_fbdevsink_getcaps (GstBaseSink * bsi + + 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; diff --git a/patches/gst-plugins-bad-0.10.19/0003--add-rgb666-support.patch b/patches/gst-plugins-bad-0.10.19/0003--add-rgb666-support.patch new file mode 100644 index 0000000..453ed37 --- /dev/null +++ b/patches/gst-plugins-bad-0.10.19/0003--add-rgb666-support.patch @@ -0,0 +1,49 @@ +From: Luotao Fu <[email protected]> +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 <[email protected]> +--- + sys/fbdev/gstfbdevsink.c | 19 +++++++++++++++++++ + 1 files changed, 19 insertions(+), 0 deletions(-) + +Index: sys/fbdev/gstfbdevsink.c +=================================================================== +--- sys/fbdev/gstfbdevsink.c.orig ++++ sys/fbdev/gstfbdevsink.c +@@ -69,9 +69,28 @@ static GstCaps *gst_fbdevsink_getcaps (G + + 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 \ diff --git a/patches/gst-plugins-bad-0.10.19/bayer2rgb_configurable_first_line.diff b/patches/gst-plugins-bad-0.10.19/bayer2rgb_configurable_first_line.diff new file mode 100644 index 0000000..c4c71f7 --- /dev/null +++ b/patches/gst-plugins-bad-0.10.19/bayer2rgb_configurable_first_line.diff @@ -0,0 +1,120 @@ +Subject: gst-plugins-bad bayer2rgb: Make first line configurable +From: Sascha Hauer <[email protected]> + +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 <[email protected]> + +--- + gst/bayer/gstbayer2rgb.c | 36 +++++++++++++++++++++++++++--------- + 1 file changed, 27 insertions(+), 9 deletions(-) + +Index: gst-plugins-bad-0.10.19/gst/bayer/gstbayer2rgb.c +=================================================================== +--- gst-plugins-bad-0.10.19.orig/gst/bayer/gstbayer2rgb.c ++++ gst-plugins-bad-0.10.19/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 +@@ -132,7 +133,8 @@ struct _GstBayer2RGBClass + + enum + { +- PROP_0 ++ PROP_0, ++ PROP_BGFIRST, + }; + + #define DEBUG_INIT(bla) \ +@@ -193,6 +195,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 +@@ -207,8 +216,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; +@@ -219,8 +232,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; +@@ -289,6 +306,7 @@ gst_bayer2rgb_reset (GstBayer2RGB * filt + filter->r_off = 0; + filter->g_off = 0; + filter->b_off = 0; ++ filter->bg_first = 1; + } + + static GstCaps * +@@ -466,19 +484,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); + } + +@@ -564,9 +582,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.19/series b/patches/gst-plugins-bad-0.10.19/series new file mode 100644 index 0000000..accdfb0 --- /dev/null +++ b/patches/gst-plugins-bad-0.10.19/series @@ -0,0 +1,3 @@ +bayer2rgb_configurable_first_line.diff +0002--remove-endianness-swapping.patch -p0 +0003--add-rgb666-support.patch -p0 diff --git a/rules/gst-plugins-bad.make b/rules/gst-plugins-bad.make index 8a80820..d6ac9e0 100644 --- a/rules/gst-plugins-bad.make +++ b/rules/gst-plugins-bad.make @@ -17,7 +17,7 @@ PACKAGES-$(PTXCONF_GST_PLUGINS_BAD) += gst-plugins-bad # # Paths and names # -GST_PLUGINS_BAD_VERSION := 0.10.17 +GST_PLUGINS_BAD_VERSION := 0.10.19 GST_PLUGINS_BAD := gst-plugins-bad-$(GST_PLUGINS_BAD_VERSION) GST_PLUGINS_BAD_SUFFIX := tar.bz2 GST_PLUGINS_BAD_URL := http://gstreamer.freedesktop.org/src/gst-plugins-bad/$(GST_PLUGINS_BAD).$(GST_PLUGINS_BAD_SUFFIX) -- 1.7.1 -- ptxdist mailing list [email protected]
