From 22af0dce0de5a52806b13003b31aa41467f3034b Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Thu, 2 Apr 2015 11:13:51 +0200 Subject: vo_opengl: CMS no longer implies linear scaling They're completely orthogonal concepts, merged in the past due to convenience and ease of implementing it in the old #ifdef hell renderer. Especially after the CMS stuff was generalized by 634b4a, this was a trivial change to implement and also means color management will be much higher quality when enabled with vo=opengl (which had quantization issues in the past due to the 8 bit FBO format and upscaling), since it can be done in a single pass now. --- DOCS/man/vo.rst | 16 ++++++---------- video/out/gl_video.c | 5 +---- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/DOCS/man/vo.rst b/DOCS/man/vo.rst index a85c890429..e7026952d5 100644 --- a/DOCS/man/vo.rst +++ b/DOCS/man/vo.rst @@ -515,10 +515,8 @@ Available video output drivers are: See the corresponding options for ``scale``. ``linear-scaling`` - Scale in linear light. This is automatically enabled if - ``target-prim``, ``target-trc``, ``icc-profile`` or - ``sigmoid-upscaling`` is set. It should only be used with a - ``fbo-format`` that has at least 16 bit precision. + Scale in linear light. It should only be used with a ``fbo-format`` + that has at least 16 bit precision. ``fancy-downscaling`` When using convolution based filters, extend the filter size @@ -594,7 +592,7 @@ Available video output drivers are: ``sigmoid-upscaling`` When upscaling, use a sigmoidal color transform to avoid emphasizing - ringing artifacts. This also enables ``linear-scaling``. + ringing artifacts. This also implies ``linear-scaling``. ``sigmoid-center`` The center of the sigmoid curve used for ``sigmoid-upscaling``, must @@ -732,8 +730,7 @@ Available video output drivers are: ``icc-profile=`` Load an ICC profile and use it to transform linear RGB to screen output. Needs LittleCMS 2 support compiled in. This option overrides the - ``target-prim``, ``target-trc`` and ``icc-profile-auto`` options. It - also enables ``linear-scaling``. + ``target-prim``, ``target-trc`` and ``icc-profile-auto`` options. ``icc-profile-auto`` Automatically select the ICC display profile currently specified by @@ -772,9 +769,8 @@ Available video output drivers are: Blend subtitles directly onto upscaled video frames, before interpolation and/or color management (default: no). Enabling this causes subtitles to be affected by ``icc-profile``, ``target-prim``, - ``target-trc``, ``interpolation``, ``gamma``, ``post-shader`` and - ``linear-scaling``. It also increases subtitle performance when using - ``interpolation``. + ``target-trc``, ``interpolation``, ``gamma`` and ``post-shader``. It + also increases subtitle performance when using ``interpolation``. The downside of enabling this is that it restricts subtitles to the visible portion of the video, so you can't have subtitles exist in the diff --git a/video/out/gl_video.c b/video/out/gl_video.c index 867e88f267..b007b25bf2 100644 --- a/video/out/gl_video.c +++ b/video/out/gl_video.c @@ -1977,10 +1977,7 @@ static void pass_draw_osd(struct gl_video *p, int draw_flags, double pts, // upscaling static void pass_render_frame(struct gl_video *p) { - bool use_cms = p->use_lut_3d || p->opts.target_prim != MP_CSP_PRIM_AUTO - || p->opts.target_trc != MP_CSP_TRC_AUTO; - p->use_linear = p->opts.linear_scaling || p->opts.sigmoid_upscaling - || use_cms || p->image_params.gamma == MP_CSP_TRC_LINEAR; + p->use_linear = p->opts.linear_scaling || p->opts.sigmoid_upscaling; p->use_indirect = false; // set to true as needed by pass_* pass_read_video(p); pass_convert_yuv(p); -- cgit v1.2.3