[MPlayer-dev-eng] Cache optimized rotation.
David Bateman
adb014 at gmail.com
Tue Apr 10 14:52:48 CEST 2007
On 4/10/07, Reimar D?ffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de>
wrote:
>
>
> It does to some level, since both with or without write instructions
> that bypass the cache, additional space will be needed for this block.
> It probably does not matter much and the second solution has other cache
> problems, but still.
But the tile is accessed continually so it shouldn't ever leave the cache
during the rotation of a frame. Rows of thesource and columns of the
destination will enter and leave the cache one by one. So as long as there
are at least two seperate cache lines, then the tile and a row of the source
or column of the destination should always be in the cache.. Cache misses
will only happen when a new row or column is needed in the source or
destination. We win with this extra memory allocation as the stride we use
for the source and destination copying is always 1.
In any case, this discussion also raises the point of trying to optimize the
code to a particular architecture in general. In some senses its better to
stay as generic as possible, as that gives the maximum chance of being
future proof.. Frankly, I have no real preferences for either solution and
so would be happy with either.
Regards
D.
Greetings,
> Reimar Döffinger
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> http://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
>
More information about the MPlayer-dev-eng
mailing list