freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Freetype-devel] Re: GSOC - Distance Fields


From: Anuj Verma
Subject: Re: [Freetype-devel] Re: GSOC - Distance Fields
Date: Mon, 15 Jun 2020 18:36:00 +0530

> Your profiling results indicate that a lot of time is spent
> calculating distances. Perhaps, you can work with much faster
> square-distances (they can be signed or signs stored separately) and
> apply square root as a final processing step. Or, would signed
> square-distance field work as well (SSDF so to speak)? Please spend
> some time thinking about optimizations and bottlenecks.

Yes, even I was thinking of reducing the number of calls to `ft_trig_pseudo_polarize'
which I believe is called through `FT_Vector_Length'. Working with squared distances
can definitely be a good option, it will cut the total time by almost 50%.

I don't think SSDF would be good in the final output because of the bilinear filtering
of the image. So, taking the square root at the end is a good option.

Moreover I have thought about using the control box of the curves to first check
which of the curves must be tested. And even precompute some of the coefficients
which are the same for a specific curve. I have a few more ideas which I will be
testing throughout the period and making it as good as possible.

Thanks,
Anuj


reply via email to

[Prev in Thread] Current Thread [Next in Thread]