Skip to content

Commit

Permalink
sub/sd_ass: set ASS_OVERRIDE_BIT_BLUR if available
Browse files Browse the repository at this point in the history
  • Loading branch information
llyyr authored and kasper93 committed Nov 3, 2024
1 parent b057af0 commit 9bf0c53
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions DOCS/interface-changes/sub-ass-override-blur.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
`sub-blur` is now applied by `sub-ass-override=force` with new enough libass
6 changes: 4 additions & 2 deletions DOCS/man/options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2545,7 +2545,8 @@ Subtitles
``--sub-ass-override=<no|yes|scale|force|strip>``
Control whether user style overrides should be applied. Note that all of
these overrides try to be somewhat smart about figuring out whether or not
a subtitle is considered a "sign".
a subtitle is considered a "sign" and try to be as non-destructive as
possible.

:no: Render subtitles as specified by the subtitle scripts, without
overrides.
Expand All @@ -2554,7 +2555,8 @@ Subtitles
rendering.
:scale: Like ``yes``, but also apply ``--sub-scale`` (default).
:force: Like ``yes``, but also force all ``--sub-*`` options. Can break
rendering easily.
rendering easily. Certain options aren't overridden if they can
potentially be too destructive.
:strip: Radically strip all ASS tags and styles from the subtitle. This
is equivalent to the old ``--no-ass`` / ``--no-sub-ass`` options.

Expand Down
3 changes: 3 additions & 0 deletions sub/sd_ass.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,9 @@ static void configure_ass(struct sd *sd, struct mp_osd_res *dim,
| ASS_OVERRIDE_BIT_COLORS
| ASS_OVERRIDE_BIT_BORDER
| ASS_OVERRIDE_BIT_SELECTIVE_FONT_SCALE;
#if LIBASS_VERSION >= 0x01703020
set_force_flags |= ASS_OVERRIDE_BIT_BLUR;
#endif
}
if (shared_opts->ass_style_override[sd->order] == ASS_STYLE_OVERRIDE_SCALE)
set_force_flags |= ASS_OVERRIDE_BIT_SELECTIVE_FONT_SCALE;
Expand Down

0 comments on commit 9bf0c53

Please sign in to comment.