[MPlayer-dev-eng] vf_eq{,2} buffer alignment
Rich Felker
dalias at aerifal.cx
Sun Apr 23 00:34:04 CEST 2006
On Sat, Apr 22, 2006 at 05:57:53PM -0400, Alan Curry wrote:
> vf_eq and vf_eq2 both pass on a malloc()ed buffer to the next filter in the
> chain as part of an mp_image_t. When the next filter is vf_scale using
> altivec operations, it expects the image plans to begin at 16-byte boundaries
> so it ends up putting the pixels in the wrong place.
>
> If you're altivec-capable, the effect is observable with
>
> mplayer -vf eq2=1.0:1.0:0.1,scale -vo x11 yourmovie
>
> The misalignment depends on the whims of malloc, but in my case I usually get
> everything shifted 8 pixels to the right, with what should be the rightmost 8
> pixels appearing instead on the left.
>
> The following patch changes eq and eq2 to align their buffers at 16-byte
> boundaries. Is this OK, or should I instead try to make scale more tolerant
> of unaligned input?
Scale must accept unaligned input. Consider the case where the input
comes from vf_crop or similar...
Rich
More information about the MPlayer-dev-eng
mailing list