[Bug 746147] compositor: Don't convert or aggregate pads that are completely obscured by a higher zorder pad

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Sat Apr 18 02:06:35 PDT 2015


https://bugzilla.gnome.org/show_bug.cgi?id=746147

Mathieu Duponchelle <mduponchelle1 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #301880|none                        |needs-work
             status|                            |

--- Comment #19 from Mathieu Duponchelle <mduponchelle1 at gmail.com> ---
Review of attachment 301880:
 --> (https://bugzilla.gnome.org/review?bug=746147&attachment=301880)

Nice patch, that needed to be done since quite some time. I'll take more time
to think about the algorithm, as I think there might be a slightly more elegant
solution where you'd maintain a "global opaque rectangle" that you would
initialize at aggregate time, it's the weekend though :) I would also like to
see some tests for this, we need to think about the form they could take. I'm
completely OK with the end goal of the patch though, we need to merge something
to that effect ASAP :)

::: gst/compositor/compositor.c
@@ +299,3 @@
+/* Test whether rectangle1 is obscured by rectangle2 */
+static gboolean
+is_rectangle_obscured (GstVideoRectangle rect1, GstVideoRectangle rect2)

That function would be more aptly named is_rectangle_contained, as it makes no
alpha checks, just geometry

@@ +350,3 @@
     width = cpad->width;
   else
+    width = GST_VIDEO_INFO_WIDTH (&pad->buffer_vinfo);

I'm confused, you state in the comments above that it is the same as
VIDEO_FRAME_WIDTH / HEIGHT, why do you need to change it then?

@@ +355,3 @@
     height = cpad->height;
   else
+    height = GST_VIDEO_INFO_HEIGHT (&pad->buffer_vinfo);

same question here?

@@ -395,2 +422,3 @@
   }

+  /* Clamp the x/y coordinates of this frame to the video boundaries to cover

And all this could go in a function that you would indeed name
is_frame_obscured :)

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list