From: greg Date: Thu, 18 Jun 2009 12:15:12 +0000 (+0200) Subject: Set a more reasonable maximum blur radius and make \blur animatable. X-Git-Tag: 0.9.7~115 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7036f4774944d8acd2a175f1171e8c988f8c9d36;p=libass Set a more reasonable maximum blur radius and make \blur animatable. --- diff --git a/libass/ass_render.c b/libass/ass_render.c index 66b513e..141de49 100644 --- a/libass/ass_render.c +++ b/libass/ass_render.c @@ -43,7 +43,7 @@ #define MAX_GLYPHS_INITIAL 1024 #define MAX_LINES_INITIAL 64 -#define BLUR_MAX_RADIUS 50.0 +#define BLUR_MAX_RADIUS 100.0 #define MAX_BE 100 #define ROUND(x) ((int) ((x) + .5)) #define SUBPIXEL_MASK 56 // d6 bitmask for subpixel accuracy adjustment @@ -865,6 +865,7 @@ static char* parse_tag(ass_renderer_t* render_priv, char* p, double pwr) { } else if (mystrcmp(&p, "blur")) { double val; if (mystrtod(&p, &val)) { + val = render_priv->state.blur * (1-pwr) + val*pwr; val = (val < 0) ? 0 : val; val = (val > BLUR_MAX_RADIUS) ? BLUR_MAX_RADIUS : val; render_priv->state.blur = val;