diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2011-04-01 10:39:31 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2011-04-01 10:39:31 +0200 |
commit | 026776ca23c40e241d17aaff5520c2a82ae46f4d (patch) | |
tree | 79faa01e59fafcbb15a75022c063f175ff5fca56 /ext | |
parent | 200ee96338e73932074ad977d2187a7b7c163d96 (diff) |
textoverlay: Add support for xBGR and RGBx
Now all RGB variants are supported.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/pango/gsttextoverlay.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/ext/pango/gsttextoverlay.c b/ext/pango/gsttextoverlay.c index 1d0f25b84..21ac0138a 100644 --- a/ext/pango/gsttextoverlay.c +++ b/ext/pango/gsttextoverlay.c @@ -192,7 +192,9 @@ static GstStaticPadTemplate src_template_factory = GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS (GST_VIDEO_CAPS_BGRx ";" + GST_VIDEO_CAPS_RGBx ";" GST_VIDEO_CAPS_xRGB ";" + GST_VIDEO_CAPS_xBGR ";" GST_VIDEO_CAPS_RGBA ";" GST_VIDEO_CAPS_BGRA ";" GST_VIDEO_CAPS_ARGB ";" @@ -205,7 +207,9 @@ static GstStaticPadTemplate video_sink_template_factory = GST_PAD_SINK, GST_PAD_ALWAYS, GST_STATIC_CAPS (GST_VIDEO_CAPS_BGRx ";" + GST_VIDEO_CAPS_RGBx ";" GST_VIDEO_CAPS_xRGB ";" + GST_VIDEO_CAPS_xBGR ";" GST_VIDEO_CAPS_RGBA ";" GST_VIDEO_CAPS_BGRA ";" GST_VIDEO_CAPS_ARGB ";" @@ -1453,6 +1457,8 @@ gst_text_overlay_shade_packed_Y (GstTextOverlay * overlay, guchar * dest, } #define gst_text_overlay_shade_BGRx gst_text_overlay_shade_xRGB +#define gst_text_overlay_shade_RGBx gst_text_overlay_shade_xRGB +#define gst_text_overlay_shade_xBGR gst_text_overlay_shade_xRGB static inline void gst_text_overlay_shade_xRGB (GstTextOverlay * overlay, guchar * dest, gint x0, gint x1, gint y0, gint y1) @@ -1759,6 +1765,8 @@ gst_text_overlay_blit_##name (GstTextOverlay * overlay, \ } xRGB_BLIT_FUNCTION (xRGB, 1, 2, 3); xRGB_BLIT_FUNCTION (BGRx, 2, 1, 0); +xRGB_BLIT_FUNCTION (xBGR, 3, 2, 1); +xRGB_BLIT_FUNCTION (RGBx, 0, 1, 2); #define ARGB_BLIT_FUNCTION(name, A, R, G, B) \ static inline void \ @@ -1931,11 +1939,21 @@ gst_text_overlay_push_frame (GstTextOverlay * overlay, GstBuffer * video_frame) GST_BUFFER_DATA (video_frame), xpos, xpos + overlay->image_width, ypos, ypos + overlay->image_height); break; + case GST_VIDEO_FORMAT_xBGR: + gst_text_overlay_shade_xBGR (overlay, + GST_BUFFER_DATA (video_frame), xpos, xpos + overlay->image_width, + ypos, ypos + overlay->image_height); + break; case GST_VIDEO_FORMAT_BGRx: gst_text_overlay_shade_BGRx (overlay, GST_BUFFER_DATA (video_frame), xpos, xpos + overlay->image_width, ypos, ypos + overlay->image_height); break; + case GST_VIDEO_FORMAT_RGBx: + gst_text_overlay_shade_RGBx (overlay, + GST_BUFFER_DATA (video_frame), xpos, xpos + overlay->image_width, + ypos, ypos + overlay->image_height); + break; case GST_VIDEO_FORMAT_ARGB: gst_text_overlay_shade_ARGB (overlay, GST_BUFFER_DATA (video_frame), xpos, xpos + overlay->image_width, @@ -1991,6 +2009,14 @@ gst_text_overlay_push_frame (GstTextOverlay * overlay, GstBuffer * video_frame) gst_text_overlay_blit_xRGB (overlay, GST_BUFFER_DATA (video_frame), xpos, ypos); break; + case GST_VIDEO_FORMAT_RGBx: + gst_text_overlay_blit_RGBx (overlay, + GST_BUFFER_DATA (video_frame), xpos, ypos); + break; + case GST_VIDEO_FORMAT_xBGR: + gst_text_overlay_blit_xBGR (overlay, + GST_BUFFER_DATA (video_frame), xpos, ypos); + break; case GST_VIDEO_FORMAT_ARGB: gst_text_overlay_blit_ARGB (overlay, GST_BUFFER_DATA (video_frame), xpos, ypos); |