For some time now, aalib rendering has had broken subtitles. -vo aa is designed to use human-readable text at the size of one character per character. In actuality, it's somehow switched to trying to render a standard font using dithering since its introduction. This patch fixes it. Explanation: vo_font doesn't seem to get used anywhere, because OSD rendering is actually done in a completely separate way from other video output, but I kept it in just in case. As a side note, someone may want to investigate unicode support for subtitles in -vo aa. *** /var/src/MPlayer-1.3.0/libvo/vo_aa.c 2016-02-12 12:23:39.000000000 -0800 --- vo_aa.c 2017-05-07 02:07:11.900548663 -0700 *************** static int osdx, osdy; *** 92,97 **** --- 92,98 ---- static int osd_text_length = 0; int aaconfigmode=1; font_desc_t* vo_font_save = NULL; + font_desc_t* sub_font_save = NULL; static struct SwsContext *sws=NULL; /* configuration */ *************** config(uint32_t width, uint32_t height, *** 249,256 **** /* now init our own 'font' */ if(!vo_font_save) vo_font_save = vo_font; ! if(vo_font == vo_font_save) { ! vo_font=malloc(sizeof(font_desc_t));//if(!desc) return NULL; memset(vo_font,0,sizeof(font_desc_t)); vo_font->pic_a[0]=malloc(sizeof(raw_file)); memset(vo_font->pic_a[0],0,sizeof(raw_file)); --- 250,258 ---- /* now init our own 'font' */ if(!vo_font_save) vo_font_save = vo_font; ! if(!sub_font_save) sub_font_save = vo_font; ! if(vo_font == vo_font_save || sub_font == sub_font_save) { ! vo_font=sub_font=malloc(sizeof(font_desc_t));//if(!desc) return NUL L; memset(vo_font,0,sizeof(font_desc_t)); vo_font->pic_a[0]=malloc(sizeof(raw_file)); memset(vo_font->pic_a[0],0,sizeof(raw_file));
On Sun, 7 May 2017 02:15:08 -0700, za3k@za3k.com wrote:
For some time now, aalib rendering has had broken subtitles. -vo aa is designed to use human-readable text at the size of one character per character. In actuality, it's somehow switched to trying to render a standard font using dithering since its introduction. This patch fixes it.
thanks for the patch. i'm sorry, your mail got stuck in the moderation queue and no one approved it until today. :) -compn
On Sun, May 07, 2017 at 02:15:08AM -0700, za3k@za3k.com wrote:
For some time now, aalib rendering has had broken subtitles. -vo aa is designed to use human-readable text at the size of one character per character. In actuality, it's somehow switched to trying to render a standard font using dithering since its introduction. This patch fixes it.
Explanation: vo_font doesn't seem to get used anywhere, because OSD rendering is actually done in a completely separate way from other video output, but I kept it in just in case.
As a side note, someone may want to investigate unicode support for subtitles in -vo aa.
See May 7 email for patch contents. Could someone merge this into the SVN?
On Wed, Apr 04, 2018 at 12:17:52AM -0700, za3k@za3k.com wrote:
On Sun, May 07, 2017 at 02:15:08AM -0700, za3k@za3k.com wrote:
For some time now, aalib rendering has had broken subtitles. -vo aa is designed to use human-readable text at the size of one character per character. In actuality, it's somehow switched to trying to render a standard font using dithering since its introduction. This patch fixes it.
Explanation: vo_font doesn't seem to get used anywhere, because OSD rendering is actually done in a completely separate way from other video output, but I kept it in just in case.
As a side note, someone may want to investigate unicode support for subtitles in -vo aa.
See May 7 email for patch contents. Could someone merge this into the SVN?
Sorry to double-post here but realized that would be confusing right after I hit send. May 7, 2017 -- this one's been waiting a while :)
On 2018-04-04 00:18 -0700, za3k@za3k.com wrote:
On Wed, Apr 04, 2018 at 12:17:52AM -0700, za3k@za3k.com wrote:
On Sun, May 07, 2017 at 02:15:08AM -0700, za3k@za3k.com wrote:
For some time now, aalib rendering has had broken subtitles. -vo aa is designed to use human-readable text at the size of one character per character. In actuality, it's somehow switched to trying to render a standard font using dithering since its introduction. This patch fixes it.
Explanation: vo_font doesn't seem to get used anywhere, because OSD rendering is actually done in a completely separate way from other video output, but I kept it in just in case.
As a side note, someone may want to investigate unicode support for subtitles in -vo aa.
See May 7 email for patch contents. Could someone merge this into the SVN?
Sorry to double-post here but realized that would be confusing right after I hit send. May 7, 2017 -- this one's been waiting a while :)
Finally fixed somehow SVN r38126 . I am sorry you're patch was sitting here for so long :( I decided to go with a differen fix, because you're patch had a type I think (vo_font vs sub_font) --- 250,258 ---- /* now init our own 'font' */ if(!vo_font_save) vo_font_save = vo_font; ! if(!sub_font_save) sub_font_save = vo_font; and it didn't restore the sub_font in uninit. The subtitle support in vo aa is rahter messy. With the introduction of freetype font rendering it got even more so. AFAICT if bitmap fonts are used it kind of works as one would expect from reading the code in vo_aa, OTOH when using freetype it seems to work out of luck because of NULL == NULL; clean up isn't done at all in that case. It doesn't happen to completely go south, because the freetype code in sub/ directory is working around it. Alexander
participants (3)
-
Alexander Strasser -
Compn -
za3k@za3k.com