summaryrefslogtreecommitdiff
path: root/gst/smpte/gstsmptealpha.c
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2010-04-17 17:47:05 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2010-04-29 19:28:18 +0200
commitf005c87037651dea962ccc51f8fc733404df3c2e (patch)
treea32e593f0886e6ac9f9df2267d9c1a2731d7a408 /gst/smpte/gstsmptealpha.c
parentae1783e5cd9c112fb631a38b16186e41f8abeed9 (diff)
smptealpha: Add support for YV12 (converted to AYUV)
Diffstat (limited to 'gst/smpte/gstsmptealpha.c')
-rw-r--r--gst/smpte/gstsmptealpha.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gst/smpte/gstsmptealpha.c b/gst/smpte/gstsmptealpha.c
index ebc206827..b182d23b7 100644
--- a/gst/smpte/gstsmptealpha.c
+++ b/gst/smpte/gstsmptealpha.c
@@ -74,7 +74,8 @@ static GstStaticPadTemplate gst_smpte_alpha_sink_template =
GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
- GST_STATIC_CAPS (GST_VIDEO_CAPS_YUV ("I420") ";" GST_VIDEO_CAPS_YUV ("AYUV")
+ GST_STATIC_CAPS (GST_VIDEO_CAPS_YUV ("I420") ";" GST_VIDEO_CAPS_YUV ("YV12")
+ ";" GST_VIDEO_CAPS_YUV ("AYUV")
";" GST_VIDEO_CAPS_ARGB ";" GST_VIDEO_CAPS_BGRA ";" GST_VIDEO_CAPS_RGBA
";" GST_VIDEO_CAPS_ARGB)
);
@@ -368,16 +369,16 @@ gst_smpte_alpha_process_i420_ayuv (GstSMPTEAlpha * smpte, const guint8 * in,
maskp = mask->data;
- y_stride = gst_video_format_get_row_stride (GST_VIDEO_FORMAT_I420, 0, width);
- uv_stride = gst_video_format_get_row_stride (GST_VIDEO_FORMAT_I420, 1, width);
+ y_stride = gst_video_format_get_row_stride (smpte->in_format, 0, width);
+ uv_stride = gst_video_format_get_row_stride (smpte->in_format, 1, width);
src_wrap = y_stride - width;
src_uv_wrap = uv_stride - (width / 2);
srcY = in;
- srcU = in + gst_video_format_get_component_offset (GST_VIDEO_FORMAT_I420,
+ srcU = in + gst_video_format_get_component_offset (smpte->in_format,
1, width, height);
- srcV = in + gst_video_format_get_component_offset (GST_VIDEO_FORMAT_I420,
+ srcV = in + gst_video_format_get_component_offset (smpte->in_format,
2, width, height);
odd_width = (width % 2 != 0);