From df8a481eba2316f8171ec0cde4e8e192765aad16 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 13 Apr 2013 18:53:03 +0200 Subject: 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. --- sub/ass_mp.c | 3 +++ sub/sub.c | 1 + sub/sub.h | 1 + 3 files changed, 5 insertions(+) (limited to 'sub') 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; -- cgit v1.2.3