diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-01-25 15:36:38 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-01-25 15:36:38 +0200 |
commit | 4ebf0075806ccf2bdde276a4e56eac41c7e350c4 (patch) | |
tree | 89b4572543527808c92f4e37448bca4012e926ad /libvo/vo_gl.c | |
parent | efd25f7811b232ae2b1899ca0fee6fd598837b9f (diff) | |
parent | c2ba58aefce038ce4ccf6ed23791f5de823aa041 (diff) | |
download | mpv-4ebf0075806ccf2bdde276a4e56eac41c7e350c4.tar.bz2 mpv-4ebf0075806ccf2bdde276a4e56eac41c7e350c4.tar.xz |
Merge svn changes up to r30375
Diffstat (limited to 'libvo/vo_gl.c')
-rw-r--r-- | libvo/vo_gl.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index e86425dbe7..b962beabc8 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -91,6 +91,7 @@ static int use_ycbcr; #define MASK_GAMMA_SUPPORT (MASK_NOT_COMBINERS & ~(1 << YUV_CONVERSION_FRAGMENT)) static int use_yuv; static int colorspace; +static int levelconv; static int is_yuv; static int lscale; static int cscale; @@ -214,7 +215,7 @@ static void update_yuvconv(void) { float ggamma = exp(log(8.0) * eq_ggamma / 100.0); float bgamma = exp(log(8.0) * eq_bgamma / 100.0); gl_conversion_params_t params = {gl_target, yuvconvtype, - {colorspace, bri, cont, hue, sat, rgamma, ggamma, bgamma}, + {colorspace, levelconv, bri, cont, hue, sat, rgamma, ggamma, bgamma}, texture_width, texture_height, 0, 0, filter_strength}; mp_get_chroma_shift(image_format, &xs, &ys); params.chrom_texw = params.texw >> xs; @@ -996,6 +997,12 @@ static int valid_csp(void *p) return *csp >= -1 && *csp < MP_CSP_COUNT; } +static int valid_csp_lvl(void *p) +{ + int *lvl = p; + return *lvl >= -1 && *lvl < MP_CSP_LEVELCONV_COUNT; +} + static const opt_t subopts[] = { {"manyfmts", OPT_ARG_BOOL, &many_fmts, NULL}, {"osd", OPT_ARG_BOOL, &use_osd, NULL}, @@ -1006,6 +1013,7 @@ static const opt_t subopts[] = { {"rectangle", OPT_ARG_INT, &use_rectangle,int_non_neg}, {"yuv", OPT_ARG_INT, &use_yuv, int_non_neg}, {"colorspace", OPT_ARG_INT, &colorspace, valid_csp}, + {"levelconv", OPT_ARG_INT, &levelconv, valid_csp_lvl}, {"lscale", OPT_ARG_INT, &lscale, int_non_neg}, {"cscale", OPT_ARG_INT, &cscale, int_non_neg}, {"filter-strength", OPT_ARG_FLOAT, &filter_strength, NULL}, @@ -1037,6 +1045,7 @@ static int preinit(const char *arg) use_ycbcr = 0; use_yuv = 0; colorspace = -1; + levelconv = -1; lscale = 0; cscale = 0; filter_strength = 0.5; @@ -1099,6 +1108,10 @@ static int preinit(const char *arg) " 3: YUV to RGB according to SMPT-240M\n" " 4: YUV to RGB according to EBU\n" " 5: XYZ to RGB\n" + " levelconv=<n>\n" + " 0: YUV to RGB converting TV to PC levels\n" + " 1: YUV to RGB converting PC to TV levels\n" + " 2: YUV to RGB without converting levels\n" " lscale=<n>\n" " 0: use standard bilinear scaling for luma.\n" " 1: use improved bicubic scaling for luma.\n" |