1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-09 08:29:36 +00:00
mpv/sub
wm4 ea4332daf4 vo_xv: don't require frame stepping to remove OSD or subs
In order to improve performance, vo_xv didn't create a backup of the
video frame before drawing OSD and subtitles during normal playback. It
required the frontend to do frame stepping if it wanted to redraw the
OSD, but no backup of the video frame was available. (Consider the
following use case: enable the OSD permanently with --osd-level=3, then
pause during playback and do something that shows an OSD message. The
player will advance the video by one frame at the time the new OSD
message is first drawn.)

This also meant that taking a screenshot during playback with vo_xv
would include OSD and subtitles in the resulting image.

Fix this by always creating a backup before drawing OSD or subtitles.
In order to avoid having to create a full copy of the whole image frame,
introduce a complex scheme that tries to backup only the changed
regions.

It's unclear whether the additional complexity in draw_bmp.c for
backing up only the changed areas of the frame is worth it. Possibly
a simpler implementation would suffice, such as tracking only Y ranges
of changed image data, or even just copying the full frame.

vo_xv's get_screenshot() now always creates a copy in order not to
modify the currently displayed frame.
2012-11-21 19:56:59 +01:00
..
ass_mp.c osd: make the OSD and sub font more customizable 2012-11-20 18:00:15 +01:00
ass_mp.h osd: make the OSD and sub font more customizable 2012-11-20 18:00:15 +01:00
dec_sub.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
dec_sub.h VO, sub: refactor 2012-10-24 21:56:34 +02:00
draw_bmp.c vo_xv: don't require frame stepping to remove OSD or subs 2012-11-21 19:56:59 +01:00
draw_bmp.h vo_xv: don't require frame stepping to remove OSD or subs 2012-11-21 19:56:59 +01:00
find_sub.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
find_subfiles.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
find_subfiles.h subs: options: add -sub-paths 2011-04-20 04:22:52 +03:00
img_convert.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
img_convert.h Remove things related to old OSD 2012-10-24 21:56:33 +02:00
osd_dummy.c sub: allow rendering OSD in ASS image format directly, simplify 2012-10-16 07:26:30 +02:00
osd_font.pfb osd: osd_font.h -> osd_font.pfb 2012-07-28 23:36:08 +02:00
osd_libass.c osd: make the OSD and sub font more customizable 2012-11-20 18:00:15 +01:00
sd_ass.c sd_ass: fix ASS subtitles coming from demux_lavf 2012-11-16 22:54:22 +01:00
sd_lavc.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
sd.h VO, sub: refactor 2012-10-24 21:56:34 +02:00
spudec.c Fix potential bugs and issues, general cleanups 2012-11-20 18:00:14 +01:00
spudec.h options: remove --ffactor switch 2012-10-24 21:56:35 +02:00
sub.c vo_xv: don't require frame stepping to remove OSD or subs 2012-11-21 19:56:59 +01:00
sub.h vo_xv: don't require frame stepping to remove OSD or subs 2012-11-21 19:56:59 +01:00
subassconvert.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
subassconvert.h
subreader.c Fix potential bugs and issues, general cleanups 2012-11-20 18:00:14 +01:00
subreader.h subreader: replace sub_free() by talloc destructor 2012-11-16 21:21:15 +01:00
vobsub.c Fix potential bugs and issues, general cleanups 2012-11-20 18:00:14 +01:00
vobsub.h Remove dead code 2012-08-01 17:07:35 +02:00