diff options
author | wm4 <wm4@nowhere> | 2016-06-30 21:38:50 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-06-30 21:38:50 +0200 |
commit | c57304a591d46df490e1584b1a3c9cda1ff91b44 (patch) | |
tree | d64734c8782bbd1b0a8be01b9c2b4a90df39899d /sub/ass_mp.h | |
parent | 2d6da37b6b4acfd31487e59e788e2d7b13172314 (diff) | |
download | mpv-c57304a591d46df490e1584b1a3c9cda1ff91b44.tar.bz2 mpv-c57304a591d46df490e1584b1a3c9cda1ff91b44.tar.xz |
sub: pack libass bitmaps directly in sd_ass.c and osd_libass.c
Change all producer of libass images to packing the bitmaps into a
single larger bitmap directly when they're output. This is supposed to
help working towards refcounted sub bitmaps.
This will reduce performance for VOs like vo_xv, but not for vo_opengl.
vo_opengl simply will pick up the pre-packed sub bitmaps, and skip
packing them again. vo_xv will copy and pack the sub bitmaps
unnecessarily - but if we want sub bitmap refcounting, they'd have to be
copied anyway.
The packing code cannot be removed yet from vo_opengl, because there are
certain corner cases that still produce unpackad other sub bitmaps.
Actual refcounting will also require more work.
Diffstat (limited to 'sub/ass_mp.h')
-rw-r--r-- | sub/ass_mp.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sub/ass_mp.h b/sub/ass_mp.h index 20f0ebe9bd..50397bdc6b 100644 --- a/sub/ass_mp.h +++ b/sub/ass_mp.h @@ -49,9 +49,11 @@ void mp_ass_configure_fonts(ASS_Renderer *priv, struct osd_style_opts *opts, struct mpv_global *global, struct mp_log *log); ASS_Library *mp_ass_init(struct mpv_global *global, struct mp_log *log); -struct sub_bitmap; struct sub_bitmaps; -void mp_ass_render_frame(ASS_Renderer *renderer, ASS_Track *track, double time, - struct sub_bitmaps *res); +struct mp_ass_packer; +struct mp_ass_packer *mp_ass_packer_alloc(void *ta_parent); +void mp_ass_packer_pack(struct mp_ass_packer *p, ASS_Image **image_lists, + int num_image_lists, bool changed, + int preferred_osd_format, struct sub_bitmaps *out); #endif /* MPLAYER_ASS_MP_H */ |