mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-04 05:22:30 +00:00
shapewipe: Divide the border value by two, otherwise we use a twice a wide border
This commit is contained in:
parent
19b4c4f335
commit
332dae7198
2 changed files with 5 additions and 5 deletions
|
@ -556,8 +556,8 @@ gst_shape_wipe_blend_16 (GstShapeWipe * self, GstBuffer * inbuf,
|
||||||
guint i, j;
|
guint i, j;
|
||||||
guint mask_increment = GST_ROUND_UP_2 (self->width) - self->width;
|
guint mask_increment = GST_ROUND_UP_2 (self->width) - self->width;
|
||||||
gfloat position = self->mask_position;
|
gfloat position = self->mask_position;
|
||||||
gfloat low = MAX (0.0, position - self->mask_border);
|
gfloat low = MAX (0.0, position - (self->mask_border / 2.0));
|
||||||
gfloat high = MIN (1.0, position + self->mask_border);
|
gfloat high = MIN (1.0, position + (self->mask_border / 2.0));
|
||||||
|
|
||||||
for (i = 0; i < self->height; i++) {
|
for (i = 0; i < self->height; i++) {
|
||||||
for (j = 0; j < self->width; j++) {
|
for (j = 0; j < self->width; j++) {
|
||||||
|
@ -602,8 +602,8 @@ gst_shape_wipe_blend_8 (GstShapeWipe * self, GstBuffer * inbuf,
|
||||||
guint i, j;
|
guint i, j;
|
||||||
guint mask_increment = GST_ROUND_UP_4 (self->width) - self->width;
|
guint mask_increment = GST_ROUND_UP_4 (self->width) - self->width;
|
||||||
gfloat position = self->mask_position;
|
gfloat position = self->mask_position;
|
||||||
gfloat low = MAX (0.0, position - self->mask_border);
|
gfloat low = MAX (0.0, position - (self->mask_border / 2.0));
|
||||||
gfloat high = MIN (1.0, position + self->mask_border);
|
gfloat high = MIN (1.0, position + (self->mask_border / 2.0));
|
||||||
|
|
||||||
for (i = 0; i < self->height; i++) {
|
for (i = 0; i < self->height; i++) {
|
||||||
for (j = 0; j < self->width; j++) {
|
for (j = 0; j < self->width; j++) {
|
||||||
|
|
|
@ -67,7 +67,7 @@ main (gint argc, gchar ** argv)
|
||||||
|
|
||||||
pipeline_string =
|
pipeline_string =
|
||||||
g_strdup_printf
|
g_strdup_printf
|
||||||
("videotestsrc ! video/x-raw-yuv,width=640,height=480 ! shapewipe name=shape border=0.01 ! videomixer name=mixer ! ffmpegcolorspace ! autovideosink filesrc location=%s ! typefind ! decodebin2 ! ffmpegcolorspace ! videoscale ! queue ! shape.mask_sink videotestsrc pattern=snow ! video/x-raw-yuv,width=640,height=480 ! queue ! mixer.",
|
("videotestsrc ! video/x-raw-yuv,width=640,height=480 ! shapewipe name=shape border=0.05 ! videomixer name=mixer ! ffmpegcolorspace ! autovideosink filesrc location=%s ! typefind ! decodebin2 ! ffmpegcolorspace ! videoscale ! queue ! shape.mask_sink videotestsrc pattern=snow ! video/x-raw-yuv,width=640,height=480 ! queue ! mixer.",
|
||||||
argv[1]);
|
argv[1]);
|
||||||
|
|
||||||
pipeline = gst_parse_launch (pipeline_string, NULL);
|
pipeline = gst_parse_launch (pipeline_string, NULL);
|
||||||
|
|
Loading…
Reference in a new issue