[MPlayer-dev-eng] [PATCH] Teletext support try3 (1/5, core)
michaelni at gmx.at
Sun Jul 22 01:33:50 CEST 2007
On Sun, Jul 22, 2007 at 03:18:50AM +0700, Vladimir Voroshilov wrote:
> >also why is the internal page number using such a odd range, wouldnt it
> >make more sense to just do the convertion for display
> >instead of filling the code with &0x7ff and if/else checks
> >can be used for the convertion no need to have these if/else all over the
> >From this version range 0x000-0x7ff is used in tvi_vbi.c and
> 0x100-0x8ff outside it.
> To tell the truth current cache implementation is ugly.
> Unfortunately, i havn't neither enough knowledge nor ideas to make
> really good one.
one improvement would be to replace the VBI_MAX_PAGES*VBI_MAX_SUBPAGES array
by a VBI_MAX_PAGES array of linked lists
so when you search for a specific entry you look at the spot in the array
corresponding to the page number and follow the linked list until you find
a matching sub page (or the end of the list)
for inserting a new page into the cache you just add it into correspoding
linked list (at a random point like the begin)
this would reduce the required memory without really affecting the speed as
the number of subpages is small
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
More information about the MPlayer-dev-eng