Skip to content
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

Revamp D65 chroma correction workflow #15461

Closed

Commits on Oct 26, 2023

  1. Workup the chroma correction workflow.

    Since introducing the modern chroma correction workflow we do the chroma correction in two phases.
    
    First   we use the daylight/D65 coeffs in temperature
    Second  we refine for better data in colorbalancergb.
    
    Unfortunately
    1) some modules would prefer better white-balanced data, notably highlights, raw chromatic aberration
       as their algorithms assume white-is-white / resp all rgb signals are equal for greytones.
    2) due to the implementation in temperature we don't have all coeffs (currently used, D65 and as-shot)
       publicly available but only internal in gui data.
    3) warnings are difficult to handle
    
    This pr implements and uses a struct `dt_dev_chroma_t` in `dt_develop_t` holding all relevant data.
    
    The temperature module reads them all and we can check at all stages of the pipe via dt_dev_check_d65(),
    also we avoid keeping coeffs in temperature gui data.
    
    Some refactoring and renaming for readability
    jenshannoschwalm committed Oct 26, 2023
    Configuration menu
    Copy the full SHA
    9359ef5 View commit details
    Browse the repository at this point in the history
  2. Revamp chroma related trouble warnings

    All chroma related warnings will be served via the channelmixerrgb (color calibration) module instances.
    
    The one being `chroma.adaptation` also knows about the temperature module status,
    so it writes the trouble status there too.
    
    For increased responsivness and situations without UI updates (initial loading in darkroom)
    we update the troubles after the preview pipe has finished.
    jenshannoschwalm committed Oct 26, 2023
    Configuration menu
    Copy the full SHA
    e448da0 View commit details
    Browse the repository at this point in the history
  3. Introduce a late D65 mode in temperature

    We now have a second bulb button on the very right introducing the "late D65" mode.
    The effect will be:
    1. the temperature module will process data with "as-shot" coeffs and keeps track
       on this in the dev chroma struct.
    2. also the processed_max and dsc data are using this
    3. See colorin module how this get's resolved
    
    Otherwise the algos have not changed. Presets are supported as before
    jenshannoschwalm committed Oct 26, 2023
    Configuration menu
    Copy the full SHA
    72a34eb View commit details
    Browse the repository at this point in the history
  4. Make colorin do the late D65 correction

    Preliminary code for evaluation of the algo
    1. only cpu code so far
    2. some performance penalty
    jenshannoschwalm committed Oct 26, 2023
    Configuration menu
    Copy the full SHA
    5f06467 View commit details
    Browse the repository at this point in the history