At which point perhaps, it seems to me, things become a maze of
OS-specific optimizations of how the app handles pseudo-tiles... but I
understand the problems of thrashing.
On 2/12/21 6:49 AM, Paul Womack wrote:
True as far as it goes.
An OS will manage virtual memory, swapping data between RAM and Disc as
needed, normally in pages of some fixed size.
However, if the application is "naive", some worst case behaviour can
emerge. Imagine an application that routinely access the first byte of a
page,
and then accessed the first byte of every other page before re-accessing
the first byte of the first page again.
The application is not addressing many BYTES, but it will thrash the
virtual memory badly. A typical image rotate will have this behaviour on
either source of destination.
What you're aiming for is locality of accesses, where multiple accesses
all fall within a page. For raster graphics this can be achieved by
accessing data in a tiled way, so that adjacent pixels in both X and Y
are "near". This can be done WITHOUT a tiled virtual memory system, you
just need to access the data in a tiled order.
This can be done by finding the pseudo-tile T a (x,y) coord is in
(simple divide X, Y by the the tile size), calculate the tile base
address of the tile T (T * tile_bytes) and then work out the offset of
the data from the tile base (x and y modulo tile side, then multiply the
new Y by tile side).
I has a fancy 2D Object browser on SunOs that was thrashing, and by
simply implementing "address_of_object()" as outlined above, the memory
behaviour was immaculate.
BugBear
--
David W. Jones
gnomeno...@gmail.com
wandering the landscape of god
http://dancingtreefrog.com
My password is the last 8 digits of π.
--
A list of frequently asked questions is available at:
http://wiki.panotools.org/Hugin_FAQ
---
You received this message because you are subscribed to the Google Groups "hugin and other free panoramic software" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to hugin-ptx+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/hugin-ptx/b94163fa-cdf6-05e1-4960-bf4a2be6da0e%40gmail.com.