summaryrefslogtreecommitdiffstats
path: root/sub/img_convert.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-11-25 00:06:16 +0100
committerwm4 <wm4@nowhere>2012-11-25 23:40:07 +0100
commit24bfa82a91a49b0e2a120b719a6b89ac2b1b415b (patch)
tree1413d73435d6a6dfe174a214da8943a8bd040aef /sub/img_convert.h
parent2bd7f980ac5b692b62b0765c4411129f953b0593 (diff)
downloadmpv-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 'sub/img_convert.h')
-rw-r--r--sub/img_convert.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sub/img_convert.h b/sub/img_convert.h
index c947c44f01..eab543051c 100644
--- a/sub/img_convert.h
+++ b/sub/img_convert.h
@@ -11,5 +11,7 @@ struct osd_conv_cache *osd_conv_cache_new(void);
// These functions convert from one OSD format to another. On success, they copy
// the converted image data into c, and change imgs to point to the data.
bool osd_conv_idx_to_rgba(struct osd_conv_cache *c, struct sub_bitmaps *imgs);
+bool osd_conv_blur_rgba(struct osd_conv_cache *c, struct sub_bitmaps *imgs,
+ double gblur);
#endif