diff options
author | Niklas Haas <git@nand.wakku.to> | 2016-02-13 15:33:00 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-04-01 10:27:27 +0200 |
commit | 2dcf18c0c01282f0f0e72423038a78c1fc938b02 (patch) | |
tree | 2ca8bae135f1c29f6847e68861f8bb3461e8c8c1 /video/out/opengl/video.h | |
parent | 0d746522325923ff5926f3a3cd0024b679a8199f (diff) | |
download | mpv-2dcf18c0c01282f0f0e72423038a78c1fc938b02.tar.bz2 mpv-2dcf18c0c01282f0f0e72423038a78c1fc938b02.tar.xz |
vo_opengl: generate 3DLUT against source and use full BT.1886
This commit refactors the 3DLUT loading mechanism to build the 3DLUT
against the original source characteristics of the file. This allows us,
among other things, to use a real BT.1886 profile for the source. This
also allows us to actually use perceptual mappings. Finally, this
reduces errors on standard gamut displays (where the previous 3DLUT
target of BT.2020 was unreasonably wide).
This also improves the overall accuracy of the 3DLUT due to eliminating
rounding errors where possible, and allows for more accurate use of
LUT-based ICC profiles.
The current code is somewhat more ugly than necessary, because the idea
was to implement this commit in a working state first, and then maybe
refactor the profile loading mechanism in a later commit.
Fixes #2815.
Diffstat (limited to 'video/out/opengl/video.h')
-rw-r--r-- | video/out/opengl/video.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/video/out/opengl/video.h b/video/out/opengl/video.h index 23b6c86cb1..4f9d497997 100644 --- a/video/out/opengl/video.h +++ b/video/out/opengl/video.h @@ -24,6 +24,7 @@ #include "sub/osd.h" #include "common.h" #include "utils.h" +#include "lcms.h" #include "video/out/filter_kernels.h" // Texture units 0-5 are used by the video, and for free use by the passes @@ -125,14 +126,15 @@ extern const struct gl_video_opts gl_video_opts_def; struct gl_video; struct vo_frame; -struct gl_video *gl_video_init(GL *gl, struct mp_log *log, struct mpv_global *g); +struct gl_video *gl_video_init(GL *gl, struct mp_log *log, struct mpv_global *g, + struct gl_lcms *cms); void gl_video_uninit(struct gl_video *p); void gl_video_set_osd_source(struct gl_video *p, struct osd_state *osd); void gl_video_set_options(struct gl_video *p, struct gl_video_opts *opts); bool gl_video_check_format(struct gl_video *p, int mp_format); void gl_video_config(struct gl_video *p, struct mp_image_params *params); void gl_video_set_output_depth(struct gl_video *p, int r, int g, int b); -void gl_video_set_lut3d(struct gl_video *p, struct lut3d *lut3d); +void gl_video_update_profile(struct gl_video *p); void gl_video_render_frame(struct gl_video *p, struct vo_frame *frame, int fbo); void gl_video_resize(struct gl_video *p, int vp_w, int vp_h, struct mp_rect *src, struct mp_rect *dst, |