summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2011-08-21 11:11:08 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2011-08-21 11:12:04 +0200
commit2295142d248c8bdedd72903abbef76a3895020c8 (patch)
treef0f366ec1ba299576742cd8c1f66fd185d34a265
parent10b9b19ced20b50aab2205d36e53a9071e55f6cf (diff)
downloadptxdist-2295142d248c8bdedd72903abbef76a3895020c8.tar.gz
ptxdist-2295142d248c8bdedd72903abbef76a3895020c8.tar.xz
gst-plugins-base: add patch to fix building
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--patches/gst-plugins-base-0.10.35/0001-added-RGB666-Support-to-ffmpegcolorspace.patch (renamed from patches/gst-plugins-base-0.10.35/add-RGB666-Support-to-ffmpegcolorspace.patch)184
-rw-r--r--patches/gst-plugins-base-0.10.35/0002-fix-building-test-program.patch24
-rw-r--r--patches/gst-plugins-base-0.10.35/add-rgb666-support-to-videotestsrc.patch82
l---------patches/gst-plugins-base-0.10.35/autogen.sh1
-rw-r--r--patches/gst-plugins-base-0.10.35/series6
5 files changed, 122 insertions, 175 deletions
diff --git a/patches/gst-plugins-base-0.10.35/add-RGB666-Support-to-ffmpegcolorspace.patch b/patches/gst-plugins-base-0.10.35/0001-added-RGB666-Support-to-ffmpegcolorspace.patch
index 7e3bd7132..7931db767 100644
--- a/patches/gst-plugins-base-0.10.35/add-RGB666-Support-to-ffmpegcolorspace.patch
+++ b/patches/gst-plugins-base-0.10.35/0001-added-RGB666-Support-to-ffmpegcolorspace.patch
@@ -7,15 +7,15 @@ Still very hacky, need to be enhanced before submitting to mainline
Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
---
- gst/ffmpegcolorspace/avcodec.h | 1
+ gst/ffmpegcolorspace/avcodec.h | 1 +
gst/ffmpegcolorspace/gstffmpegcodecmap.c | 26 ++++++++++-
- gst/ffmpegcolorspace/imgconvert.c | 71 +++++++++++++++++++++++++++++--
+ gst/ffmpegcolorspace/imgconvert.c | 71 ++++++++++++++++++++++++++++--
3 files changed, 91 insertions(+), 7 deletions(-)
-Index: gst/ffmpegcolorspace/avcodec.h
-===================================================================
---- gst/ffmpegcolorspace/avcodec.h.orig
-+++ gst/ffmpegcolorspace/avcodec.h
+diff --git a/gst/ffmpegcolorspace/avcodec.h b/gst/ffmpegcolorspace/avcodec.h
+index 57f551c..3d06101 100644
+--- a/gst/ffmpegcolorspace/avcodec.h
++++ b/gst/ffmpegcolorspace/avcodec.h
@@ -94,6 +94,7 @@ enum PixelFormat {
PIX_FMT_AYUV4444, ///< Packed pixel, A0 Y0 Cb Cr
@@ -24,11 +24,90 @@ Index: gst/ffmpegcolorspace/avcodec.h
PIX_FMT_NB
};
-Index: gst/ffmpegcolorspace/imgconvert.c
-===================================================================
---- gst/ffmpegcolorspace/imgconvert.c.orig
-+++ gst/ffmpegcolorspace/imgconvert.c
-@@ -488,7 +488,18 @@ static PixFmtInfo pix_fmt_info[PIX_FMT_N
+diff --git a/gst/ffmpegcolorspace/gstffmpegcodecmap.c b/gst/ffmpegcolorspace/gstffmpegcodecmap.c
+index 318a90e..2015a48 100644
+--- a/gst/ffmpegcolorspace/gstffmpegcodecmap.c
++++ b/gst/ffmpegcolorspace/gstffmpegcodecmap.c
+@@ -228,6 +228,14 @@ gst_ffmpeg_pixfmt_to_caps (enum PixelFormat pix_fmt, AVCodecContext * context)
+ b_mask = 0xff000000;
+ #endif
+ break;
++ case PIX_FMT_RGB666:
++ bpp = 32;
++ depth = 18;
++ endianness = G_BIG_ENDIAN;
++ r_mask = 0x0003f000;
++ g_mask = 0x00000fc0;
++ b_mask = 0x0000003f;
++ break;
+ case PIX_FMT_BGR32:
+ bpp = 32;
+ depth = 24;
+@@ -684,7 +692,6 @@ gst_ffmpeg_caps_to_pixfmt (const GstCaps * caps,
+ }
+ } else if (gst_structure_has_name (structure, "video/x-raw-rgb")) {
+ gint bpp = 0, rmask = 0, endianness = 0, amask = 0, depth = 0;
+-
+ if (gst_structure_get_int (structure, "bpp", &bpp) &&
+ gst_structure_get_int (structure, "endianness", &endianness)) {
+ if (gst_structure_get_int (structure, "red_mask", &rmask)) {
+@@ -696,6 +703,8 @@ gst_ffmpeg_caps_to_pixfmt (const GstCaps * caps,
+ context->pix_fmt = PIX_FMT_BGRA32;
+ else if (rmask == 0x00ff0000)
+ context->pix_fmt = PIX_FMT_RGBA32;
++ else if (rmask == 0x0003f000)
++ context->pix_fmt = PIX_FMT_RGB666;
+ else if (rmask == 0xff000000)
+ context->pix_fmt = PIX_FMT_ARGB32;
+ else // if (r_mask = 0x000000ff)
+@@ -705,6 +714,11 @@ gst_ffmpeg_caps_to_pixfmt (const GstCaps * caps,
+ context->pix_fmt = PIX_FMT_BGRA32;
+ else if (rmask == 0x0000ff00)
+ context->pix_fmt = PIX_FMT_RGBA32;
++ /* XXX: Hack here, gstreamer seems not to treat endianess in a
++ * consistent way between plugins. Since we only have RGB666 for
++ * now, We have to hack it around here */
++ else if (rmask == 0x0003f000)
++ context->pix_fmt = PIX_FMT_RGB666;
+ else if (rmask == 0x000000ff)
+ context->pix_fmt = PIX_FMT_ARGB32;
+ else // if (rmask == 0xff000000)
+@@ -716,7 +730,9 @@ gst_ffmpeg_caps_to_pixfmt (const GstCaps * caps,
+ context->pix_fmt = PIX_FMT_RGB32;
+ else if (rmask == 0x0000ff00)
+ context->pix_fmt = PIX_FMT_BGR32;
+- else if (rmask == 0xff000000)
++ else if (rmask == 0x0003f000)
++ context->pix_fmt = PIX_FMT_RGB666;
++ else if (rmask == 0xff000000)
+ context->pix_fmt = PIX_FMT_xRGB32;
+ else // if (rmask == 0x000000ff)
+ context->pix_fmt = PIX_FMT_BGRx32;
+@@ -725,7 +741,10 @@ gst_ffmpeg_caps_to_pixfmt (const GstCaps * caps,
+ context->pix_fmt = PIX_FMT_RGB32;
+ else if (rmask == 0x00ff0000)
+ context->pix_fmt = PIX_FMT_BGR32;
+- else if (rmask == 0x000000ff)
++ /* XXX: Hack here, see XXX section above for more details */
++ else if (rmask == 0x0003f000)
++ context->pix_fmt = PIX_FMT_RGB666;
++ else if (rmask == 0x000000ff)
+ context->pix_fmt = PIX_FMT_xRGB32;
+ else // if (rmask == 0xff000000)
+ context->pix_fmt = PIX_FMT_BGRx32;
+@@ -922,6 +941,7 @@ gst_ffmpegcsp_avpicture_fill (AVPicture * picture,
+ picture->linesize[0] = stride;
+ return size;
+ case PIX_FMT_AYUV4444:
++ case PIX_FMT_RGB666:
+ case PIX_FMT_RGB32:
+ case PIX_FMT_RGBA32:
+ case PIX_FMT_ARGB32:
+diff --git a/gst/ffmpegcolorspace/imgconvert.c b/gst/ffmpegcolorspace/imgconvert.c
+index cb145bb..d7be2bf 100644
+--- a/gst/ffmpegcolorspace/imgconvert.c
++++ b/gst/ffmpegcolorspace/imgconvert.c
+@@ -488,7 +488,18 @@ static PixFmtInfo pix_fmt_info[PIX_FMT_NB] = {
/* .x_chroma_shift = */ 1,
/* .y_chroma_shift = */ 1,
/* .depth = */ 8,
@@ -76,7 +155,7 @@ Index: gst/ffmpegcolorspace/imgconvert.c
bits = pf->depth * pf->nb_channels;
} else {
bits = pf->depth + ((2 * pf->depth) >>
-@@ -740,7 +754,6 @@ avcodec_find_best_pix_fmt (int pix_fmt_m
+@@ -740,7 +754,6 @@ avcodec_find_best_pix_fmt (int pix_fmt_mask, int src_pix_fmt,
~FF_LOSS_DEPTH,
0,
};
@@ -205,7 +284,7 @@ Index: gst/ffmpegcolorspace/imgconvert.c
{PIX_FMT_PAL8, PIX_FMT_RGB32, pal8_to_rgb32},
{PIX_FMT_PAL8, PIX_FMT_BGR32, pal8_to_bgr32},
{PIX_FMT_PAL8, PIX_FMT_xRGB32, pal8_to_xrgb32},
-@@ -3858,6 +3918,9 @@ img_get_alpha_info (const AVPicture * sr
+@@ -3858,6 +3918,9 @@ img_get_alpha_info (const AVPicture * src, int pix_fmt, int width, int height)
case PIX_FMT_ABGR32:
ret = get_alpha_info_abgr32 (src, width, height);
break;
@@ -215,82 +294,3 @@ Index: gst/ffmpegcolorspace/imgconvert.c
case PIX_FMT_RGB555:
ret = get_alpha_info_rgb555 (src, width, height);
break;
-Index: gst/ffmpegcolorspace/gstffmpegcodecmap.c
-===================================================================
---- gst/ffmpegcolorspace/gstffmpegcodecmap.c.orig
-+++ gst/ffmpegcolorspace/gstffmpegcodecmap.c
-@@ -228,6 +228,14 @@ gst_ffmpeg_pixfmt_to_caps (enum PixelFor
- b_mask = 0xff000000;
- #endif
- break;
-+ case PIX_FMT_RGB666:
-+ bpp = 32;
-+ depth = 18;
-+ endianness = G_BIG_ENDIAN;
-+ r_mask = 0x0003f000;
-+ g_mask = 0x00000fc0;
-+ b_mask = 0x0000003f;
-+ break;
- case PIX_FMT_BGR32:
- bpp = 32;
- depth = 24;
-@@ -684,7 +692,6 @@ gst_ffmpeg_caps_to_pixfmt (const GstCaps
- }
- } else if (gst_structure_has_name (structure, "video/x-raw-rgb")) {
- gint bpp = 0, rmask = 0, endianness = 0, amask = 0, depth = 0;
--
- if (gst_structure_get_int (structure, "bpp", &bpp) &&
- gst_structure_get_int (structure, "endianness", &endianness)) {
- if (gst_structure_get_int (structure, "red_mask", &rmask)) {
-@@ -696,6 +703,8 @@ gst_ffmpeg_caps_to_pixfmt (const GstCaps
- context->pix_fmt = PIX_FMT_BGRA32;
- else if (rmask == 0x00ff0000)
- context->pix_fmt = PIX_FMT_RGBA32;
-+ else if (rmask == 0x0003f000)
-+ context->pix_fmt = PIX_FMT_RGB666;
- else if (rmask == 0xff000000)
- context->pix_fmt = PIX_FMT_ARGB32;
- else // if (r_mask = 0x000000ff)
-@@ -705,6 +714,11 @@ gst_ffmpeg_caps_to_pixfmt (const GstCaps
- context->pix_fmt = PIX_FMT_BGRA32;
- else if (rmask == 0x0000ff00)
- context->pix_fmt = PIX_FMT_RGBA32;
-+ /* XXX: Hack here, gstreamer seems not to treat endianess in a
-+ * consistent way between plugins. Since we only have RGB666 for
-+ * now, We have to hack it around here */
-+ else if (rmask == 0x0003f000)
-+ context->pix_fmt = PIX_FMT_RGB666;
- else if (rmask == 0x000000ff)
- context->pix_fmt = PIX_FMT_ARGB32;
- else // if (rmask == 0xff000000)
-@@ -716,7 +730,9 @@ gst_ffmpeg_caps_to_pixfmt (const GstCaps
- context->pix_fmt = PIX_FMT_RGB32;
- else if (rmask == 0x0000ff00)
- context->pix_fmt = PIX_FMT_BGR32;
-- else if (rmask == 0xff000000)
-+ else if (rmask == 0x0003f000)
-+ context->pix_fmt = PIX_FMT_RGB666;
-+ else if (rmask == 0xff000000)
- context->pix_fmt = PIX_FMT_xRGB32;
- else // if (rmask == 0x000000ff)
- context->pix_fmt = PIX_FMT_BGRx32;
-@@ -725,7 +741,10 @@ gst_ffmpeg_caps_to_pixfmt (const GstCaps
- context->pix_fmt = PIX_FMT_RGB32;
- else if (rmask == 0x00ff0000)
- context->pix_fmt = PIX_FMT_BGR32;
-- else if (rmask == 0x000000ff)
-+ /* XXX: Hack here, see XXX section above for more details */
-+ else if (rmask == 0x0003f000)
-+ context->pix_fmt = PIX_FMT_RGB666;
-+ else if (rmask == 0x000000ff)
- context->pix_fmt = PIX_FMT_xRGB32;
- else // if (rmask == 0xff000000)
- context->pix_fmt = PIX_FMT_BGRx32;
-@@ -922,6 +941,7 @@ gst_ffmpegcsp_avpicture_fill (AVPicture
- picture->linesize[0] = stride;
- return size;
- case PIX_FMT_AYUV4444:
-+ case PIX_FMT_RGB666:
- case PIX_FMT_RGB32:
- case PIX_FMT_RGBA32:
- case PIX_FMT_ARGB32:
diff --git a/patches/gst-plugins-base-0.10.35/0002-fix-building-test-program.patch b/patches/gst-plugins-base-0.10.35/0002-fix-building-test-program.patch
new file mode 100644
index 000000000..0d42cd821
--- /dev/null
+++ b/patches/gst-plugins-base-0.10.35/0002-fix-building-test-program.patch
@@ -0,0 +1,24 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Sun, 21 Aug 2011 11:06:40 +0200
+Subject: [PATCH] fix building test program
+
+Based on upstream changes.
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ gst-libs/gst/audio/Makefile.am | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/gst-libs/gst/audio/Makefile.am b/gst-libs/gst/audio/Makefile.am
+index c7e1dcc..9b63fe1 100644
+--- a/gst-libs/gst/audio/Makefile.am
++++ b/gst-libs/gst/audio/Makefile.am
+@@ -53,7 +53,7 @@ libgstaudio_@GST_MAJORMINOR@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS)
+ noinst_PROGRAMS = testchannels
+ testchannels_SOURCES = testchannels.c
+ testchannels_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
+-testchannels_LDADD = $(builddir)/libgstaudio-$(GST_MAJORMINOR).la $(GST_LIBS)
++testchannels_LDADD = $(GST_LIBS)
+
+ include $(top_srcdir)/common/gst-glib-gen.mak
+
diff --git a/patches/gst-plugins-base-0.10.35/add-rgb666-support-to-videotestsrc.patch b/patches/gst-plugins-base-0.10.35/add-rgb666-support-to-videotestsrc.patch
deleted file mode 100644
index 74fd685c3..000000000
--- a/patches/gst-plugins-base-0.10.35/add-rgb666-support-to-videotestsrc.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-From b03b40150cb7755d3bcdb1a42883a5543779e1dc Mon Sep 17 00:00:00 2001
-From: Luotao Fu <l.fu@pengutronix.de>
-Date: Thu, 11 Dec 2008 15:17:36 +0100
-Subject: [PATCH] add rgb666 support
-
- This one adds RGB666 support to videotestsrc.
-
-Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
----
- gst/videotestsrc/videotestsrc.c | 28 ++++++++++++++++++++++++++++
- 1 files changed, 28 insertions(+), 0 deletions(-)
-
-diff --git a/gst/videotestsrc/videotestsrc.c b/gst/videotestsrc/videotestsrc.c
-index b9f29fb..e6fb9e5 100644
---- gst/videotestsrc/videotestsrc.c
-+++ gst/videotestsrc/videotestsrc.c
-@@ -329,6 +329,7 @@ static void paint_setup_xRGB8888 (paintinfo * p, unsigned char *dest);
- static void paint_setup_xBGR8888 (paintinfo * p, unsigned char *dest);
- static void paint_setup_RGBx8888 (paintinfo * p, unsigned char *dest);
- static void paint_setup_BGRx8888 (paintinfo * p, unsigned char *dest);
-+static void paint_setup_RGB666 (paintinfo * p, unsigned char *dest);
- static void paint_setup_RGB888 (paintinfo * p, unsigned char *dest);
- static void paint_setup_BGR888 (paintinfo * p, unsigned char *dest);
- static void paint_setup_RGB565 (paintinfo * p, unsigned char *dest);
-@@ -351,6 +352,7 @@ static void paint_hline_IMC1 (paintinfo * p, int x, int y, int w);
- static void paint_hline_YUV9 (paintinfo * p, int x, int y, int w);
- static void paint_hline_str4 (paintinfo * p, int x, int y, int w);
- static void paint_hline_str3 (paintinfo * p, int x, int y, int w);
-+static void paint_hline_RGB666 (paintinfo * p, int x, int y, int w);
- static void paint_hline_RGB565 (paintinfo * p, int x, int y, int w);
- static void paint_hline_xRGB1555 (paintinfo * p, int x, int y, int w);
-
-@@ -432,6 +434,8 @@ struct fourcc_list_struct fourcc_list[] = {
- 0xff000000, 0x00ff0000, 0x0000ff00, 0x000000ff},
- {VTS_RGB, "RGB ", "BGRA8888", 32, paint_setup_BGRA8888, paint_hline_str4, 32,
- 0x0000ff00, 0x00ff0000, 0xff000000, 0x000000ff},
-+ {VTS_RGB, "RGB ", "RGB666", 32, paint_setup_RGB666, paint_hline_RGB666, 18,
-+ 0x0003f000, 0x00000fc0, 0x0000003f},
- {VTS_RGB, "RGB ", "RGB888", 24, paint_setup_RGB888, paint_hline_str3, 24,
- 0x00ff0000, 0x0000ff00, 0x000000ff},
- {VTS_RGB, "RGB ", "BGR888", 24, paint_setup_BGR888, paint_hline_str3, 24,
-@@ -1700,6 +1704,16 @@ paint_setup_BGRx8888 (paintinfo * p, unsigned char *dest)
- }
-
- static void
-+paint_setup_RGB666 (paintinfo * p, unsigned char *dest)
-+{
-+ p->yp = dest + 0;
-+ p->up = dest + 1;
-+ p->vp = dest + 2;
-+ p->ystride = p->width * 4;
-+ p->endptr = p->dest + p->ystride * p->height;
-+}
-+
-+static void
- paint_setup_RGB888 (paintinfo * p, unsigned char *dest)
- {
- p->yp = dest + 0;
-@@ -1735,6 +1749,20 @@ paint_hline_str4 (paintinfo * p, int x, int y, int w)
- }
-
- static void
-+paint_hline_RGB666 (paintinfo * p, int x, int y, int w)
-+{
-+ int offset = y * p->ystride;
-+ guint8 a, b, c;
-+ a = (p->color->R & 0xC0) >> 6;
-+ b = ((p->color->R & 0xf0) << 2) | ((p->color->G & 0xf0) >> 4);
-+ c = ((p->color->G & 0x0c) << 4) | (p->color->B >> 2);
-+
-+ oil_splat_u8 (p->yp + offset + x * 4, 4, &c, w);
-+ oil_splat_u8 (p->up + offset + x * 4, 4, &b, w);
-+ oil_splat_u8 (p->vp + offset + x * 4, 4, &a, w);
-+}
-+
-+static void
- paint_hline_str3 (paintinfo * p, int x, int y, int w)
- {
- int offset = y * p->ystride;
---
-1.5.6.5
-
diff --git a/patches/gst-plugins-base-0.10.35/autogen.sh b/patches/gst-plugins-base-0.10.35/autogen.sh
new file mode 120000
index 000000000..9f8a4cb7d
--- /dev/null
+++ b/patches/gst-plugins-base-0.10.35/autogen.sh
@@ -0,0 +1 @@
+../autogen.sh \ No newline at end of file
diff --git a/patches/gst-plugins-base-0.10.35/series b/patches/gst-plugins-base-0.10.35/series
index 97aff6e5b..9b0c490c7 100644
--- a/patches/gst-plugins-base-0.10.35/series
+++ b/patches/gst-plugins-base-0.10.35/series
@@ -1 +1,5 @@
-add-RGB666-Support-to-ffmpegcolorspace.patch -p0
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-added-RGB666-Support-to-ffmpegcolorspace.patch
+0002-fix-building-test-program.patch
+# bd27eb09bf57e88fc89c29faa6867395 - git-ptx-patches magic