Hi,
I've been trying to optimize a system-to-video memory rotated blit loop by prefetching 32 byte areas as described in this excellent post (see page 3):
http://www.pocketmatrix.com/forums/view ... he&start=0
However I'm seeing zero difference on a PXA270 (Dell Axim 51v) between using prefetching or not. My current inner loop is:
Any ideas on why prefetching is not helping?
As far as I can see, since the destination is not cacheable (video memory), copying in 32x32 byte tiles should not improve it.
FPS is at about 11.7 with the above loop, while with PHAL it jumps to about 40 FPS, so there must be a way of improving it, even without going to assembly code.
Thanks for any help,
Jorge Diogo
http://Ludimate.com
I've been trying to optimize a system-to-video memory rotated blit loop by prefetching 32 byte areas as described in this excellent post (see page 3):
http://www.pocketmatrix.com/forums/view ... he&start=0
However I'm seeing zero difference on a PXA270 (Dell Axim 51v) between using prefetching or not. My current inner loop is:
- Code:
uint width16 = width / (16 * 4);
rgb565* preload;
rgb565 dummy0=0, dummy1=0, dummy2=0, dummy3=0;
while(height--){ // for each row
// preload row into cache by reading each 32 bytes:
x=width16;
preload = src;
while ( x-- ){
dummy0 = *preload;
preload += 16;
dummy1 = *preload;
preload += 16;
dummy2 = *preload;
preload += 16;
dummy3 = *preload;
preload += 16;
}
// now copy:
x=width;
while(x--){ // for each pixel
*dest=*src++;
dest+=destXPitch;
}
dest+=destLineAdvance;
src+=srcLineAdvance;
}
Any ideas on why prefetching is not helping?
As far as I can see, since the destination is not cacheable (video memory), copying in 32x32 byte tiles should not improve it.
FPS is at about 11.7 with the above loop, while with PHAL it jumps to about 40 FPS, so there must be a way of improving it, even without going to assembly code.
Thanks for any help,
Jorge Diogo
http://Ludimate.com