From ee63c9c210683df9cbf17f7bbc5f4de8725260f3 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 29 Sep 2015 21:12:26 +0200 Subject: video: replace vf_format outputlevels option with global option The vf_format suboption is replaced with --video-output-levels (a global option and property). In particular, the parameter is removed from mp_image_params. The mechanism is moved to the "video equalizer", which also handles common video output customization like brightness and contrast controls. The new code is slightly cleaner, and the top-level option is slightly more user-friendly than as vf_format sub-option. --- video/csputils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'video/csputils.c') diff --git a/video/csputils.c b/video/csputils.c index ede6cd136f..60cdc54746 100644 --- a/video/csputils.c +++ b/video/csputils.c @@ -90,6 +90,7 @@ const char *const mp_csp_equalizer_names[MP_CSP_EQ_COUNT] = { "hue", "saturation", "gamma", + "output-levels", }; const struct m_opt_choice_alternatives mp_chroma_names[] = { @@ -709,7 +710,6 @@ void mp_csp_set_image_params(struct mp_csp_params *params, mp_image_params_guess_csp(&p); // ensure consistency params->colorspace = p.colorspace; params->levels_in = p.colorlevels; - params->levels_out = p.outputlevels; } // Copy settings from eq into params. @@ -721,6 +721,7 @@ void mp_csp_copy_equalizer_values(struct mp_csp_params *params, params->hue = eq->values[MP_CSP_EQ_HUE] / 100.0 * M_PI; params->saturation = (eq->values[MP_CSP_EQ_SATURATION] + 100) / 100.0; params->gamma = exp(log(8.0) * eq->values[MP_CSP_EQ_GAMMA] / 100.0); + params->levels_out = eq->values[MP_CSP_EQ_OUTPUT_LEVELS]; } static int find_eq(int capabilities, const char *name) -- cgit v1.2.3