Transfer Functions? Linear GL textures - gamma removed

Bruce Wheaton bwheaton at synchromeshddr.com
Mon Jan 16 17:31:18 UTC 2017



> On Jan 16, 2017, at 02:06, Matthew Waters <ystreet00 at gmail.com> 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
>> 
>> 
>> 
> 
> 



More information about the gstreamer-devel mailing list