mirror of
https://github.com/mpv-player/mpv
synced 2025-02-20 14:56:55 +00:00
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.
This commit is contained in:
parent
13d4ee6d1c
commit
22af0dce0d
@ -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=<file>``
|
||||
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
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user