1
mirror of https://github.com/mpv-player/mpv synced 2024-11-14 22:48:35 +01:00
mpv/video/out/opengl/lcms.h
wm4 9ab0f60d44 vo_opengl: simplify option handling
Instead of copying the options around... just don't. video.c now has
full control over when options are updated. (It still gets notified from
outside, but it decides when the updated options are copied: when
m_config_cache_update() is called.) So there's no need for tricky
stuff, and it can be simplified a bit.

Also change lcms.c. We could do it like video.c, and get the options
from the global config store. But it seems simpler to just provide a
pointer to an option struct, which is arbitrarily mutated from the
outside (from the perspective of lcms.c).
2016-09-06 11:11:36 +02:00

40 lines
991 B
C

#ifndef MP_GL_LCMS_H
#define MP_GL_LCMS_H
#include <stddef.h>
#include <stdbool.h>
#include "misc/bstr.h"
extern const struct m_sub_options mp_icc_conf;
struct mp_icc_opts {
char *profile;
int profile_auto;
char *cache_dir;
char *size_str;
int intent;
int contrast;
};
struct lut3d {
uint16_t *data;
int size[3];
};
struct mp_log;
struct mpv_global;
struct gl_lcms;
struct gl_lcms *gl_lcms_init(void *talloc_ctx, struct mp_log *log,
struct mpv_global *global,
struct mp_icc_opts *opts);
void gl_lcms_update_options(struct gl_lcms *p);
bool gl_lcms_set_memory_profile(struct gl_lcms *p, bstr profile);
bool gl_lcms_has_profile(struct gl_lcms *p);
bool gl_lcms_get_lut3d(struct gl_lcms *p, struct lut3d **,
enum mp_csp_prim prim, enum mp_csp_trc trc);
bool gl_lcms_has_changed(struct gl_lcms *p, enum mp_csp_prim prim,
enum mp_csp_trc trc);
#endif