New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3dlut and simple ICC linking support for color correction #9731
Conversation
|
||
void main() | ||
{ | ||
vec4 rgb = process(); | ||
|
||
#if defined(XBMC_3DLUT) | ||
// FIXME: can this be optimized? |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Well if it can't be done for gles with the human ressources this pr has available ( you ;) ) - then it should be as defensive as possible for gles. As of the looks it doesn't touch gles - so theoretically this should be ok. |
nice! |
I updated the code to address the feedback above, and to apply to current master. |
|
||
CMS_PRIMARIES videoFlagsToPrimaries(int flags) | ||
{ | ||
if (flags & CONF_FLAGS_COLPRI_BT709) return CMS_PRIMARIES_BT709; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Updated to remove the singleton. @FernetMenta - would you mind giving this another look? |
@laurimyllari sorry, I almost missed this. I will have a look this weekend. |
#endif // HAVE_LCMS2 | ||
|
||
// current configuration: | ||
CMS_PRIMARIES curVideoPrimaries; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Colormanager support for was added with xbmc/xbmc#9731
Colormanager support for was added with xbmc/xbmc#9731
Colormanager support for was added with xbmc/xbmc#9731
Colormanager support for was added with xbmc/xbmc#9731
Colormanager support for was added with xbmc/xbmc#9731
Colormanager support for was added with xbmc/xbmc#9731
Colormanager support for was added with xbmc/xbmc#9731
Colormanager support for was added with xbmc/xbmc#9731
Colormanager support for was added with xbmc/xbmc#9731
Colormanager support for was added with xbmc/xbmc#9731
Colormanager support for was added with xbmc/xbmc#9731
Colormanager support for was added with xbmc/xbmc#9731
Colormanager support for was added with xbmc/xbmc#9731
Colormanager support for was added with xbmc/xbmc#9731
Colormanager support for was added with xbmc/xbmc#9731
Colormanager support for was added with xbmc/xbmc#9731
Colormanager support for was added with xbmc/xbmc#9731
Colormanager support for was added with xbmc/xbmc#9731
Colormanager support for was added with xbmc/xbmc#9731
Colormanager support for was added with xbmc/xbmc#9731
Colormanager support for was added with xbmc/xbmc#9731
Colormanager support for was added with xbmc/xbmc#9731
Colormanager support for was added with xbmc/xbmc#9731
Colormanager support for was added with xbmc/xbmc#9731
Colormanager support for was added with xbmc/xbmc#9731
Colormanager support for was added with xbmc/xbmc#9731
@bkuhls STOP linking this PR please!!! |
@laurimyllari could you please update the TODO strings as we are going to beta it's best that we have proper strings. |
@MartijnKaijser I've created pull request #10296 with updated strings. |
{ | ||
CLog::Log(LOGDEBUG, "CMS configuration changed, reload LUT"); | ||
if (!LoadCLUT()) | ||
return false; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
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?