mpv/sub
Dudemanguy fa89082f2e sub: avoid unneeded calls to is_animated
4e5d996c3a added this as part of a series
of patches written to avoid wasteful sub redraws when playing a still
image with subs. The is_animated special case was specifically for ASS
subtitles that have animations/effects and would need repeated redraws
in the still image case. This check was done unconditionally for all ASS
subtitles, but for very big ASS subtitles, this text parsing can get a
bit expensive.

Because this function call is only ever needed for the weird edge case
of ASS subtitles over a still image, some additional logic can be added
to avoid calling is_animated in the vast majority of cases. The animated
field in demux_packet can be changed to a tristate instead where -1
indicates "unknown" (the default state). In update_subtitle, we can look
at the current state of the video tracks and decide whether or not it is
neccesary to perform is_animated and pass that knowledge to sd_ass
before any subtitle packets are decoded and thus save us from doing this
potentially expensive call.
2024-06-04 12:29:13 +00:00
..
ass_mp.c sub: add flag if sub_bitmap should be rendered in video color space 2024-03-02 15:57:02 +00:00
ass_mp.h sub: add flag if sub_bitmap should be rendered in video color space 2024-03-02 15:57:02 +00:00
dec_sub.c sub: avoid unneeded calls to is_animated 2024-06-04 12:29:13 +00:00
dec_sub.h sub: avoid unneeded calls to is_animated 2024-06-04 12:29:13 +00:00
draw_bmp.c all: add missing repr assignments 2024-01-26 18:17:02 +02:00
draw_bmp.h csputils: replace mp_alpha_type with pl_alpha_mode 2024-01-22 14:54:55 +00:00
filter_jsre.c sd_ass: allow get_text to return more than 500 bytes 2024-04-27 01:19:56 +02:00
filter_regex.c sd_ass: allow get_text to return more than 500 bytes 2024-04-27 01:19:56 +02:00
filter_sdh.c filter_sdh: optimize get_char_bytes 2024-01-15 16:05:17 +00:00
img_convert.c various: replace some OOM handling 2023-11-24 10:04:55 +01:00
img_convert.h
lavc_conv.c sub/lavc_conv: don't override style of converted teletext pages 2024-04-27 01:14:23 +02:00
meson.build
osd.c sub/osd: fix rounding when rescaling bitmap subtitle rects 2024-05-03 16:16:53 +02:00
osd.h osd: show left arrow when playing backwards 2024-05-05 13:47:20 +02:00
osd_font.otf tools: add narrow left arrow glyph for OSD 2024-05-05 13:47:20 +02:00
osd_libass.c command: add escape-ass 2024-03-21 03:20:14 +01:00
osd_state.h
sd.h options: move sub-ass-override 'scale' above 'force' 2024-05-29 17:48:50 +00:00
sd_ass.c sub: avoid unneeded calls to is_animated 2024-06-04 12:29:13 +00:00
sd_lavc.c sd_lavc: reduce unnecessary error log on probing nonexistent codecs 2024-05-03 16:13:07 +02:00