summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/lcms.h
Commit message (Collapse)AuthorAgeFilesLines
* vo_opengl: remove some indirect GL header inclusions from core rendererwm42017-08-101-0/+1
|
* vo_opengl: support embedded ICC profilesNiklas Haas2017-08-031-2/+5
| | | | | | | | | | | | | | | | This currently only works when using lcms-based color management (--icc-profile-*). In principle, we could also support using lcms even when the user has not specified an ICC profile, by generating the profile against a fixed reference (--target-prim/--target-trc) instead. I still might do that some day, simply because 3dlut provides a higher quality conversion than our simple gamut mapping does for stuff like BT.2020, and also because it's now needed to enable embedded ICC profiles. But that would be a separate change, so preserve the status quo for now. (Besides, my opinion is still that you should be using an ICC profile if you care about colors being accurate _at all_)
* vo_opengl: simplify option handlingwm42016-09-061-2/+3
| | | | | | | | | | | | | Instead of copying the options around... just don't. video.c now has full control over when options are updated. (It still gets notified from outside, but it decides when the updated options are copied: when m_config_cache_update() is called.) So there's no need for tricky stuff, and it can be simplified a bit. Also change lcms.c. We could do it like video.c, and get the options from the global config store. But it seems simpler to just provide a pointer to an option struct, which is arbitrarily mutated from the outside (from the perspective of lcms.c).
* vo_opengl: cleanup icc + runtime option changing behaviorwm42016-06-041-1/+2
| | | | | | | | | | | | | | Commit 026b75e7 actually enabled changing icc options at runtime (via vo_cmdline), but it didn't quite work. In particular, changing the icc- profile option just kept the old profile, because it was cached accordingly. As part of this, change gl_lcms.opts from a struct to a pointer to a struct. We properly copy it, instead of allowing possibly dangling strings, like it was done in a working but unclean way before. Also, reinit the whole rendering chain when the auto icc profile changes, just like it's done when icc options are changed.
* vo_opengl: minor simplification to gl_lcms_set_memory_profile()wm42016-06-041-1/+1
| | | | | | Passing the bstr thing as pointer makes no sense. Everywhere else bstr structs are passed by value because they're so small. Only when it's supposed to receive a return value they're not.
* vo_opengl: move struct lut3d definitionwm42016-06-031-1/+5
| | | | | This was dumb. Also, lcms.h has actually no need to include video.h besides this and csputils.h (makes it slightly less entangled).
* lcms: improve black point handling (especially BT.1886)Niklas Haas2016-05-041-0/+1
| | | | | | | | | | | | | | | | | | | First of all, black point compensation is now on by default. This is really rather harmless and only improves the result (where "improvement" means "less black clipping"). Second, this adds an option to limit the ICC profile's contrast, which helps for untagged matrix profiles that are implicitly black scaled even in colorimetric intent. (Note that this relies on BPC being enabled to work properly, which is why the two changes are tied together) Third, this uses the LittleCMS built in black point estimator instead of relying on the presence of accurate A2B tables. This also checks tags and does some amounts of noise elimination. If the option is unspecified and the profile is missing black point information, print a warning instructing the user to set the option, and fall back to 1000 otherwise.
* vo_opengl: generate 3DLUT against source and use full BT.1886Niklas Haas2016-04-011-2/+4
| | | | | | | | | | | | | | | | | | | This commit refactors the 3DLUT loading mechanism to build the 3DLUT against the original source characteristics of the file. This allows us, among other things, to use a real BT.1886 profile for the source. This also allows us to actually use perceptual mappings. Finally, this reduces errors on standard gamut displays (where the previous 3DLUT target of BT.2020 was unreasonably wide). This also improves the overall accuracy of the 3DLUT due to eliminating rounding errors where possible, and allows for more accurate use of LUT-based ICC profiles. The current code is somewhat more ugly than necessary, because the idea was to implement this commit in a working state first, and then maybe refactor the profile loading mechanism in a later commit. Fixes #2815.
* vo_opengl: remove gl_ prefixes from files in video/out/openglNiklas Haas2015-09-091-0/+30
This is a bit redundant with the name of the directory itself, and not in line with existing naming conventions.