From 8f8f6e6d9d27eef37640b363214a775647a0f2f4 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 3 Oct 2012 17:00:37 +0200 Subject: sub: remove logic for disabling hinting on scaled EOSD This was an extremely obscure setting, as it was used only with vo_gl if its scaled-osd suboption was used. If you really want this, you can set the desired ass-hinting value directly, and there will be literally no loss in functionality. Note that this didn't actually test whether the EOSD was scaled. Basically, it only checked whether vo_gl had the scaled-osd suboption set. --- sub/ass_mp.c | 7 ++----- sub/ass_mp.h | 2 +- sub/sd_ass.c | 2 +- sub/sub.h | 1 - 4 files changed, 4 insertions(+), 8 deletions(-) (limited to 'sub') diff --git a/sub/ass_mp.c b/sub/ass_mp.c index 5766a847f8..ba93c4c842 100644 --- a/sub/ass_mp.c +++ b/sub/ass_mp.c @@ -226,17 +226,14 @@ ASS_Track *mp_ass_read_stream(ASS_Library *library, const char *fname, } void mp_ass_configure(ASS_Renderer *priv, struct MPOpts *opts, - struct mp_eosd_res *dim, bool unscaled) + struct mp_eosd_res *dim) { int hinting; ass_set_frame_size(priv, dim->w, dim->h); ass_set_margins(priv, dim->mt, dim->mb, dim->ml, dim->mr); ass_set_use_margins(priv, opts->ass_use_margins); ass_set_font_scale(priv, opts->ass_font_scale); - if (!unscaled && (opts->ass_hinting & 4)) - hinting = 0; - else - hinting = opts->ass_hinting & 3; + hinting = opts->ass_hinting & 3; // +4 was for no hinting if scaled ass_set_hinting(priv, hinting); ass_set_line_spacing(priv, opts->ass_line_spacing); } diff --git a/sub/ass_mp.h b/sub/ass_mp.h index 805e9d7310..4ca43dfb2e 100644 --- a/sub/ass_mp.h +++ b/sub/ass_mp.h @@ -42,7 +42,7 @@ ASS_Track *mp_ass_read_stream(ASS_Library *library, const char *fname, struct MPOpts; void mp_ass_configure(ASS_Renderer *priv, struct MPOpts *opts, - struct mp_eosd_res *dim, bool unscaled); + struct mp_eosd_res *dim); void mp_ass_configure_fonts(ASS_Renderer *priv); ASS_Library *mp_ass_init(struct MPOpts *opts); diff --git a/sub/sd_ass.c b/sub/sd_ass.c index 478b1c96a9..8b8ad6c0eb 100644 --- a/sub/sd_ass.c +++ b/sub/sd_ass.c @@ -139,7 +139,7 @@ static void get_bitmaps(struct sh_sub *sh, struct osd_state *osd, if (ctx->vsfilter_aspect && opts->ass_vsfilter_aspect_compat) scale = osd->vsfilter_scale; ASS_Renderer *renderer = osd->ass_renderer; - mp_ass_configure(renderer, opts, &osd->dim, osd->unscaled); + mp_ass_configure(renderer, opts, &osd->dim); ass_set_aspect_ratio(renderer, scale, 1); mp_ass_render_frame(renderer, ctx->ass_track, osd->sub_pts * 1000 + .5, &ctx->parts, res); diff --git a/sub/sub.h b/sub/sub.h index 5e1809bee1..92ac19eb52 100644 --- a/sub/sub.h +++ b/sub/sub.h @@ -67,7 +67,6 @@ struct osd_state { struct mp_eosd_res dim; double normal_scale; double vsfilter_scale; - bool unscaled; bool support_rgba; int w, h; -- cgit v1.2.3