diff options
author | Niklas Haas <git@nand.wakku.to> | 2015-02-28 20:15:12 +0100 |
---|---|---|
committer | Niklas Haas <git@nand.wakku.to> | 2015-02-28 20:23:47 +0100 |
commit | a76cc1dafcf948cce93f6d258e33444206a83c45 (patch) | |
tree | 89e3bb2afb4192ee1e8f54aa9943927535845269 /video/csputils.h | |
parent | 8d24e9d9b8ad1b5d82139980eca148dc0f4a1eab (diff) | |
download | mpv-a76cc1dafcf948cce93f6d258e33444206a83c45.tar.bz2 mpv-a76cc1dafcf948cce93f6d258e33444206a83c45.tar.xz |
Revert "Revert recent vo_opengl related commits"
Omitted a simple, but devastasting check. Fixed the relevant commits
now.
This reverts commit 8d24e9d9b8ad1b5d82139980eca148dc0f4a1eab.
diff --git a/video/out/gl_video.c b/video/out/gl_video.c
index 9c8a643..f1ea03e 100644
--- a/video/out/gl_video.c
+++ b/video/out/gl_video.c
@@ -1034,9 +1034,9 @@ static void compile_shaders(struct gl_video *p)
shader_def_opt(&header_conv, "USE_CONV_GAMMA", use_conv_gamma);
shader_def_opt(&header_conv, "USE_CONST_LUMA", use_const_luma);
shader_def_opt(&header_conv, "USE_LINEAR_LIGHT_BT1886",
- gamma_fun == MP_CSP_TRC_BT_1886);
+ use_linear_light && gamma_fun == MP_CSP_TRC_BT_1886);
shader_def_opt(&header_conv, "USE_LINEAR_LIGHT_SRGB",
- gamma_fun == MP_CSP_TRC_SRGB);
+ use_linear_light && gamma_fun == MP_CSP_TRC_SRGB);
shader_def_opt(&header_conv, "USE_SIGMOID", use_sigmoid);
if (p->opts.alpha_mode > 0 && p->has_alpha && p->plane_count > 3)
shader_def(&header_conv, "USE_ALPHA_PLANE", "3");
Diffstat (limited to 'video/csputils.h')
-rw-r--r-- | video/csputils.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/video/csputils.h b/video/csputils.h index b6d17c1815..a082682e43 100644 --- a/video/csputils.h +++ b/video/csputils.h @@ -68,15 +68,19 @@ enum mp_csp_prim { MP_CSP_PRIM_COUNT }; +// Any enum mp_csp_prim value is a valid index (except MP_CSP_PRIM_COUNT) +extern const char *const mp_csp_prim_names[MP_CSP_PRIM_COUNT]; + enum mp_csp_trc { - MP_CSP_TRC_NONE, + MP_CSP_TRC_AUTO, MP_CSP_TRC_BT_1886, MP_CSP_TRC_SRGB, - MP_CSP_TRC_LINEAR + MP_CSP_TRC_LINEAR, + MP_CSP_TRC_COUNT }; -// Any enum mp_csp_prim value is a valid index (except MP_CSP_PRIM_COUNT) -extern const char *const mp_csp_prim_names[MP_CSP_PRIM_COUNT]; +// Any enum mp_csp_trc value is a valid index (except MP_CSP_TRC_COUNT) +extern const char *const mp_csp_trc_names[MP_CSP_TRC_COUNT]; // These constants are based on the ICC specification (Table 23) and match // up with the API of LittleCMS, which treats them as integers. @@ -199,12 +203,16 @@ enum mp_csp_levels avcol_range_to_mp_csp_levels(int avrange); enum mp_csp_prim avcol_pri_to_mp_csp_prim(int avpri); +enum mp_csp_trc avcol_trc_to_mp_csp_trc(int avtrc); + int mp_csp_to_avcol_spc(enum mp_csp colorspace); int mp_csp_levels_to_avcol_range(enum mp_csp_levels range); int mp_csp_prim_to_avcol_pri(enum mp_csp_prim prim); +int mp_csp_trc_to_avcol_trc(enum mp_csp_trc trc); + enum mp_csp mp_csp_guess_colorspace(int width, int height); enum mp_csp_prim mp_csp_guess_primaries(int width, int height); |