Re: Row-wise vs. column-wise image processing
- From: "*** T. Winter" <***.Winter@xxxxxx>
- Date: Thu, 25 Jan 2007 15:55:57 GMT
In article <1169724559.422594.10530@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> mark_bluemel@xxxxxxxxx writes:
On 25 Jan, 11:00, Enrique Cruiz <jni6l03mdo6n...@xxxxxxxxxxx> wrote:....
I am currently implementing a fairly simple algorithm. It scans a
grayscale image, and computes a pixel's new value as a function of its
original value. Two passes are made, first horizontally and second
vertically. The problem I have is that the vertical pass is 3 to 4
times slower than the horizontal, although the code is _exactly_ the
same in both cases?!
You are almost certainly right, and there's probably not a lot you can
do to change it with this processing style.
In your horizontal pass you can process a cache's worth of data at a
time before pulling the next cachefull. In the worst case, your
vertical pass could have a cache miss for each pixel accessed.
Indeed. Cache misses can give a huge loss of cycles.
--
*** t. winter, cwi, kruislaan 413, 1098 sj amsterdam, nederland, +31205924131
home: bovenover 215, 1025 jn amsterdam, nederland; http://www.cwi.nl/~***/
.
- References:
- Re: Row-wise vs. column-wise image processing
- From: mark_bluemel
- Re: Row-wise vs. column-wise image processing
- Prev by Date: Re: Looking for advice on how to deal with array of structs
- Next by Date: Re: Looking for advice on how to deal with array of structs
- Previous by thread: Re: Row-wise vs. column-wise image processing
- Next by thread: Re: Row-wise vs. column-wise image processing
- Index(es):
Loading