[FFmpeg-devel] [PATCH] increase alignment for DCT block arrays to 16

Luca Barbato lu_zero
Sat Apr 5 09:35:40 CEST 2008

Alexander Strange wrote:
> Some decoders (MJPEG, WMV2) have their DCT block arrays aligned to 8 
> bytes, which causes obvious problems with an SSE2 IDCT. Either one of 
> the attached patches fixes it; I wasn't sure if there would be problems 
> with the first method, so I did it two ways.
> Method 1 - As with Altivec/MMI, redefine DECLARE_ALIGNED_8 and 
> STRIDE_ALIGN to be 16. This has some other nice properties, since I 
> won't have to assume picture pointers are only 8-byte aligned outside 
> ffmpeg. It also means that nobody else can introduce a new decoder and 
> have it break under SSE2.
> Method 2 - Just change the problematic DECLARE_ALIGNED_8 to _16.

Method 3 use DECLARE_ALIGNED instead ^^ (same result as method 2 but one 
step further to just use one single macro and deprecate the older ones...)



Luca Barbato
Gentoo Council Member
Gentoo/linux Gentoo/PPC

More information about the ffmpeg-devel mailing list