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

Alexander Strange astrange
Sat Apr 5 02:56:34 CEST 2008


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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-align16-method1.diff
Type: application/octet-stream
Size: 466 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080404/77d9954f/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-align16-method2.diff
Type: application/octet-stream
Size: 2439 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080404/77d9954f/attachment-0001.obj>



More information about the ffmpeg-devel mailing list