Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
3dlut and simple ICC linking support for color correction #9731
This PR adds a ColorManager class that supports loading madVR 3DLUT files, and loading ICC display profiles, creating source profiles and linking them.
The end user can use this to correct their display response with a 3DLUT file, or emulate other displays (with whitepoint, primaries and gamma selectable at runtime) with an ICC profile of their own display.
Code changes are in two commits. The first one implements a (hopefully) platform independent ColorManager class. If lcms2 is not available, only 3DLUT file format is supported. The second commit adds the necessary bits to the Linux OpenGL renderer, building on the previously added output stage.
The ICC profile linking is still work in progress, but I included it as it is functional and shows what can be done with it. It will also be needed if/when color management is implemented for the photo viewer. The 3DLUT files provide the best accuracy (at the cost of runtime flexibility) - ArgyllCMS is very smart and the linker here is quite simple.
Slight adjustments may be needed for #9720 - I'll update if/when that is merged to master.
One significant improvement I would like help with: it would be nice to keep the 3D lookup texture around as it takes a while to upload. It is most noticeable when running many short video clips back to back. @FernetMenta, any thoughts?
I'm still pretty new to the Kodi codebase. Any feedback is welcome.
Pinging @Memphiz and @popcornmix since my previous work broke gles - would you mind checking this out? Are there any gles platforms that could be supported, or better to just disable this and make sure not to break anything?