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

Michael Niedermayer michaelni
Sat Apr 5 12:50:09 CEST 2008

On Fri, Apr 04, 2008 at 08:56:34PM -0400, 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 2.

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080405/48c2a350/attachment.pgp>

More information about the ffmpeg-devel mailing list