summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2020-03-09 20:12:12 +0200
committerTim-Philipp Müller <tim@centricular.com>2020-03-13 12:38:00 +0000
commit228275930056b7377c19f2e4fadb9b425c6f032c (patch)
tree3fdfdc06d1df52f851dd3aba7a6a862c55f1a686
parentec15d3c12160d21f1e90957768b816a39d990b54 (diff)
downloadgstreamer-plugins-base-228275930056b7377c19f2e4fadb9b425c6f032c.tar.gz
compositor: Define a separate checker fill function for BGRx/RGBx than for xBGR/xRGB
Otherwise we'll create a cyan or yellow checkerboard. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/736
-rw-r--r--gst/compositor/blend.c3
-rw-r--r--gst/compositor/blend.h4
2 files changed, 5 insertions, 2 deletions
diff --git a/gst/compositor/blend.c b/gst/compositor/blend.c
index 42e60bbab..db7936253 100644
--- a/gst/compositor/blend.c
+++ b/gst/compositor/blend.c
@@ -853,6 +853,7 @@ RGB_FILL_COLOR (xrgb, 4, _memset_xrgb);
MEMSET_XRGB (xbgr, 0, 16, 24);
RGB_FILL_COLOR (xbgr, 4, _memset_xbgr);
+RGB_FILL_CHECKER_C (rgbx, 4, 0, 1, 2);
MEMSET_XRGB (rgbx, 24, 16, 8);
RGB_FILL_COLOR (rgbx, 4, _memset_rgbx);
@@ -1032,6 +1033,7 @@ FillCheckerFunction gst_compositor_fill_checker_y41b;
FillCheckerFunction gst_compositor_fill_checker_rgb;
/* BGR is equal to RGB */
FillCheckerFunction gst_compositor_fill_checker_xrgb;
+FillCheckerFunction gst_compositor_fill_checker_rgbx;
/* BGRx, xRGB, xBGR are equal to RGBx */
FillCheckerFunction gst_compositor_fill_checker_yuy2;
/* YVYU is equal to YUY2 */
@@ -1090,6 +1092,7 @@ gst_compositor_init_blend (void)
gst_compositor_fill_checker_y41b = GST_DEBUG_FUNCPTR (fill_checker_y41b);
gst_compositor_fill_checker_rgb = GST_DEBUG_FUNCPTR (fill_checker_rgb_c);
gst_compositor_fill_checker_xrgb = GST_DEBUG_FUNCPTR (fill_checker_xrgb_c);
+ gst_compositor_fill_checker_rgbx = GST_DEBUG_FUNCPTR (fill_checker_rgbx_c);
gst_compositor_fill_checker_yuy2 = GST_DEBUG_FUNCPTR (fill_checker_yuy2_c);
gst_compositor_fill_checker_uyvy = GST_DEBUG_FUNCPTR (fill_checker_uyvy_c);
diff --git a/gst/compositor/blend.h b/gst/compositor/blend.h
index 710ec7dad..5b0cb6d0a 100644
--- a/gst/compositor/blend.h
+++ b/gst/compositor/blend.h
@@ -87,8 +87,8 @@ extern FillCheckerFunction gst_compositor_fill_checker_rgb;
#define gst_compositor_fill_checker_bgr gst_compositor_fill_checker_rgb
extern FillCheckerFunction gst_compositor_fill_checker_rgbx;
#define gst_compositor_fill_checker_bgrx gst_compositor_fill_checker_rgbx
-#define gst_compositor_fill_checker_xrgb gst_compositor_fill_checker_rgbx
-#define gst_compositor_fill_checker_xbgr gst_compositor_fill_checker_rgbx
+extern FillCheckerFunction gst_compositor_fill_checker_xrgb;
+#define gst_compositor_fill_checker_xbgr gst_compositor_fill_checker_xrgb
extern FillCheckerFunction gst_compositor_fill_checker_yuy2;
#define gst_compositor_fill_checker_yvyu gst_compositor_fill_checker_yuy2;
extern FillCheckerFunction gst_compositor_fill_checker_uyvy;