How do I bake-in VCGT in ICC Profile?

Home Forums Help and Support How do I bake-in VCGT in ICC Profile?

Viewing 15 posts - 1 through 15 (of 21 total)
  • Author
    Posts
  • #145246

    Sergij
    Participant
    • Offline

    Hello everyone, I would like to ask if anyone can help me create an ICC Profile that doesn’t use VCGT (doesn’t use the GPU’s LUT), but instead has the VCGT baked-in. From my understanding, this would behave more like a LUT.

    I need this because on KDE Plasma on Wayland, loading the VCGT from the ICC Profile to the GPU is not supported at this time. So if I try to load an ICC Profile (in Plasma – Wayland), the Gamma won’t be applied, or anything else that is using VCGT. It works correctly in KDE Plasma on X11 though, but I want to make it work in Wayland too.

    Would there be any downsides to this (besides the additional conversion/baking-in of the ICC Profile), I guess there won’t be, because this way it should be even more accurate than the GPU’s LUT?

    Thank you in advance!

    #145248

    DaniJ
    Participant
    • Offline

    ICC supports multiple ways of encoding a 1D LUT transform besides VCGT, but we need to dig a bit to find out which one KDE Plasma on Wayland actually supports.

    As this cannot be easily tested in a VM, can you try the two attached profiles and report which one produces a change? If they work, you can attach your profile and I’ll try to bake-in the VCGT.

    Attachments:
    You must be logged in to view attached files.
    #145251

    Egor S.
    Participant
    • Offline

    Perhaps I missed the point, but to get a linear VCGT tag, all you need to do is skip calibration in DisplayCAL. Once the white point and brightness are adjusted as required, simply deselect the ‘Interactive display adjustment’ checkbox and proceed with ‘Profile only’. Create a LUT profile instead of a matrix profile.
    What is the purpose of baking in the VCGT?

    #145252

    Sergij
    Participant
    • Offline

    Thanks for your reply, I immediately tested it and the trc_28.icc changes the output, while the 3dlut.icc doesn’t change anything.

    #145253

    Sergij
    Participant
    • Offline

    Egor S. If I understand correctly the VCGT corrects the display Gamma, but KDE Plasma on Wayland doesn’t support the API  to set it for now. If I leave out the VCGT wouldn’t the Gamma be not corrected? Because, when I try my ICC Profile in KDE Plasma Wayland, only the colors change not the Gamma (this was especially noticeable when I tried to Calibrate to a different Gamma than my Monitor’s native). BTW I did the Calibration in X11 first because it isn’t stable in Wayland for now. So that’s why I like to bake-in the VCGT.

    #145254

    DaniJ
    Participant
    • Offline

    Thanks for the test.

    So I can try the bake-in using the TRC tags. Please proceed to attach your existing profile.

    #145255

    Sergij
    Participant
    • Offline

    No problem! Here’s the ICC Profile, if you need any other file from the Profile folder please request it. I hope that you succeed,  if you do please also tell me how to do it myself.

    Thanks!

    Attachments:
    You must be logged in to view attached files.
    #145257

    DaniJ
    Participant
    • Offline

    I apply some math using various python scripts. In this case a concatenation of the TRC + VCGT 1D LUTs with some inversions . Should give very similar results compared to having the VCGT.

    Attachments:
    You must be logged in to view attached files.
    #145259

    Sergij
    Participant
    • Offline

    Thank you DaniJ, I tested the Profile but I’m just not sure how this works anymore. I attached screenshots of the measurement reports with the original Profile, your Profile, (also against a simulation profile) and without any Profile.

    I am not sure how KDE Plasma on Wayland handles things, to make it more complicated ArgyllCMS doesn’t have native Wayland support so it uses XWayland to display the Measuring Area for the Reports, but that means that XWayland applications will behave like these measurements I attached. I’m not sure if I can clearly see a difference (between the baked-in and original profile) in Wayland applications unfortunately. Maybe I should try it with a more aggressive gamma correction like Gamma 2.4 to test if this really works.

    Edit:

    • Picture 1: Original ICC profile
    • Picture 2: Baked-in ICC profile
    • Picture 3: Original ICC profile  – Simulation profile Rec709 Gamma 2.2
    • Picture 4: Baked-in ICC profile – Simulation profile Rec709 Gamma 2.2
    • Picture 5: No profile
    • This reply was modified 6 months ago by Sergij. Reason: Add description for each picture
    Attachments:
    You must be logged in to view attached files.
    #145266

    Egor S.
    Participant
    • Offline

    Egor S. If I understand correctly the VCGT corrects the display Gamma, but KDE Plasma on Wayland doesn’t support the API  to set it for now. If I leave out the VCGT wouldn’t the Gamma be not corrected?

    The answer is yes and no. In non-colour-managed environments, you don’t even have gamma correction in this case. So yes, Gamma wouldn’t be corrected.
    But the actual gamma curve (Tone response curve) of your monitor is stored in the ICC profile. For matrix profiles in the TRC tag, and for LUT profiles, the tone response curve is ‘stored’ in the B2A structure of the profile.
    In the case of a matrix profile, the curve in the TRC tag corresponds more or less to an ideal gamma curve, e.g. 2.2, if Monitor is calibrated correctly via the vcgt tag. If you skip the calibration, the uncorrected gamma curve is stored in the profile. But the information is contained in the profile. So if you are working with colour management-capable software (Gimp, RawTherapee, etc.), everything is OK. The gamma correction is then not performed in the V-LUT but in the CMS (colour management system).
    I see no difference in the result between a vcgt curve ‘baked’ into the TRC and profiling without calibration. The result should be identical.

    @ DaniJ, please correct me if I’m overlooking something, but I do not see the benefit of imlementing the vcgt correction to the TRC tag manually. I mean Sergij can perform profiling without calibration himself. However, he needs your help to implement the vcgt correction in the TRC tag.

    #145267

    Sergij
    Participant
    • Offline

    @egor-s Sorry, but I don’t completely understand the most technical parts of this Calibration and Profiling stuff.

    Nevertheless what I really meant, is that if I load my ICC profile in KDE Plasma (Wayland) only the whitepoint corrections seem to be applied (the color temperature corrections), and if I switch between two profiles with different Gamma corrections like one with Gamma 2.2 and another with Rec. 1886 there won’t be any difference. Unlike in KDE Plasma (Wayland), when I use the ICC profile in KDE Plasma (X11) the Gamma gets applied, and I can see in the Graphics driver control panel (NVIDIA X Server Settings) that is indeed applied.

    In other words when I open the same image in Gwenview (a photo viewer) in KDE Plasma (Wayland) no changes in terms of Gamma happen to it, but in KDE Plasma (X11) the Gamma clearly changes, I can see it in the Grayscale easily.

    What I found out today is that Gnome (on Wayland) correctly applies the ICC profile. When I switch between two profiles with different gamma I can also see changes in the image in the Grayscale! I started a conversation about this here. And this is the guide that @zamundaaa from KDE made about profiling with DisplayCAL in Plasma Wayland, but if I do this, it won’t be a full calibration, it will just be profiling.

    Is this problem not related to VCGT?

    • This reply was modified 6 months ago by Sergij. Reason: Clarify what I mean about Graphics driver
    #145269

    DaniJ
    Participant
    • Offline

    Earlier systems (X11, older Windows) would only apply the VCGT 1D LUTs on the whole desktop and leave anything else as a responsibility of various apps.

    From the test above it looks like KDE/Wayland learnt to also read TRC and apply a correction. In the absence of supporting VCGT, this should be the next best thing to still apply a correction for the whole desktop.

    As the profile also contains a 3D LUT, I’m attaching a version that bakes in the VCGT there as well using the output shaper curves, forgot to do it yesterday.

    Also keep in mind that the VCGT of the attached profile was quite subtle, it just reduces red a bit. Need to be observant when comparing before & after.

    As to baking it in manually vs reprofiling:

    • Baking it in is faster, just some math VS remeasuring all those points
    • Should be more precise as the calibration phase did quite some measurements to come up with the VCGT, compared to profiling a few hundred points which don’t include that many greys.
    Attachments:
    You must be logged in to view attached files.
    #145272

    Sergij
    Participant
    • Offline

    @danij Thanks, but what is the difference between the old profile that you sent and this new one? I tried it and it doesn’t seem to change anything, compared to my original DisplayCAL profile. Although, when I switch from my original DisplayCAL profile and no profile there is a difference. So maybe KDE Plasma on Wayland doesn’t change the luma (the brightness) when I apply an ICC profile (made with DisplayCAL), but only the colors? That would explain why I can’t really see a big difference between mine and yours, as the gamma doesn’t change the brightness that much, as it changes the RGB grey balance.

    If you aren’t busy maybe you can try to bake-in the profile that I attached to this post, which is a more aggressive Rec. 1886 gamma correcting profile. And I can easily see the changes on my Laptop when using this profile.

    There’s also another, to me strange, setting in KDE Plasma on Wayland called sRGB Color intensity. It is supposed to be correct to set it to 0%, but when I set it to 0% I get strange results with the DisplayCAL verification. It’s like the color gamut is compressed and colors are more to the center (undersaturated). When I set it to 100% the results are better, but the green color is still looking a little bit compressed on the verification. On my Laptop if I set that setting to 0% then the colors will be washed-out, I can clearly see when I look at the Firefox logo that there are very little variations in color and it looks strangely saturated (like compressed). Maybe that’s because my Laptop screen isn’t 99% sRGB and somehow is compensating for that??? This is pretty unstable to me for now, and I don’t know if I can rely on it.

    I don’t know what approach is better (VCGT or the new one) as Gnome on Wayland correctly accepts my Profiles and sets the Gamma correctly on my Laptop, as I easily tested it with Rec. 1886?

    Attachments:
    You must be logged in to view attached files.
    #145274

    DaniJ
    Participant
    • Offline

    The second profile bakes the VCGT into the 3DLUT as well. The difference (compared to the first bake-in) is only visible in colored managed app likes photo editors.

    • This reply was modified 6 months ago by DaniJ.
    #145276

    DaniJ
    Participant
    • Offline

    Here’s the second profile baked in. It will show some issues around 100% white due to limitations of TRC if the curves don’t end at 100%.

    VCGT is always better than the bake-in. Bake-in is a compromise if VCGT is not not working/available for some reason.

    Attachments:
    You must be logged in to view attached files.
Viewing 15 posts - 1 through 15 (of 21 total)

You must be logged in to reply to this topic.

Log in or Register

Display Calibration and Characterization powered by ArgyllCMS