[MPlayer-dev-eng] gl & distorted fisheye for dome projection

Reimar Doeffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Tue Jul 4 10:15:29 CEST 2006


Hello,
On Mon, Jul 03, 2006 at 11:57:42PM +0200, Johannes Gajdosik wrote:
> 1) 8 bit accuracy for x/y-coordinate lookup is not enough,
> but leads to block artefacts. I have made a workaround by
> using the lower half of the index texture for another 8 bit of accuracy
> (the lower byte). This works quite fine, but it requires,
> that fragment.texcoord[0] points exactly to one pixel in the texture,
> no interpolation. Then also pos will point exactly to 1 pixel in the
> index-texture, which typically has size 1024x2048.

I don't like that too much. I'll try to add support for 16 bit ppms and
textures.

> 2) I am not so sure about the cost of multiplication and swizzling.
> In SSE(2) multiplication is done in parallel, so 4 multiplications
> cost the same as just one multiplication. But swizzling for the destination
> operand would require expensive masking and OR. Therefore I tried to avoid
> swizzling in the destination operand.

Well, this is not SSE at all. Swizzling is free, write masks free up
arithmetic units that can be used for another instruction from e.g.
another pixel (well, not under all condition. If you're interested in
optimizing and have windows available (wine should work too), I'd
recommend http://developer.nvidia.com/object/nvshaderperf_home.html.
ATI seems to have a bit different characteristics, but they do not seem
to have a similar tool :-(

Greetings,
Reimar Doeffinger



More information about the MPlayer-dev-eng mailing list