From: Roland S. <rsc...@hi...> - 2005-03-01 18:47:07
|
Dieter N=C3=BCtzel wrote: >>Looking a bit at this, this seems to be caused because the number of >>pixels to read can be less than zero after CLIPSPAN (don't know if >>that's a bug in itself or not). >=20 >=20 > That was my first thought, too (moving the window out to the left...) ;= -) >=20 >=20 >>This is no problem for the generic read (since the for loop will just >>terminate instantly), but the mmx/sse/sse2 optimized routines only test >>if it's 0 pixels to read, and don't bail out if it's less than zero. I >>haven't looked closely what exactly will happen (i.e. the loops may >>never terminate at all), but this certainly seems like a bad thing... Here's a one-liner fix, which will cause CLIPSPAN hopefully never return=20 a negative n1. Seems to work here. Ian, what do you think? Would it be better to have the optimized=20 read/write functions deal with negative values instead? Roland |