Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-129499

Color management and HDR support in Qt

    XMLWordPrintable

Details

    • Color Management and HDR
    • All
    • a3a691c5a (dev), 938df7908 (dev), 85ec8df82 (6.8)

    Description

      This epic tracks the items needed to support wide gamut and high dynamic range in Qt, from the bottom of the stack all the way though to Qt Quick and Qt Multimedia. The topics of color management and HDR are tracked as one, due to their overlapping requirements and tight coupling.

      Color Management

      Qt Gui

      On a cross platform level we have QColorSpace, QColorTransform, and helpers on e.g. QImage for color transformations.

      On the QPA level the building blocks are QWindow and its associated QSurfaceFormat, and the properties of the QScreen.

      A client that presents assets (colors, images, etc) from different sources with different input color spaces needs to target a single color space in its color management pipeline (for example sRGB). The client has two options here:

      1. Set the target color space on the window's surface format
        • And verify that the requested format was picked up after creation
          • If the compositor is not able to do color matching on the compositor side between multiple windows (all targeting a single screen color space), or can't support the given requested color space, then the request may fail and the window may report an effective color space that matches the screen.
      2. Leave the color space of the window to the default surface format
        • Read the resulting color space from the window after creation and use that as the target color space.

      Approach #1 may use approach #2 as a fallback in case the compositor is unable to satisfy the requested color space, or may report a warning/error that color accurate rendering can not be supported.

      The following manual test shows the difference between the two approaches: https://codereview.qt-project.org/c/qt/qtbase/+/595168

      An alternative for color matching content within a window (via QColorTransform or similar) is to break the window up into child QWindows, and use approach #1 to let the compositor do the color matching. This approach can be selectively used as a workaround, but does not scale well if entire UI hierarchies need to be backed by individual QWindows.

      Qt Widgets

      Qt Widgets does not do any automatic color management today, and doing so is not in scope for this epic at this point. Widget based apps can still color match manually via QColorTransform and friends, or use the child window approach for select widgets as a workaround.

      Qt Quick

      Qt Multimedia

      HDR

       

      Attachments

        For Gerrit Dashboard: QTBUG-129499
        # Subject Branch Project Status CR V

        Activity

          People

            vestbo Tor Arne Vestbø
            vestbo Tor Arne Vestbø
            Maycon Stamboroski Maycon Stamboroski
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes