mpv/sub
nanahi dec73f503f sub/osd: fix rounding when rescaling bitmap subtitle rects
With multiple rects touching each other without any gaps, the current
scale method can cause gaps or overlaps between rects. To make sure that
this does not happen, scale on the edges of the rects instead, and then
calculate the width and height from the results.

NB: while this is better than the status quo, it does not fix all
scaling artifacts because of the following:

- When two rects share a vertical edge but have different heights,
  misalignment will occur: after rounding rect heights to pixels,
  the height scale factor for the two rects will be slightly different.
  As a result, there will be misalignment between the scaled images.
- With a GPU renderer, different bitmap subtitle parts are rendered as
  different textures. This means that the pixel contents of the parts have
  different boundary conditions from the whole combined image. As a result,
  there will still be small gaps when the subtitle is scaled up.

The only way to properly address these points is to make sure that the
parts are combined to a single image at the native resolution before
being scaled. This can be partly achieved with --blend-subtitles=video.
2024-05-03 16:16:53 +02: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 dec_sub: fix locking for sub_ass_get_extradata 2024-04-24 15:52:17 +02:00
dec_sub.h player/command: add sub-text/ass-full sub-property 2024-04-27 01:19:56 +02: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 sub: move RGBA scaling to vo_vaapi 2016-07-03 19:32:43 +02:00
lavc_conv.c sub/lavc_conv: don't override style of converted teletext pages 2024-04-27 01:14:23 +02:00
meson.build build: remove outdated generated directory 2023-07-31 19:00:06 +00:00
osd.c sub/osd: fix rounding when rescaling bitmap subtitle rects 2024-05-03 16:16:53 +02:00
osd.h command: add escape-ass 2024-03-21 03:20:14 +01:00
osd_font.otf osc: use custom symbols for window controls 2019-12-11 13:53:10 -08:00
osd_libass.c command: add escape-ass 2024-03-21 03:20:14 +01:00
osd_state.h ALL: use new mp_thread abstraction 2023-11-05 17:36:17 +00:00
sd.h sd_ass: allow get_text to return more than 500 bytes 2024-04-27 01:19:56 +02:00
sd_ass.c player/command: add sub-text/ass-full sub-property 2024-04-27 01:19:56 +02:00
sd_lavc.c sd_lavc: reduce unnecessary error log on probing nonexistent codecs 2024-05-03 16:13:07 +02:00