path: root/sub/sd_ass.c
diff options
authorwm4 <wm4@nowhere>2015-03-30 23:52:28 +0200
committerwm4 <wm4@nowhere>2015-03-31 00:09:03 +0200
commit27715b7dd18c4a393b8483b8048cb957172e776b (patch)
tree1a0c9fbcab9591fd451f1525f5fe6613d15a7b7e /sub/sd_ass.c
parent273afdc3a4dc775e427b282f0e30c9a6ae167e06 (diff)
video: move colorspace overrides to vf_format, simplify
Remove the colorspace-related top-level options, add them to vf_format. They are rather obscure and not needed often, so it's better to get them out of the way. In particular, this gets rid of the semi-complicated logic in command.c (most of which was needed for OSD display and the direct feedback from the VO). It removes the duplicated color-related name mappings. This removes the ability to write the colormatrix and related properties. Since filters can be changed at runtime, there's no loss of functionality, except that you can't cycle automatically through the color constants anymore (but who needs to do this). This also changes the type of the mp_csp_names and related variables, so they can directly be used with OPT_CHOICE. This probably ended up a bit awkward, for the sake of not adding a new option type which would have used the previous format.
Diffstat (limited to 'sub/sd_ass.c')
1 files changed, 5 insertions, 3 deletions
diff --git a/sub/sd_ass.c b/sub/sd_ass.c
index dc5a913435..4840594986 100644
--- a/sub/sd_ass.c
+++ b/sub/sd_ass.c
@@ -459,9 +459,11 @@ static void mangle_colors(struct sd *sd, struct sub_bitmaps *parts)
int msgl = basic_conv ? MSGL_V : MSGL_WARN;
ctx->last_params = params;
MP_MSG(sd, msgl, "mangling colors like vsfilter: "
- "RGB -> %s %s -> %s %s -> RGB\n", mp_csp_names[csp],
- mp_csp_levels_names[levels], mp_csp_names[params.colorspace],
- mp_csp_levels_names[params.colorlevels]);
+ "RGB -> %s %s -> %s %s -> RGB\n",
+ m_opt_choice_str(mp_csp_names, csp),
+ m_opt_choice_str(mp_csp_levels_names, levels),
+ m_opt_choice_str(mp_csp_names, params.colorspace),
+ m_opt_choice_str(mp_csp_names, params.colorlevels));
// Conversion that VSFilter would use