2013-03-01 20:19:20 +00:00
|
|
|
#ifndef MP_GL_LCMS_H
|
|
|
|
#define MP_GL_LCMS_H
|
|
|
|
|
2015-01-07 17:47:27 +00:00
|
|
|
#include <stddef.h>
|
2014-02-24 23:04:30 +00:00
|
|
|
#include <stdbool.h>
|
2015-01-07 17:47:27 +00:00
|
|
|
#include "misc/bstr.h"
|
2017-08-10 19:36:57 +00:00
|
|
|
#include "video/csputils.h"
|
2017-07-25 21:17:04 +00:00
|
|
|
#include <libavutil/buffer.h>
|
2014-02-24 23:04:30 +00:00
|
|
|
|
2013-03-01 20:19:20 +00:00
|
|
|
extern const struct m_sub_options mp_icc_conf;
|
|
|
|
|
|
|
|
struct mp_icc_opts {
|
2017-07-25 21:17:04 +00:00
|
|
|
int use_embedded;
|
2013-03-01 20:19:20 +00:00
|
|
|
char *profile;
|
2014-02-24 23:04:30 +00:00
|
|
|
int profile_auto;
|
2015-04-29 16:09:22 +00:00
|
|
|
char *cache_dir;
|
2013-03-01 20:19:20 +00:00
|
|
|
char *size_str;
|
|
|
|
int intent;
|
2016-05-03 19:58:03 +00:00
|
|
|
int contrast;
|
2013-03-01 20:19:20 +00:00
|
|
|
};
|
|
|
|
|
2016-06-03 18:06:29 +00:00
|
|
|
struct lut3d {
|
|
|
|
uint16_t *data;
|
|
|
|
int size[3];
|
|
|
|
};
|
|
|
|
|
2013-09-11 23:28:14 +00:00
|
|
|
struct mp_log;
|
2013-12-21 16:51:20 +00:00
|
|
|
struct mpv_global;
|
2015-01-07 17:47:27 +00:00
|
|
|
struct gl_lcms;
|
|
|
|
|
|
|
|
struct gl_lcms *gl_lcms_init(void *talloc_ctx, struct mp_log *log,
|
2016-09-06 09:11:36 +00:00
|
|
|
struct mpv_global *global,
|
|
|
|
struct mp_icc_opts *opts);
|
|
|
|
void gl_lcms_update_options(struct gl_lcms *p);
|
2016-06-04 15:52:10 +00:00
|
|
|
bool gl_lcms_set_memory_profile(struct gl_lcms *p, bstr profile);
|
|
|
|
bool gl_lcms_has_profile(struct gl_lcms *p);
|
2016-02-13 14:33:00 +00:00
|
|
|
bool gl_lcms_get_lut3d(struct gl_lcms *p, struct lut3d **,
|
2017-07-25 21:17:04 +00:00
|
|
|
enum mp_csp_prim prim, enum mp_csp_trc trc,
|
|
|
|
struct AVBufferRef *vid_profile);
|
2016-02-13 14:33:00 +00:00
|
|
|
bool gl_lcms_has_changed(struct gl_lcms *p, enum mp_csp_prim prim,
|
2017-07-25 21:17:04 +00:00
|
|
|
enum mp_csp_trc trc, struct AVBufferRef *vid_profile);
|
2013-03-01 20:19:20 +00:00
|
|
|
|
|
|
|
#endif
|