1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-25 16:33:02 +00:00
mpv/sub
wm4 1c65428d6f sub: do not copy the target image if there is no OSD/subs
It's not easy to tell whether the OSD/subs are empty, or if something is
drawn. In general you have to use osd_draw() with a custom callback. If
nothing is visible, the callback is never invoked. (The actual reason
why this is so "hard" is the implementation of osd_libass.c, which
doesn't allow separating rendering and drawing of OSD elements, because
all OSD elements share the same ASS_Renderer.)

To simplify avoiding copies, make osd_draw_on_image() instead of the
caller use mp_image_make_writeable(). Introduce osd_draw_on_image_p(),
which works like osd_draw_on_image(), but gets the new image allocation
from an image pool. This is supposed to be an optimization, because it
reduces the frequency of large allocations/deallocations for image data.

The result of this is that the frequency of copies needed in conjunction
with vf_sub, screenshots, and vo_lavc (encoding) should be reduced.
vf_sub now always does true pass-through if no subs are shown.

Drop the pts check from vf_sub. This didn't make much sense.
2013-01-13 20:04:12 +01:00
..
ass_mp.c sub: add --sub-text-* options to unstyled text subtitles font 2013-01-05 14:11:56 +01:00
ass_mp.h cleanup: ass_mp.h: remove dummy declarations 2013-01-06 16:22:50 +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 draw_bmp: better way to find 444 format 2013-01-13 20:04:11 +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 path: add mp_find_config_file and reorganize some of the code 2012-12-15 17:38:00 +01:00
find_subfiles.h sub: remove vobsub reader in favor of ffmpeg vobsub demuxer 2012-12-11 00:37:54 +01:00
img_convert.c video: cleanup: replace old mp_image function names 2013-01-13 20:04:11 +01:00
img_convert.h sub: add ASS to RGBA conversion 2012-12-28 08:30:15 +01: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 sub: add --sub-text-* options to unstyled text subtitles font 2013-01-05 14:11:56 +01:00
sd_ass.c sd_ass: free external subtitle tracks 2012-12-14 19:59:30 +01:00
sd_lavc.c sd_lavc: keep subs on subtitle track switching 2012-12-12 22:56:41 +01:00
sd.h VO, sub: refactor 2012-10-24 21:56:34 +02:00
spudec.c sub: remove vobsub reader in favor of ffmpeg vobsub demuxer 2012-12-11 00:37:54 +01:00
spudec.h options: remove --ffactor switch 2012-10-24 21:56:35 +02:00
sub.c sub: do not copy the target image if there is no OSD/subs 2013-01-13 20:04:12 +01:00
sub.h sub: do not copy the target image if there is no OSD/subs 2013-01-13 20:04:12 +01:00
subassconvert.c subassconverter: correctly handle RRGGBB and unknow formats 2012-11-25 23:47:57 +01:00
subassconvert.h
subreader.c configure: remove --disable-sortsub 2012-12-11 00:37:54 +01:00
subreader.h subreader: replace sub_free() by talloc destructor 2012-11-16 21:21:15 +01:00