summaryrefslogtreecommitdiffstats
path: root/DOCS/man/en
diff options
context:
space:
mode:
authorNiklas Haas <git@nand.wakku.to>2014-03-05 03:56:30 +0100
committerwm4 <wm4@nowhere>2014-03-10 22:56:25 +0100
commit6a833797dbafaf11bd37ba9827f828ff07e4577d (patch)
tree53e3a4a393e9f35509f088b857b16ffa383171cc /DOCS/man/en
parent76554ca62a27d2f3dfdff38dc8675fd43bc6ea49 (diff)
downloadmpv-6a833797dbafaf11bd37ba9827f828ff07e4577d.tar.bz2
mpv-6a833797dbafaf11bd37ba9827f828ff07e4577d.tar.xz
vo_opengl: Simplify and clarify color correction code
This commit: - Changes some of the #define and variable names for clarification and adds comments where appropriate. - Unifies :srgb and :icc-profile, making them fit into the same step of the decoding process and removing the weird interactions between both of them. - Makes :icc-profile take precedence over :srgb (to significantly reduce the number of confusing and useless special cases) - Moves BT709 decompanding (approximate or actual) to the shader in all cases, making it happen before upscaling (instead of the old 0.45 gamma function). This is the simpler and more proper way to do it. - Enables the approx gamma function to work with :srgb as well due to this (since they now share the gamma expansion code). - Renames :icc-approx-gamma to :approx-gamma since it is no longer tied to the ICC options or LittleCMS. - Uses gamma 2.4 as input space for the actual 3DLUT, this is now a pretty arbitrary factor but I picked 2.4 mainly because a higher pure power value here seems to produce visually better results with wide gamut profiles, rather then the previous 1.95 or BT.709. - Adds the input gamma space to the 3dlut cache header in case we change it more in the future, or even make it user customizable (though I don't see why the latter would really be necessary). - Fixes the OSD's gamma when using :srgb, which was previously still using the old (0.45) approximation in all cases. - Updates documentation on :srgb, it was still mentioning the old behavior from circa a year ago. This commit should serve to both open up and make the CMS/shader code much more accessible and less confusing/error-prone and simultaneously also improve the performance of 3DLUTs with wide gamut color spaces. I would liked to have made it more modular but almost all of these changes are interdependent, save for the documentation updates. Note: Right now, the "3DLUT takes precedence over SRGB" logic is just coded into gl_lcms.c's compile_shaders function. Ideally, this should be done earlier, when parsing the options (by overriding the actual opts.srgb flag) and output a warning to the user. Note: I'm not sure how well this works together with real-world subtitles that may need to be color corrected as well. I'm not sure whether :approx-gamma needs to apply to subtitles as well. I'll need to test this on proper files later. Note: As of now, linear light scaling is still intrinsically tied to either :srgb or :icc-profile. It would be thinkable to have this as an extra option, :linear-scaling or similar, that could be used with or without the two color management options.
Diffstat (limited to 'DOCS/man/en')
-rw-r--r--DOCS/man/en/vo.rst26
1 files changed, 13 insertions, 13 deletions
diff --git a/DOCS/man/en/vo.rst b/DOCS/man/en/vo.rst
index 44b6e05723..4e4e08ee80 100644
--- a/DOCS/man/en/vo.rst
+++ b/DOCS/man/en/vo.rst
@@ -317,18 +317,14 @@ Available video output drivers are:
by very few OpenGL cards.
``srgb``
- Enable gamma-correct scaling by working in linear light. This
- makes use of sRGB textures and framebuffers.
- This option forces the options ``indirect`` and ``gamma``.
+ Convert and color correct the output to sRGB before displaying it on
+ the screen. This option enables linear light scaling. It also forces
+ the options ``indirect`` and ``gamma``.
- .. note::
-
- for YUV colorspaces, gamma 1/0.45 (2.222) is assumed. RGB input is
- always assumed to be in sRGB.
-
- This option is not really useful, as gamma-correct scaling has not much
- influence on typical video playback. Most visible effect comes from
- slightly different gamma.
+ This option is equivalent to using ``icc-profile`` with an sRGB ICC
+ profile, but it is implemented without a 3DLUT and does not require
+ LittleCMS 2. If both ``srgb`` and ``icc-profile`` are present, the
+ latter takes precedence, as they are somewhat redundant.
``pbo``
Enable use of PBOs. This is slightly faster, but can sometimes lead to
@@ -449,7 +445,9 @@ Available video output drivers are:
``icc-profile=<file>``
Load an ICC profile and use it to transform linear RGB to screen output.
- Needs LittleCMS2 support compiled in.
+ Needs LittleCMS2 support compiled in. This option overrides the ``srgb``
+ property, as using both is somewhat redundant. It also enables linear
+ light scaling.
``icc-cache=<file>``
Store and load the 3D LUT created from the ICC profile in this file.
@@ -467,7 +465,7 @@ Available video output drivers are:
3
absolute colorimetric
- ``icc-approx-gamma``
+ ``approx-gamma``
Approximate the actual BT.709 gamma function as a pure power curve of
1.95. A number of video editing programs and studios apparently use this
for mastering instead of the true curve. Most notably, anything in the
@@ -475,6 +473,8 @@ Available video output drivers are:
compatible with it. It's a sound idea to try enabling this flag first
when watching movies and shows to see if things look better that way.
+ This only affects the output when using either ``icc-profile`` or``srgb``.
+
``3dlut-size=<r>x<g>x<b>``
Size of the 3D LUT generated from the ICC profile in each dimension.
Default is 128x256x64.