WIP: glcolorconvert debayering and better bayer support
The format video/x-bayer can be found in some elements, like videotestsrc or bayer2rgb, but there is no standardized way to use the format. Here, I try to integrate the bayer-formats in the same manner as other video formats. Furthermore, I add an optimized shader into glcolorconvert that is described in the paper "Efficient, high-quality Bayer demosaic filtering on GPUs" from Morgan McGuire, 2009, which I further changed to reduce instructions count. This can be used to do high-quality debayering even on small embedded GPUs.
integrating the new shaders into glcolorconvert was kind of cumbersome because of its way how it is concatenating shaders by using hard-coded code-fragments. I am not sure what the advantages of the current concept in gstglcolorconvert.c is, but it gets in the way with these changes and I am also not really satisfied with it.
I am also not sure if the bayer-formats should be part of GST_VIDEO_FORMAT_* or rather get their own enum. Using the lower-cased names rggb, bggr, grbg, gbrg looks also strange, but I did so to not break videotestsrc and bayer2rgb in gst-plugins-bad for now.
I'd like to discuss how bayer-formats could be standardized in gstreamer and continue my work on integrating them through the elements where needed. I also wonder if glcolorconvert needs some overhauling or if integrating these bayer-shaders should be approached in a different way.
PS: My CI-Pipeline fails in valgrind-good, but I was not able to reproduce this error on my local machine.