gstglcolorconvert output buffer format

Matthew Waters ystreet00 at gmail.com
Fri Jan 13 07:55:45 UTC 2017


On 13/01/17 13:14, Bruce Wheaton wrote:
> Hey - new to GStreamer, which I’m planning on switching to since it includes (better) versions of a bunch of code I wrote a few years ago (ffmpeg based).Thanks for an awesome library!
>
> So - one thing I need is high bit depth precision, but I’d love to take advantage of glColorConvert and friends. From my reading of gstglcolorconvert.c, an FBO is created, and a texture is attached to it, and that texture is 8-bit per color, unsigned byte:
>
> 1910  /* a fake texture is attached to the convert FBO (cannot init without it) */
> 1911  gl->GenTextures (1, &fake_texture);
> 1912  gl->BindTexture (GL_TEXTURE_2D, fake_texture);
> 1913  internal_format 1914      gst_gl_sized_gl_format_from_gl_format_type (convert->context, GL_RGBA,
> 1915      GL_UNSIGNED_BYTE);
> 1916  gl->TexImage2D (GL_TEXTURE_2D, 0, internal_format, out_width, out_height, 0,
> 1917      GL_RGBA, GL_UNSIGNED_BYTE, NULL);
>
> It does call it a fake texture though, is there somewhere else (I don’t see any more texture generation), not sure if that’s replaced?

The fake texture is simply there to initialize the FBO, it is replaced
by the actual texture later in
https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/gst-libs/gst/gl/gstglcolorconvert.c#n2473.

> Anyway - I can change the code to use float or half float (16-bit float GL format), but I’m not sure how best to fit it into the GStreamer system - still reading up on that. Also, can someone please point me to where/how to submit patches? Here on the list, or in source control?

Bugs and patches are tracked in gnome bugzilla here:
https://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer.  You can
submit patches there.

> In my head, I expected that element to look at caps and create an appropriate format based on that?

That's exactly how this would work :).

The first step is to add the necessary information to the libgstvideo
library for the float/half-float formats.
Second step is adding the float/half-float textures to gstglformat for
converting between GstVideoFormat and the necessary GL tokens.
Then you can use those formats from glcolorconvert.

Cheers
-Matt

> Thanks for any help,
>
> Bruce Wheaton

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 516 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170113/b7c8a421/attachment.sig>


More information about the gstreamer-devel mailing list