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
Add support for pre-calculated 3D-LUTs #2711
Comments
You should convert the LUT to an icc profile. Other than this, I don't think anyone is interested in implementing this. (Could change if there's a volunteer.) |
Hi! "You should convert the LUT to an icc profile." -- not sure if 3dlut to icc is possible... wontfix is a pity, especially because some other players already have 3D LUT support. Anyway, mpv is pretty good even without it. Regards, |
ICC profiles can contain 3D LUTs. (Most probably store a more efficient representation, but it should be possible.) |
mpv uses 3DLUTS for colorimetry, not for special effects. Colorimetry only requires a device profile. “Precomputing” an ICC profile would be redundant because mpv already computes it on the fly and caches the result. If you want to use a 3DLUT for special effects (e.g. saturation), it would be better to use a shader. |
@haasn Unfortunately, I don't know how "to use a shader" in this situation. |
What you are describing is a colorimetry situation, so you can safely ignore my comment about shaders and effects. The 3DLUT mpv uses is different from the 3DLUT you have measured as you are describing it. The basic idea is that there are two directions that mpv needs to transform colors: “video -> intermediate” and “intermediate -> display”. (Where “intermediate” describes an objective representation of color that is not dependent on the source or device) Your measurements are for measuring the “intermediate -> display” response. This information gets stored in ICC profiles. What mpv does on the fly is connect the “video -> intermediate” transformation with the “intermediate -> display” transformation and compute a combined 3DLUT of the entire operation (that is “video -> display”). (With some caveats that I won't go into here) Your 3DLUT only describes the latter operation, so mpv can't use it directly. The correct place to store it would be in an ICC profile. As mentioned, ICC profiles can (and often do) include 3DLUTs of measurement table like yours. Software like calman etc. should be able to output ICC profiles, so try and find an ICC export option in your software. If you can't find one, it would be a Calman bug. (Or you could use other third party tools like ArgyllCMS to get the job done) |
@haasn
|
In a sense, yes. What mpv does is “bake” the operation embedded within the .ICC profile into a 3DLUT for internal use, using an intermediate space of its own choice (BT.2020 with gamma 2.4 iirc). (This way it doesn't matter whether the ICC profile was matrix-based, LUT-based, curve-based or otherwise - the way of using it inside mpv is consistent. Implementing a full, conformant implementation of ICC and all its various modes of operation is way outside the scope of mpv) |
Hi!
Thanks for your work on MPV!
Is it possible to add support for .3dlut files, i.e. ready-made, pre-calculated 3D-LUTs (like this one https://dropmefiles.com/RV1mx )?
Regards,
Alex
The text was updated successfully, but these errors were encountered: