[MPlayer-dev-eng] [PATCH] Proper teletext language support

Michael Niedermayer michaelni at gmx.at
Mon Aug 27 14:23:31 CEST 2007


On Mon, Aug 27, 2007 at 04:16:48PM +0700, Vladimir Voroshilov wrote:
> Hi
> 
> 2007/8/27, Michael Niedermayer <michaelni at gmx.at>:
> > Hi
> >
> > /**
> >  *
> >  * Note, bits must be correctly ordered, that is for 8,4
> >  * P1 P2 D1 P3 D2 D3 D4 P4
> 
> Teletext specification (subclauese 8.1, page 21) says that bits order
> for 8/4 hammed bytes is P1 D1 P2 D2 P3 D3 P4 D4
> 
> So code can not be used for decoding teletext's 8/4 coded bytes, am i right ?

no you are silly, you can reorder the bits, iam not saying you should though
it depends what effect on speed this has vs. using the existing table

x&0x21 | ((x&0x4A)<<1) | ((x&0x94)>>1)

also the hamm24 can be done with tables if its really speed critical but i
thought its not and myths solution is alot more complex then needed
they needs several kilobytes of tables while it could easily be done with
256 byte

just something like
syndrom = tab0[cw&63] ^ tab1[(cw>>6)&63] ^ tab2[(cw>>12)&63] ^ tab3[(cw>>18)&63];
if(syndrom&31){
    if(syndrom<32 || syndrom>24+32)
        return -1;
    cw^= 1<<((syndrom&31)-1);
}

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070827/4b3b1dad/attachment.pgp>


More information about the MPlayer-dev-eng mailing list