From 3365514951e9c07ec3a21bb3898e5796c214f8b7 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 28 Sep 2012 21:38:52 +0200 Subject: sub: allow rendering OSD in ASS image format directly, simplify Before this commit, the OSD was drawn using libass, but the resulting bitmaps were converted to the internal mplayer OSD format. We want to get rid of the old OSD format, because it's monochrome, and can't even be rendered directly using modern video output methods (like with OpenGL/Direct3D/VDPAU). Change it so that VOs can get the ASS images directly, without additional conversions. (This also has the consequence that the OSD can render colors now.) Currently, this is vo_gl3 only. The other VOs still use the old method. Also, the old OSD format is still used for all VOs with DVD subtitles (spudec). Rewrite sub.c. Remove all the awkward flags and bounding boxes and change detection things. It turns out that much of that isn't needed. Move code related to converting subtitle images to img_convert.c. (It has to be noted that all of these conversions were already done before in some places, and that the new code actually makes less use of them.) --- Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index c93fa6b31c..27aa1997dd 100644 --- a/Makefile +++ b/Makefile @@ -266,6 +266,7 @@ SRCS_COMMON = asxparser.c \ sub/sd_lavc.c \ sub/spudec.c \ sub/sub.c \ + sub/img_convert.c \ sub/subassconvert.c \ sub/subreader.c \ sub/vobsub.c \ -- cgit v1.2.3 From cadff3eec75bdd81fb0d18cd0ac029faa3c318d2 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 3 Oct 2012 18:25:41 +0200 Subject: vo_gl3: move OSD code to gl_osd.c Other OpenGL-using VOs can use this. gl_osd.c includes some code for vo_gl.c. The next commit actually makes use of it. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 27aa1997dd..9c782e27fe 100644 --- a/Makefile +++ b/Makefile @@ -284,7 +284,7 @@ SRCS_MPLAYER-$(COREAUDIO) += libao2/ao_coreaudio.c SRCS_MPLAYER-$(COREVIDEO) += libvo/vo_corevideo.m SRCS_MPLAYER-$(DIRECT3D) += libvo/vo_direct3d.c libvo/w32_common.c SRCS_MPLAYER-$(GL) += libvo/gl_common.c libvo/vo_gl.c libvo/vo_gl3.c \ - pnm_loader.c + pnm_loader.c libvo/gl_osd.c SRCS_MPLAYER-$(ENCODING) += libvo/vo_lavc.c libao2/ao_lavc.c encode_lavc.c SRCS_MPLAYER-$(GL_WIN32) += libvo/w32_common.c SRCS_MPLAYER-$(GL_X11) += libvo/x11_common.c -- cgit v1.2.3 From 2db0d229efc1ba53e33bb3c110ec591246f0c83a Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 4 Oct 2012 17:16:24 +0200 Subject: libvo: remove eosd_packer.c This contains about the same code as bitmap_packer.c. eosd_packer.c was added first, and then not merged for a year - then it was added as bitmap_packer.c with slightly different and incompatible interface. Now replacing eosd_packer.c with bitmap_packer.c is finally done. So much wasted work... --- Makefile | 1 - 1 file changed, 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 9c782e27fe..1bfccf04ea 100644 --- a/Makefile +++ b/Makefile @@ -247,7 +247,6 @@ SRCS_COMMON = asxparser.c \ libmpdemux/mp_taglists.c \ libmpdemux/video.c \ libvo/osd.c \ - libvo/eosd_packer.c \ libvo/bitmap_packer.c \ osdep/numcores.c \ osdep/io.c \ -- cgit v1.2.3 From 64ac38c4d30e30783032a4b65f34f4fb50761c7b Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Wed, 24 Oct 2012 19:00:49 +0200 Subject: libmpcodecs: move vf_scale.c swscale helper functions to sws_utils.c Extracted/rebased by wm4 from commits 93978f17b76d..13211ef5fc20. Actual mp_image_swscale is added in a later commit. --- Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index ce1a369f77..839b4d0977 100644 --- a/Makefile +++ b/Makefile @@ -144,6 +144,7 @@ SRCS_COMMON = asxparser.c \ libmpcodecs/img_format.c \ libmpcodecs/mp_image.c \ libmpcodecs/pullup.c \ + libmpcodecs/sws_utils.c \ libmpcodecs/vd.c \ libmpcodecs/vd_ffmpeg.c \ libmpcodecs/vf.c \ -- cgit v1.2.3 From aa1047a35a98606c972cc35e566178703b1f2bff Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Wed, 24 Oct 2012 19:11:42 +0200 Subject: sub: add helper to draw sub-bitmaps into an image Merged by wm4 from commits 93978f17b76d..13211ef5fc20. Changed copyright header in draw_bmp.c to "mpv", and removed the one in draw_bmp.h. --- Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 839b4d0977..ecd33359c2 100644 --- a/Makefile +++ b/Makefile @@ -217,6 +217,7 @@ SRCS_COMMON = asxparser.c \ sub/spudec.c \ sub/sub.c \ sub/img_convert.c \ + sub/draw_bmp.c \ sub/subassconvert.c \ sub/subreader.c \ sub/vobsub.c \ -- cgit v1.2.3 From fd5c4a19849b768986a0e652bb2f398c922f42dd Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 7 Oct 2012 22:02:03 +0200 Subject: Remove things related to old OSD To ease changing all the VOs to the new OSD rendering, fallbacks, conversions, support code etc. was left all over the code. Now that all VOs have been changed, all that code is inactive. Remove it. Strip down spudec.c. We don't need the old grayscale and scaling stuff anymore. (Not removing spudec itself yet - I'm not confident that the libavcodec DVD sub decoder is sufficient, and it would also require some hacks to get DVD palette and resolution information from libdvdread to libavcodec.) The option --spuaa, --spualign, --spugauss were used with the old sub scaling code, and don't do anything anymore. --- Makefile | 1 - 1 file changed, 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index ecd33359c2..dd476d2a28 100644 --- a/Makefile +++ b/Makefile @@ -198,7 +198,6 @@ SRCS_COMMON = asxparser.c \ libmpdemux/mf.c \ libmpdemux/mp_taglists.c \ libmpdemux/video.c \ - libvo/osd.c \ libvo/bitmap_packer.c \ osdep/numcores.c \ osdep/io.c \ -- cgit v1.2.3 From 773668b6e85d4da4d252cb4ad8abd50448d70c7c Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 21 Oct 2012 18:31:34 +0200 Subject: VF: rename vf_ass to vf_sub This reflects the fact that this filter now renders all types of subtitles, not just ASS subtitles. Always compile this filter, not just on CONFIG_ASS. Note that --no-ass still disables auto-inserting this filter. It's the only way to disable auto-insertion, so keep it even though it's not really ASS specific anymore. --no-ass also disables using libass for rendering text subs directly. --- Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index dd476d2a28..7e566f06de 100644 --- a/Makefile +++ b/Makefile @@ -38,9 +38,7 @@ SRCS_COMMON-$(FTP) += stream/stream_ftp.c SRCS_COMMON-$(GIF) += libmpdemux/demux_gif.c SRCS_COMMON-$(HAVE_SYS_MMAN_H) += libaf/af_export.c osdep/mmap_anon.c SRCS_COMMON-$(LADSPA) += libaf/af_ladspa.c -SRCS_COMMON-$(LIBASS) += libmpcodecs/vf_ass.c \ - sub/ass_mp.c \ - sub/sd_ass.c \ +SRCS_COMMON-$(LIBASS) += sub/ass_mp.c sub/sd_ass.c SRCS_COMMON-$(LIBBLURAY) += stream/stream_bluray.c SRCS_COMMON-$(LIBBS2B) += libaf/af_bs2b.c @@ -171,6 +169,7 @@ SRCS_COMMON = asxparser.c \ libmpcodecs/vf_screenshot.c \ libmpcodecs/vf_softpulldown.c \ libmpcodecs/vf_stereo3d.c \ + libmpcodecs/vf_sub.c \ libmpcodecs/vf_swapuv.c \ libmpcodecs/vf_unsharp.c \ libmpcodecs/vf_vo.c \ -- cgit v1.2.3