diff options
author | wm4 <wm4@nowhere> | 2012-11-25 00:06:16 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-11-25 23:40:07 +0100 |
commit | 24bfa82a91a49b0e2a120b719a6b89ac2b1b415b (patch) | |
tree | 1413d73435d6a6dfe174a214da8943a8bd040aef /core | |
parent | 2bd7f980ac5b692b62b0765c4411129f953b0593 (diff) | |
download | mpv-24bfa82a91a49b0e2a120b719a6b89ac2b1b415b.tar.bz2 mpv-24bfa82a91a49b0e2a120b719a6b89ac2b1b415b.tar.xz |
sub: reimplement -spugauss as --sub-gauss
Apparently the -spugauss option was popular. The code originally
implementing this is gone (scaler stuff in spudec.c). Reimplement it
using libswscale to scale and blur image subtitles if the --sub-gauss
option is set.
The code does some rather lazy padding to allow the blur to spread
pixels past the original image bounding box. (This problem exists with
normal bilinear scaling too, but is barely noticable.)
Technically, this doesn't just blur subtitles, but anything RGBA (or
indexed) that enters the OSD rendering path. But only image subtitles
produce these OSD formats currently, so no explicit check is done to
prevent blurring in other cases.
Diffstat (limited to 'core')
-rw-r--r-- | core/cfg-mplayer.h | 1 | ||||
-rw-r--r-- | core/options.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/core/cfg-mplayer.h b/core/cfg-mplayer.h index d9dcb56e6a..ded7245f83 100644 --- a/core/cfg-mplayer.h +++ b/core/cfg-mplayer.h @@ -506,6 +506,7 @@ const m_option_t common_opts[] = { {"autosub-match", &sub_match_fuzziness, CONF_TYPE_CHOICE, 0, M_CHOICES(({"exact", 0}, {"fuzzy", 1}, {"all", 2}))}, {"sub-pos", &sub_pos, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL}, + OPT_FLOATRANGE("sub-gauss", sub_gauss, 0, 0.0, 3.0), OPT_MAKE_FLAGS("ass", ass_enabled, 0), OPT_FLOATRANGE("sub-scale", sub_scale, 0, 0, 100), OPT_FLOATRANGE("ass-line-spacing", ass_line_spacing, 0, -1000, 1000), diff --git a/core/options.h b/core/options.h index 28bdd70e3c..58d6a64e70 100644 --- a/core/options.h +++ b/core/options.h @@ -113,6 +113,7 @@ typedef struct MPOpts { int sub_auto; struct osd_style_opts *osd_style; float sub_scale; + float sub_gauss; int ass_enabled; float ass_line_spacing; int ass_top_margin; |