[FFmpeg-cvslog] r9848 - trunk/libavcodec/ac3dec.c

Justin Ruggles justinruggles
Thu Aug 2 05:30:40 CEST 2007


Benjamin Larsson wrote:
> jbr wrote:
>> Author: jbr
>> Date: Wed Aug  1 03:13:58 2007
>> New Revision: 9848
>>
>> Log:
>> align array used in mdct. fixes segfault.
>>
>> Modified:
>>    trunk/libavcodec/ac3dec.c
>>
>> Modified: trunk/libavcodec/ac3dec.c
>> ==============================================================================
>> --- trunk/libavcodec/ac3dec.c	(original)
>> +++ trunk/libavcodec/ac3dec.c	Wed Aug  1 03:13:58 2007
>> @@ -686,7 +686,7 @@ static void do_rematrixing(AC3DecodeCont
>>  static void do_imdct_256(AC3DecodeContext *ctx, int chindex)
>>  {
>>      int i, k;
>> -    float x[128];
>> +    DECLARE_ALIGNED_16(float, x[128]);
>>      FFTComplex z[2][64];
>>      float *o_ptr = ctx->tmp_output;
> 
> This wont work on win32/beos with regular gcc's. Please use an array
> allocated in the AC3DecodeContext.

Rather than allocate more memory in the AC3DecodeContext, here is a way 
to avoid the stack alignment issue by first deinterleaving the MDCT 
coefficients within the already-allocated (and aligned) array.  Does 
this look okay?

-Justin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: no_stack_align.diff
Type: text/x-patch
Size: 1204 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20070801/ea76c720/attachment.bin>



More information about the ffmpeg-cvslog mailing list