[MPlayer-dev-eng] [PATCH] Latin National Sub-Sets with teletext

Vladimir Voroshilov voroshil at gmail.com
Sat Aug 25 13:45:10 CEST 2007


Hi, Otvos

2007/8/25, Ötvös Attila <oattila at chello.hu>:
> Hi All!
>
> I make Latin National Option Sub-Sets to teletext.
>
> Enhanced Teletext specification 300 706: May 1997 Table 36 (Page 115)
> http://www.themm.net/~mihu/linux/saa7146/specs/ets_300706e01p.pdf

A big thanks for standard specification. It is very useful for me.


> Remark:
> The sub.c don't render utf8 chars for me that is way I use latin-1 charset.

All latin-1 symbols has the same codes in UTF8.
Seems like those chars (above 0xc000) are absent in font file.
Thus if all required chars already exists in Latin-1 charset there is
not need in special UTF8 characters.

>[...]
>@@ -199,18 +200,23 @@
> static unsigned int lang_chars[LANGS][0x60]={
>  {
>   //Latin
>-  0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,
>+  0x20,0x21,0x22,0x00,0x01,0x25,0x26,0x27,
>+// LNOSS   offset: *    *

There are eight chars at fixed positions which are substituted.
Note, that regarding to above tech doc, characters on that places can
also be used
(substitution is not applied if charset is selected through X/26
packet, rather then usual way).

Apropriate If-elseif-else code will be better, imho, even if X/26
packet is not supported yet.

>[...]
>@@ -247,16 +318,21 @@
>  * \brief convert chars from curent teletext codepage into MPlayer charset
>  * \param p raw teletext char to decode
>  * \param lang teletext internal language code (see lang2id)
>+ * \param langsub with Latin National Option Sub-sets (ETS 300 706)
>[...]
>@@ -843,7 +921,9 @@
>         priv->mag[magAddr].pt= malloc(sizeof(tt_page));
>
>     priv->mag[magAddr].lang= d[7] & 0x7;
>+    priv->mag[magAddr].langsub= (d[7] & 0xf)>>1;
>     priv->mag[magAddr].pt->lang=priv->mag[magAddr].lang;
>+    priv->mag[magAddr].pt->langsub=priv->mag[magAddr].langsub;
>     priv->mag[magAddr].pt->subpagenum=(d[2]|(d[3]<<4)|(d[4]<<8)|(d[5]<<12))&0x3f7f;

As you can see there lang and langsub uses the same input byte as value.
Thus lang and langsub are equal. Use existing lang parameter instead of langsub.
Yes, there is bug in existing code (missing ">>1"). It will be fixed soon.


-- 
Regards,
Vladimir Voroshilov     mailto:voroshil at gmail.com
JID: voroshil at gmail.com, voroshil at jabber.ru
ICQ: 95587719



More information about the MPlayer-dev-eng mailing list