summaryrefslogtreecommitdiffstats
path: root/sub
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-04-13 18:53:03 +0200
committerwm4 <wm4@nowhere>2013-04-13 18:53:03 +0200
commitdf8a481eba2316f8171ec0cde4e8e192765aad16 (patch)
treebf1b1895aeeac222e0a0dc3d362cca840e858577 /sub
parent3097176ff1b43991ae78990bb06e8c21981e4170 (diff)
downloadmpv-df8a481eba2316f8171ec0cde4e8e192765aad16.tar.bz2
mpv-df8a481eba2316f8171ec0cde4e8e192765aad16.tar.xz
sub: add --osd-blur and --sub-text-blur options
These require bleeding edge libass (latest git version), and will be ignored otherwise. I'm not sure about the blur factor and scaling. The ASS/VSFilter semantics for blur scaling are a bad mess. Might require further investigation.
Diffstat (limited to 'sub')
-rw-r--r--sub/ass_mp.c3
-rw-r--r--sub/sub.c1
-rw-r--r--sub/sub.h1
3 files changed, 5 insertions, 0 deletions
diff --git a/sub/ass_mp.c b/sub/ass_mp.c
index 35883da84b..497e307953 100644
--- a/sub/ass_mp.c
+++ b/sub/ass_mp.c
@@ -69,6 +69,9 @@ void mp_ass_set_style(ASS_Style *style, struct osd_style_opts *opts)
style->MarginV = opts->margin_y * scale;
style->ScaleX = 1.;
style->ScaleY = 1.;
+#if LIBASS_VERSION >= 0x01020000
+ style->Blur = opts->blur;
+#endif
}
ASS_Track *mp_ass_default_track(ASS_Library *library, struct MPOpts *opts)
diff --git a/sub/sub.c b/sub/sub.c
index b0c9e22d7a..e9496f7853 100644
--- a/sub/sub.c
+++ b/sub/sub.c
@@ -79,6 +79,7 @@ const struct m_sub_options osd_style_conf = {
OPT_FLOATRANGE("spacing", spacing, 0, -10, 10),
OPT_INTRANGE("margin-x", margin_x, 0, 0, 300),
OPT_INTRANGE("margin-y", margin_y, 0, 0, 600),
+ OPT_FLOATRANGE("blur", blur, 0, 0, 20),
{0}
},
.size = sizeof(struct osd_style_opts),
diff --git a/sub/sub.h b/sub/sub.h
index 660fd9ccc9..f062b3dddf 100644
--- a/sub/sub.h
+++ b/sub/sub.h
@@ -192,6 +192,7 @@ struct osd_style_opts {
float spacing;
int margin_x;
int margin_y;
+ float blur;
};
extern const struct m_sub_options osd_style_conf;