[Bug 731791] videometa: add GstVideoAffineTransformationMeta

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed Jun 18 03:19:26 PDT 2014


https://bugzilla.gnome.org/show_bug.cgi?id=731791
  GStreamer | gst-plugins-base | git

--- Comment #4 from Matthew Waters <ystreet00 at gmail.com> 2014-06-18 10:19:21 UTC ---
(In reply to comment #2)
> Review of attachment 278612 [details]:
> 
> How is it negotiated? Are users of this API expected to handle all possible
> transformations? What's the expected behaviour for transformations that convert
> a rectangular video to a non-rectangular one (or non multiple of 90°
> rotations)?

Negotiated through the allocation query.  I don't think we would need to depend
on bug #727886 for this.  Downstream says it supports it or not, upstream
decides to abort or use it/something else/nothing based on that.

Yes the possibility is there for all possible transformations to occur
(translate, scale, rotate, etc).  If the downstream element would like the
bounds of the rotated image inside the bounds of the output image, then it can
set that up using the matrix.  If a transformed pixel is outside the bounds of
the output image, then it should discard that pixel.  Likewise, if an output
pixel does not correspond to some pixel in the transformed input image, then
that pixel should be set to some background colour, typically black.

(In reply to comment #3)
> > @@ +57,3 @@
> > +
> > +  gfloat matrix[16];
> > +  GstVideoAffineTransformationGetMatrix get_matrix;
> > 
> > Why the get_matrix function pointer? What is this supposed to do other than
> > returning the matrix?
> 
> As I said in the bug description, it is used to provide a way for the user to
> fetch the matrix from the buffer / buffer memory. I'm thinking about the
> android buffers where the matrix has to be retrieved from the surface texture,
> after the texture is updated with the updateTexImage. But i'm sure if this
> design is right since it will imply that the upload function is called before
> the [...]_get_matrix function is. 
> 
> The default implementation just returns the stored matrix.

What if we assume that any GstMeta that we call a function on could modify
(add?) any other GstMeta attached to the buffer unless explicitly stated
otherwise.  With that in mind, the upload meta could modify the transform meta
and thus would need to be called after the upload meta.  If we allow the
addition of meta's by GstMeta user functions then it must be retrieved from the
buffer after all meta-modifying operations have completed.  How does that
sound?

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- 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