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

這對於 HDR 轉 HDR 與 SDR 轉 HDR 有效嗎? #55

Open
laichiaheng opened this issue Dec 27, 2023 · 1 comment
Open

這對於 HDR 轉 HDR 與 SDR 轉 HDR 有效嗎? #55

laichiaheng opened this issue Dec 27, 2023 · 1 comment

Comments

@laichiaheng
Copy link

有鑑於 MPV 提供的 --inverse-tone-mapping 成效不彰,希望找尋可靠的替代方案。

@natural-harmonia-gropius
Copy link
Owner

本仓库所有的转换都是从高范围到低范围的,没有对应 --inverse-tone-mapping 的转换。

对每个 profile 中的这一部分

glsl-shader=~~/shaders/hdr-toys/transfer-function/hlg_inv.glsl
glsl-shader=~~/shaders/hdr-toys/utils/chroma_correction.glsl
glsl-shader=~~/shaders/hdr-toys/tone-mapping/dynamic.glsl
glsl-shader=~~/shaders/hdr-toys/gamut-mapping/jedypod.glsl
glsl-shader=~~/shaders/hdr-toys/transfer-function/bt1886.glsl

对于 HDR 到 HDR:

  • 调整第一个 transfer-function 到对应的输入反电光函数 (pq_inv / hlg_inv)
  • 调整 gamut-mapping 到 clip,修改代码头部的 FROM 和 TO 两个宏定义 (#FROM BT2020 #TO P3-D65) 或者移除这一行
  • 调整最后一个 transfer-function 到对应的输出电光函数 (pq / hlg)
  • 设置 glsl-shader-opts=L_sdr= 到对应的输出亮度

对于 SDR 到 HDR:

  • 调整第一个 transfer-function 到对应的输入反电光函数 (bt1886_inv)
  • 移除 chroma_correction 和 tone-mapping
  • 调整 gamut-mapping 到 clip,修改代码头部的 FROM 和 TO 两个宏定义 (#FROM BT709 #TO BT2020)
  • 调整最后一个 transfer-function 到对应的输出电光函数 (pq / hlg)
  • 设置 glsl-shader-opts=L_sdr= 到期望的输出亮度 (300 / 400)

--inverse-tone-mapping 是视 203nit 为信号位 1 的非线性映射,而此处是视 L_sdr 为信号位 1 的线性映射。

描述的比较抽象,而且我自己也没试过,凭感觉回答的。有问题可以再问,只是非周末回复做不到那么及时。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants