[MPlayer-dev-eng] [PATCH] dynamic font generation
Michael Niedermayer
michaelni at gmx.at
Thu Aug 15 20:11:48 CEST 2002
Hi
On Thursday 15 August 2002 19:01, Jindrich Makovicka wrote:
[...]
> > yea, but think of chinese etc. they have very large fontsets with few
> > thousand chars, it's where it matters.
>
> Well, I actually sent a wrong version which was "pessimized" and
> performed even worse than the original :(
> Regarding the font generation, most cpu-hungry is the outliner, because
> its complexity is O(thickness^2*fontwidth*fontheight),
> gaussian is O(radius*fontwidth*fontheight), font rendering is the
> easiest thing. With fontwidth I mean character width*count of course.
imho O() is pretty useless for practical speed comparission, anyway u can
approximate gaussian blur very well in O(width*height) with repeated box blur
but i dunno at which radius it would be faster
and outline isnt that bad either as u can skip the completly black & white
areas
it might be possible to calculate the outline in O(thickness*w*h) if u are
crazy, by reusing the max of the inner (=1.0) part of the antialiased circle
whos pixels are used as weights for the max function
>
> Anyway, scanning the subtitles for all characters is maybe worth the
> effort, especially for chinese at al.
hmm, or generating them when they are needed instead of all at once might
avoid some problems, like not knowing all future displayed chars (network
stream, ...)
[...]
Michael
More information about the MPlayer-dev-eng
mailing list