From 24bfa82a91a49b0e2a120b719a6b89ac2b1b415b Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 25 Nov 2012 00:06:16 +0100 Subject: 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. --- video/sws_utils.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'video/sws_utils.h') diff --git a/video/sws_utils.h b/video/sws_utils.h index d9e22d763b..22d16edefb 100644 --- a/video/sws_utils.h +++ b/video/sws_utils.h @@ -23,6 +23,9 @@ bool mp_sws_supported_format(int imgfmt); void mp_image_swscale(struct mp_image *dst, struct mp_image *src, int my_sws_flags); +void mp_image_sw_blur_scale(struct mp_image *dst, struct mp_image *src, + float gblur); + #endif /* MP_SWS_UTILS_H */ // vim: ts=4 sw=4 et tw=80 -- cgit v1.2.3