mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
sub: change how libass output is converted to RGBA in some cases
This affects VOs (or other code which render OSD) which does not support the LIBASS format, but only RGBA. Instead of having a converter stage in osd.c, make mp_ass_packer_pack() output directly in RGBA. In general, this is work towards refcounted subtitle images. Although we could keep the "converter" design, doing it this way seems simpler, at least considering the current situation with only 2 OSD formats. It also prevents copying & packing the data twice, which will lead to better performance. (Although I guess this case is not important at all.) It also fixes --force-rgba-osd-rendering when used with vo_opengl, vo_vdpau, and vo_direct3d.
This commit is contained in:
@@ -5,8 +5,6 @@
|
||||
|
||||
#include "osd.h"
|
||||
|
||||
#define OSD_CONV_CACHE_MAX 4
|
||||
|
||||
enum mp_osdtype {
|
||||
OSDTYPE_SUB,
|
||||
OSDTYPE_SUB2, // IDs must be numerically successive
|
||||
@@ -48,10 +46,6 @@ struct osd_object {
|
||||
// OSDTYPE_EXTERNAL2
|
||||
struct sub_bitmaps *external2;
|
||||
|
||||
// caches for OSD conversion (internal to render_object())
|
||||
struct osd_conv_cache *cache[OSD_CONV_CACHE_MAX];
|
||||
struct sub_bitmaps cached;
|
||||
|
||||
// VO cache state
|
||||
int vo_change_id;
|
||||
struct mp_osd_res vo_res;
|
||||
|
||||
Reference in New Issue
Block a user