HDR10 rendering questions

I need to playback HDR10 content and draw some 2D over video. I think I understand how TV play HDR10|HLG|Dolby vision content, but I don’t understand how to do it from PC through video card with DirectX and OpenGL. I have Y’CbCr or R’G’B’ data in HDR10. My understanding:

  1. Switch display to HDR10 mode and send metadata - done
  2. Create framebuffer FP16 - done
    Then lot of questions:
  • framebuffer is in scRGB color format, right? Can be it changed to BT2020?
  • What is valid range of values? 0…1? -0.5…7.5? 0…14.5?
  • Does scRGB framebuffer contains linear values or gamma corrected?
  • How does video card translate/transform scRGB to output values? which is colorspace used for output to display? BT.2020? something else?
  • I need to convert BT.2020 colorspace to scRGB, correct?
  • Is there such conversion in open source?

PS. To simplify answers: I use Windows 10 and it is already switched to HDR mode.

You need to understand that HDR is not BT.2020 or bits. It is PQ tranfer function, there is no such thing as gamma anymore, not that it existed in sRGB. sRGB is not 2.2 gamma.

Yes, everything on PC is really nonlinear, i.e. PQ tranfer is applied already, with HDR you can do many operations in linear mode, for example BT.2020 primaries correction should be done on linear values, also BT.2390 EETF should be done on linear values, etc.

Yes, BT.2020 RGB or Y’Cb’Cr is what is outputted to display even if it is only DCI-D65.

DCI-D65

I meant P3-D65. Sorry.