From c15cc15415d76e1a74b3f4a3087b9c208195cc2a Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 28 Dec 2012 17:17:16 +0100 Subject: sub: add experimental --force-rgba-osd-rendering switch --- DOCS/man/en/options.rst | 8 ++++++++ core/cfg-mplayer.h | 1 + core/options.h | 1 + sub/sub.c | 7 ++++++- 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst index c629d35046..162c8a560e 100644 --- a/DOCS/man/en/options.rst +++ b/DOCS/man/en/options.rst @@ -565,6 +565,14 @@ --flip Flip image upside-down. +--force-rgba-osd-rendering + Change how some video outputs render the OSD and text subtitles. This + does not change appearance of the subtitles and only has performance + implications. For VOs which support native ASS rendering (like ``vdpau``, + ``opengl``, ``direct3d``), this can be slightly faster or slower, + depending on GPU drivers and hardware. For other VOs, this just makes + rendering slower. + --force-window-position Forcefully move mpv's video output window to default location whenever there is a change in video parameters, video stream or file. This used to diff --git a/core/cfg-mplayer.h b/core/cfg-mplayer.h index 0aef77ae70..8ef7e9abdd 100644 --- a/core/cfg-mplayer.h +++ b/core/cfg-mplayer.h @@ -610,6 +610,7 @@ const m_option_t mplayer_opts[]={ {"vsync", &vo_vsync, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"panscan", &vo_panscan, CONF_TYPE_FLOAT, CONF_RANGE, 0, 1.0, NULL}, OPT_FLOATRANGE("panscanrange", vo_panscanrange, 0, -19.0, 99.0), + OPT_MAKE_FLAGS("force-rgba-osd-rendering", vo_force_rgba_osd, 0), OPT_CHOICE("colormatrix", requested_colorspace, 0, ({"auto", MP_CSP_AUTO}, {"BT.601", MP_CSP_BT_601}, diff --git a/core/options.h b/core/options.h index 9accec1f0a..5e9fff1c27 100644 --- a/core/options.h +++ b/core/options.h @@ -29,6 +29,7 @@ typedef struct MPOpts { int fullscreen; int vo_dbpp; float vo_panscanrange; + int vo_force_rgba_osd; int requested_colorspace; int requested_input_range; int requested_output_range; diff --git a/sub/sub.c b/sub/sub.c index b01493a790..2ec2207870 100644 --- a/sub/sub.c +++ b/sub/sub.c @@ -170,11 +170,16 @@ static bool spu_visible(struct osd_state *osd, struct osd_object *obj) static void render_object(struct osd_state *osd, struct osd_object *obj, struct mp_osd_res res, double video_pts, - const bool formats[SUBBITMAP_COUNT], + const bool sub_formats[SUBBITMAP_COUNT], struct sub_bitmaps *out_imgs) { struct MPOpts *opts = osd->opts; + bool formats[SUBBITMAP_COUNT]; + memcpy(formats, sub_formats, sizeof(formats)); + if (opts->vo_force_rgba_osd) + formats[SUBBITMAP_LIBASS] = false; + *out_imgs = (struct sub_bitmaps) {0}; if (!osd_res_equals(res, obj->vo_res)) -- cgit v1.2.3