gstglcolorconvert output buffer format

Matthew Waters ystreet00 at gmail.com
Mon Jan 16 09:59:13 UTC 2017


On 14/01/17 06:54, Bruce Wheaton wrote:
> Thank you for a detailed response - very kind.
>
>>> 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 :).
>
> Splendid! That’s what I hoped someone would say.
>>
>> 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.
>>
>
> Great - there’s a lot of deja-vu looking in there but at least I have
> some idea of what I’m looking for…
>
> So, in gst-plugins-base, video/video-format.h seems to be where the
> new format should go?
>
> And it looks like it needs to go in a few places…
>
> Then video-info.c as well? And video-converter.c…. And video scale.c?
> :-(   Oh boy.

Once you have video-converter, you can convert to something else to
scale if necessary (potentially at a loss though).

> Is a format patch going to get in trouble because it isn’t supported
> well in software? Scaling and conversions, for instance? 
>
> gstglformat.h seems a little more straightforward… Can probably work
> that out.
>
> I’ll start on changes and a patch. If I diff against a tagged release
> in GIT, that works, I presume?

Sure, we use git format-patch for patches.

> So - more of a can of worms: has there been discussion of compressed
> image formats? A couple of codecs, notably and most usefully the HAP
> family are compressed GL formats. I guess I’d have to add support
> here, or maybe manually handle those frames as a raw format of some kind?
>
> The more complicated is HapQ[A] which is: intraframe only, snappy
> compression (RLE) on each frame, planar (if alpha is included), GL
> compressed formats in a custom color space. RCoCg afair.
>
> I’m sure it would have to be a separate patch, as I’m sure there would
> be a lot of wrinkles to that. Has anyone else been requesting these
> codecs or formats and handled it already? I suspect libav would handle
> it through software but that totally defeats the object.

No GL compressed format has been implemented in GStreamer AFAIK.  The
two options for implementing them involve adding formats (similar to the
float/half-float RGBA formats) if they can be used transparently in
GstGLMemory as non-compressed textures or creating encoding/decoding
GStreamer elements to convert between the different formats.  I haven't
looked too closely at the requirements for them either so don't know
which would be the best option.

Cheers
-Matt

> Bruce
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170116/4a8be71c/attachment-0001.html>
-------------- 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/20170116/4a8be71c/attachment-0001.sig>


More information about the gstreamer-devel mailing list