[Mplayer-dev-eng] Subtitles spliting

Arpi arpi at thot.banki.hu
Tue May 15 01:46:56 CEST 2001


Hi,

> > I have attached the long subtitles spliting patch as I promised.
> > 
> 
> Good for you... :)
> 
> But there is a petty bug for handling two-byte characters in sub.c line 167:
> 
>    if (sub_unicode && (c>=0x80)) c=(c<<8)+text[++j];
> 

yep. fixed...

you should give me your SF login name, so i can add cvs write access.

and someone really should fix this unicode thingy, that 0x80 thing isn't
a good solution. I think that we should use prefixing for unicodes:
prefix 2-byte chars with byte 0x1F:

normal chars:  aa bb cc dd
unicode: 1F aa aa 1F bb bb 1F cc cc ...

it avoids conflicts between accented chars (0x80..0xFF) and unicodes,
and additionaly allows unicodes in range 0x0100..0x7FFF (used in europe)

also a macro should be defined for it, like:
#define GET_CHAR(array,j) ((array[j]==0x1F)?(*((unsigned short*)&array[j])):array[j])

and use it to fetch chars from the sub array.

sub_unicode also can be removed, if we know at subreader.c whether is it
unicode or 1-byte char. (or use that flag only at subreader.c)

and in fonts file you should use hexa codes (0x1234 insted of "aa") or
some prefixing too.

any volunteers?
(sorry, i have no time for this now)

A'rpi / Astral & ESP-team

--
mailto:arpi at thot.banki.hu
http://esp-team.scene.hu

_______________________________________________
Mplayer-dev-eng mailing list
Mplayer-dev-eng at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-dev-eng



More information about the MPlayer-dev-eng mailing list