Transfer Functions? Linear GL textures - gamma removed

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Transfer Functions? Linear GL textures - gamma removed

Bruce Wheaton
Is there an equivalent to gst_video_color_transfer_decode and friends in the GL elements?

I’d like to use shaders to remove transfer functions and get a linear buffer (will be floating point - see other thread - so bit depth shouldn’t be an issue as it would in 8-bit).

Technically, it should happen in glColorConvert, but doing an (optional) transfer function correction followed by optional gamma adjustment in GstGLColorBalance would seem like a reasonable approach too.

Does anyone have information on this please? Is this a ‘code welcome’ situation?

Thanks,

Bruce


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Transfer Functions? Linear GL textures - gamma removed

Matthew Waters-2
On 14/01/17 11:47, Bruce Wheaton wrote:
> Is there an equivalent to gst_video_color_transfer_decode and friends in the GL elements?
>
> I’d like to use shaders to remove transfer functions and get a linear buffer (will be floating point - see other thread - so bit depth shouldn’t be an issue as it would in 8-bit).
>
> Technically, it should happen in glColorConvert, but doing an (optional) transfer function correction followed by optional gamma adjustment in GstGLColorBalance would seem like a reasonable approach too.
>
> Does anyone have information on this please? Is this a ‘code welcome’ situation?

This is a 'code welcome' situation :).

The most generic option is to linearize to/from SRGB in shaders which
should definitely happen in glcolorconvert.  This is all indicated by
the caps just not used by the GL conversion code.

Cheers
-Matt

> Thanks,
>
> Bruce
>
>
>

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Transfer Functions? Linear GL textures - gamma removed

Matthew Waters
In reply to this post by Bruce Wheaton
On 14/01/17 11:47, Bruce Wheaton wrote:
> Is there an equivalent to gst_video_color_transfer_decode and friends in the GL elements?
>
> I’d like to use shaders to remove transfer functions and get a linear buffer (will be floating point - see other thread - so bit depth shouldn’t be an issue as it would in 8-bit).
>
> Technically, it should happen in glColorConvert, but doing an (optional) transfer function correction followed by optional gamma adjustment in GstGLColorBalance would seem like a reasonable approach too.
>
> Does anyone have information on this please? Is this a ‘code welcome’ situation?

This is a 'code welcome' situation :).

The most generic option is to linearize to/from SRGB in shaders which
should definitely happen in glcolorconvert.  This is all indicated by
the caps just not used by the GL conversion code.

Cheers
-Matt

> Thanks,
>
> Bruce
>
>
>



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (527 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Transfer Functions? Linear GL textures - gamma removed

Bruce Wheaton


> On Jan 16, 2017, at 02:06, Matthew Waters <[hidden email]> wrote:
>
>> On 14/01/17 11:47, Bruce Wheaton wrote:
>> Is there an equivalent to gst_video_color_transfer_decode and friends in the GL elements?
>>
>> I’d like to use shaders to remove transfer functions and get a linear buffer (will be floating point - see other thread - so bit depth shouldn’t be an issue as it would in 8-bit).
>>
>> Technically, it should happen in glColorConvert, but doing an (optional) transfer function correction followed by optional gamma adjustment in GstGLColorBalance would seem like a reasonable approach too.
>>
>> Does anyone have information on this please? Is this a ‘code welcome’ situation?
>
> This is a 'code welcome' situation :).
>
> The most generic option is to linearize to/from SRGB in shaders which
> should definitely happen in glcolorconvert.  This is all indicated by
> the caps just not used by the GL conversion code

It seemed to me that's what should happen, but wouldn't that break a lot of code? Actually -sRGB has a gamma function, right, so it wouldn't break/change much unless the user had picked a different transfer function and wasn't getting it?

I'll take a look, thanks.

Bruce



> Cheers
> -Matt
>
>> Thanks,
>>
>> Bruce
>>
>>
>>
>
>

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel