summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs/gst-plugins-base/files/gst-0.10.32-0022-stride-support-for-32bit-RGB-formats.patch')
-rw-r--r--media-libs/gst-plugins-base/files/gst-0.10.32-0022-stride-support-for-32bit-RGB-formats.patch54
1 files changed, 54 insertions, 0 deletions
diff --git a/media-libs/gst-plugins-base/files/gst-0.10.32-0022-stride-support-for-32bit-RGB-formats.patch b/media-libs/gst-plugins-base/files/gst-0.10.32-0022-stride-support-for-32bit-RGB-formats.patch
new file mode 100644
index 0000000..ac56a08
--- /dev/null
+++ b/media-libs/gst-plugins-base/files/gst-0.10.32-0022-stride-support-for-32bit-RGB-formats.patch
@@ -0,0 +1,54 @@
+From 30b32e864e9a77b66a36d27d3b071f59633d08b7 Mon Sep 17 00:00:00 2001
+From: Rob Clark <rob@ti.com>
+Date: Mon, 13 Sep 2010 19:16:02 -0500
+Subject: [PATCH 22/24] stride: support for 32bit RGB formats
+
+---
+ gst/stride/convert.c | 24 ++++++++++++++++++++++++
+ 1 files changed, 24 insertions(+), 0 deletions(-)
+
+diff --git a/gst/stride/convert.c b/gst/stride/convert.c
+index 5d392ac..7f976a5 100644
+--- a/gst/stride/convert.c
++++ b/gst/stride/convert.c
+@@ -372,6 +372,22 @@ convert_rgb16_rgb16 (GstStrideTransform * self,
+ return convert_422i_422i (self, out, in);
+ }
+
++/** convert 32bbp rgb formats */
++static GstFlowReturn
++convert_rgb32_rgb32 (GstStrideTransform * self,
++ guchar * out, guchar * in)
++{
++ if (G_UNLIKELY (self->needs_refresh)) {
++ gint sx[] = {1};
++ gint sy[] = {1};
++ if (refresh_cache (self, 1, 4, sx, sx, sy, sy))
++ return GST_FLOW_ERROR;
++ self->needs_refresh = FALSE;
++ }
++
++ return convert_n_n (self, out, in, 1);
++}
++
+ #define CONVERT(tofmt, fromfmt, convert) \
+ { \
+ { GST_VIDEO_FORMAT_##tofmt, GST_VIDEO_FORMAT_##fromfmt }, \
+@@ -388,6 +404,14 @@ const Conversion stride_conversions[] = {
+ CONVERT (I420, NV12, convert_i420_nv12),
+ CONVERT (I420, YUY2, convert_i420_yuy2),
+ CONVERT (RGB16, RGB16, convert_rgb16_rgb16),
++ CONVERT (RGBx, RGBx, convert_rgb32_rgb32),
++ CONVERT (BGRx, BGRx, convert_rgb32_rgb32),
++ CONVERT (xRGB, xRGB, convert_rgb32_rgb32),
++ CONVERT (xBGR, xBGR, convert_rgb32_rgb32),
++ CONVERT (RGBA, RGBA, convert_rgb32_rgb32),
++ CONVERT (BGRA, BGRA, convert_rgb32_rgb32),
++ CONVERT (ARGB, ARGB, convert_rgb32_rgb32),
++ CONVERT (ABGR, ABGR, convert_rgb32_rgb32),
+ /* add new entries before here */
+ {{GST_VIDEO_FORMAT_UNKNOWN}}
+ };
+--
+1.7.1
+