Re: [AD] stretch_blit() ob1 error

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 2003-02-13, Eric <ebotcazou@xxxxxxxxxx> wrote:
> > Here's what I have so far.  It needs a *lot* more testing though.
> 
> The first hunk looks fine to me but the second hunk might be too broad: for 
> example, when shrinking to half the size, the odd horizontal lines will now 
> be taken into account instead of the even ones.

Yes, that's what I was afraid of (the part about being too broad; I
don't fully understand what I changed, just recognised it as a similar
problem to floating point imprecisions).

> Would it not be better to guard the second hunk?
> 
> @@ -316,6 +317,9 @@
>        if ((dest_width <= 0) || (dest_height <= 0))
>  	 return;
>     }
> +
> +   if (syd < itofix(1))
> +      sy += (syd >> 1);
>  
>     /* search the cache */
>     stretcher_count++;

That seems good.  Also, I think the first hunk would be better moved out
of the per-line loop.  I'll test it a bit more.

-- 
王浩禎




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/