[MPlayer-dev-eng] altivec patch 2/5: wrong array boundaries

Michael Niedermayer michaelni at gmx.at
Wed Feb 8 02:39:05 CET 2006


Hi

On Tue, Feb 07, 2006 at 05:50:56AM -0500, Alan Curry wrote:
> vYCoeffsBank and vCCoeffsBank are allocated and initialized using incorrect
> sizes based on the image width instead of height. This patch corrects the
> sizes.
> 
> A related point: the usage pattern of the v{Y,C}CoeffsBank arrays appears to
> be very inefficient.
> 
> altivec_yuv2packedX() is called once for each row of the output image. Each
> time, it builds the large vYCoeffsBank and vCCoeffsBank, containing at least
> one altivec vector for each row of the output image. It then uses only a
> small part of the *CoeffsBank arrays (corresponding to the single output row
> being generated), and destroys them. Why?
> 
> It would be better, I think, to just build the vectors that you're actually
> going to use. Or build them all just once and preserve them in the
> SwsContext, since they are just expanded versions of the v{Lum,Chr}Filter
> that is already in there.

yes


> 
> I'll work on that later. This patch is just to prevent overruning the end of
> the array when dstW>dstH and incomplete initialization when dstW<dstH.
> 

patch ok, can be applied (preferaly by someone who has a ppc ...)

[...]

-- 
Michael




More information about the MPlayer-dev-eng mailing list