GNOME Bugzilla – Bug 131167
gamma correction plugin should handle RGB
Last modified: 2004-12-22 21:47:04 UTC
Due to a very old monitor i need gamma correction to see anything when playing video. gst was missing such a filter, so i wrote a simple one.
Created attachment 23236 [details] [review] patch to add videogamma element to videofilters
I modified the patch to fit in with recent changes I made to make_filter, and applied it. Thanks for sending it. I tested it out, and I'm a bit worried that it doesn't work very well in YUV space. That's not surprising, since gamma correction is typically done in RGB space, since monitors are non-linear in RGB space. I'm leaving this bug open, but retitiling it to reflect that it would be better to have an RGB gamma plugin.
You're right, gamma correction in rgb space looks quite a bit better, but since it needs several colorspace conversions to be actually useful it becomes too slow on my system to use it. I'll attach a first draft of a RGB gamma correction filter, currently limited to one rgb format (defined in an ugly way since i didn't find the correct way to do it yet). If you add this rgb gamma filter, please also leave the YUV one in, as people with less powerful systems may find it useful (i certainly do).
Created attachment 23264 [details] rgb gamma correction filter
This should be folded into the existing gamma element. I don't think it's a problem that the ARG_GAMMA_RGB_R property doesn't make sense for YUV.
Created attachment 23482 [details] [review] patch to add rgb gamma correction to the gamma videofilter
With that patch the gamma filter works with both YUV and RGB, the redgamma, greengamma and bluegamma values are only used for the RGB version though.
ping
I currently don't have time to work on this, the patch still applies and adds rgb gamma correction to the gamma plugin. The seperate values for red, green and blue gamma are only used by the rgb version, and if overall gamma is set that overrides seperate values.
Applied, thanks.