diff options
author | Niklas Haas <git@nand.wakku.to> | 2016-05-16 00:19:25 +0200 |
---|---|---|
committer | Niklas Haas <git@nand.wakku.to> | 2016-05-16 02:45:39 +0200 |
commit | 3cfe98c6848d888e06e5d402f9100d55ab09d755 (patch) | |
tree | 4c0825680c3da6c157c90b777c376e94ddd3067d /video/out | |
parent | f81f486c68ca55c1e6175e41b0473d9568a6fe5b (diff) |
vo_opengl: avoid redundant double-gamma conversion
Due to the way color management in mpv worked historically, the subtitle
blending function was written to preserve the linearity of the input.
(In the past, the 3DLUT function required linear inputs)
Since the 3DLUT was refactored to accept the video color directly, the
re-linearization after blending is now virtually always redundant.
(Notably, it's also redundant when CMS is turned off, so this way of
writing the code stopped making sense a long time ago. It is a remnant
from before the pass_colormanage function was as flexible as it is now)
Diffstat (limited to 'video/out')
-rw-r--r-- | video/out/opengl/video.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c index f23143c2b3..7470f9668d 100644 --- a/video/out/opengl/video.c +++ b/video/out/opengl/video.c @@ -2506,15 +2506,15 @@ static void pass_render_frame(struct gl_video *p) rect.ml *= scale[0]; rect.mr *= scale[0]; rect.mt *= scale[1]; rect.mb *= scale[1]; // We should always blend subtitles in non-linear light - if (p->use_linear) + if (p->use_linear) { pass_delinearize(p->sc, p->image_params.gamma); + p->use_linear = false; + } finish_pass_fbo(p, &p->blend_subs_fbo, p->texture_w, p->texture_h, FBOTEX_FUZZY); pass_draw_osd(p, OSD_DRAW_SUB_ONLY, vpts, rect, p->texture_w, p->texture_h, p->blend_subs_fbo.fbo, false); pass_read_fbo(p, &p->blend_subs_fbo); - if (p->use_linear) - pass_linearize(p->sc, p->image_params.gamma); } pass_opt_hook_point(p, "SCALED", NULL); |