From f72eb5b394c5145c1f5ae2546f8c628550e928e4 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 17 Jun 2016 20:10:39 +0200 Subject: sub: move paletted image handling completely to sd_lavc.c Until now, subtitle renderers could export SUBBITMAP_INDEXED, which is a 8 bit per pixel with palette format. sd_lavc.c was the only renderer doing this, and the result was converted to RGBA in every use-case (except maybe when the subtitles were hidden.) Change it so that sd_lavc.c converts to RGBA on its own. This simplifies everything a bit, and the palette handling can be removed from the common code. This is also preparation for making subtitle images refcounted. The "caching" in img_convert.c is a PITA in this respect, and needs to be redone. So getting rid of some img_convert.c code is a positive side- effect. Also related to refcounted subtitles is packing them into a single mp_image. Fewer objects to refcount is easier, and for the libass format the same will be done. The plan is to remove manual packing from the VOs which need single images entirely. --- video/out/bitmap_packer.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'video/out/bitmap_packer.h') diff --git a/video/out/bitmap_packer.h b/video/out/bitmap_packer.h index b86c3ec4f9..c9503fe42c 100644 --- a/video/out/bitmap_packer.h +++ b/video/out/bitmap_packer.h @@ -23,9 +23,10 @@ struct bitmap_packer { int asize; }; -struct ass_image; struct sub_bitmaps; +#define PACKER_MAX_WH 65536 + // Clear all internal state. Leave the following fields: w_max, h_max void packer_reset(struct bitmap_packer *packer); -- cgit v1.2.3