[Bug 727886] GstVideoGLTextureUploadMeta assumes no color conversion is done during upload

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed Apr 16 02:38:56 PDT 2014


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

--- Comment #22 from George Kiagiadakis <kiagiadakis.george at gmail.com> 2014-04-16 09:38:53 UTC ---
(In reply to comment #14)
> > VideoInfo stride/offset/size is for mappable memory. When using the upload
> > meta, you should not need that information, since the actual upload (often not
> > really an upload) is done by the buffer owner/producer.
> 
> You do need it if you want to be able to use the buffer contents as they are.
> This is particularly relevant for buffers which use physically contiguous
> memory that can be used as a backing store for buffers directly. I had this
> issue when trying to render HW-decoded video frames with the Vivante GPU direct
> texture extension. I added the number of padding rows to the height of the
> frame, and used that as the texture height. Then, in the shader, I modified the
> UV coordinates so that the additional padding rows are not rendered. The
> problem is that the extension did not allow for specifying padding explicitely,
> and expected I420 planes to be placed one after the other directly.

I am stuck a bit with this problem now... What happens here with Vivante, in
other words, is that the uploaded texture has bigger dimensions than the video
(width = row stride & height = video height + memory alignment padding) and it
needs to be cropped in order to see just the video and not the video together
with the padding areas interpreted as video.

Initially I thought that I could do it with GstVideoCropMeta, but it's not
possible because in the shaders all sizes are normalized and I need to know
what the texture width/height actually are in order to calculate the fraction
to crop. With CropMeta it ends up being crop_meta->width == video_meta->width
and crop_meta->height == video_meta->height, so the fraction
crop_width/video_width is 1.0 and nothing is cropped.

For this to work, I need to know what the actual texture width & height are, so
I am thinking of adding those also in the UploadMeta. This is actually a
limitation of OpenGL ES, because in desktop GL it is possible to find what the
texture size is and you don't have to carry it around.

-- 
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