On Mon, Dec 11, 2006 at 03:53:23PM +0200, Nikns Siankin wrote: > Added regression tests. > Added back external decoders. > > relevant portion of the official ChangeLog: > > - DV50 AKA DVCPRO50 encoder, decoder, muxer and demuxer > - TechSmith Camtasia (TSCC) video decoder > - IBM Ultimotion (ULTI) video decoder > - Sierra Online audio file demuxer and decoder > - Apple QuickDraw (qdrw) video decoder > - Creative ADPCM audio decoder (16 bits as well as 8 bits schemes) > - Electronic Arts Multimedia (WVE/UV2/etc.) file demuxer > - Miro VideoXL (VIXL) video decoder > - H.261 video encoder > - QPEG video decoder > - Nullsoft Video (NSV) file demuxer > - Shorten audio decoder > - LOCO video decoder > - Apple Lossless Audio Codec (ALAC) decoder > - Winnov WNV1 video decoder > - Autodesk Animator Studio Codec (AASC) decoder > - Indeo 2 video decoder > > http://secure.lv/~nikns/stuff/ports/ffmpeg-20061211.diff
Hi Nikns, Add the following diff to the port update and send it back out. This will unbreak support for the WMA audio format, which is also used in WMV video. With the port as is WMV files and WMA files cannot be played on a i386 system with SSE support, the result being 100% reproducible crash every time. Bug fix for crashes when SSE is used on unaligned arrays. No measureable change in speed. This gave random crashes on Win32 and BeOS. The cause for this bug is that gcc doesn't align the stackframe. Linux and glibc always ensure this to be true thus this never affected Linux. $OpenBSD$ --- libavcodec/wmadec.c.orig Tue Dec 26 17:11:00 2006 +++ libavcodec/wmadec.c Tue Dec 26 17:13:58 2006 @@ -115,6 +115,8 @@ typedef struct WMADecodeContext { float max_exponent[MAX_CHANNELS]; int16_t coefs1[MAX_CHANNELS][BLOCK_MAX_SIZE]; DECLARE_ALIGNED_16(float, coefs[MAX_CHANNELS][BLOCK_MAX_SIZE]); + DECLARE_ALIGNED_16(FFTSample, output[BLOCK_MAX_SIZE * 2]); + DECLARE_ALIGNED_16(float, window[BLOCK_MAX_SIZE * 2]); MDCTContext mdct_ctx[BLOCK_NB_SIZES]; float *windows[BLOCK_NB_SIZES]; DECLARE_ALIGNED_16(FFTSample, mdct_tmp[BLOCK_MAX_SIZE]); /* temporary storage for imdct */ @@ -717,7 +719,6 @@ static int wma_decode_block(WMADecodeCon { int n, v, a, ch, code, bsize; int coef_nb_bits, total_gain, parse_exponents; - DECLARE_ALIGNED_16(float, window[BLOCK_MAX_SIZE * 2]); int nb_coefs[MAX_CHANNELS]; float mdct_norm; @@ -1072,7 +1073,7 @@ static int wma_decode_block(WMADecodeCon next_block_len = 1 << s->next_block_len_bits; /* right part */ - wptr = window + block_len; + wptr = s->window + block_len; if (block_len <= next_block_len) { for(i=0;i<block_len;i++) *wptr++ = s->windows[bsize][i]; @@ -1088,7 +1089,7 @@ static int wma_decode_block(WMADecodeCon } /* left part */ - wptr = window + block_len; + wptr = s->window + block_len; if (block_len <= prev_block_len) { for(i=0;i<block_len;i++) *--wptr = s->windows[bsize][i]; @@ -1107,14 +1108,13 @@ static int wma_decode_block(WMADecodeCon for(ch = 0; ch < s->nb_channels; ch++) { if (s->channel_coded[ch]) { - DECLARE_ALIGNED_16(FFTSample, output[BLOCK_MAX_SIZE * 2]); float *ptr; int n4, index, n; n = s->block_len; n4 = s->block_len / 2; s->mdct_ctx[bsize].fft.imdct_calc(&s->mdct_ctx[bsize], - output, s->coefs[ch], s->mdct_tmp); + s->output, s->coefs[ch], s->mdct_tmp); /* XXX: optimize all that by build the window and multipying/adding at the same time */ @@ -1122,13 +1122,13 @@ static int wma_decode_block(WMADecodeCon /* multiply by the window and add in the frame */ index = (s->frame_len / 2) + s->block_pos - n4; ptr = &s->frame_out[ch][index]; - s->dsp.vector_fmul_add_add(ptr,window,output,ptr,0,2*n,1); + s->dsp.vector_fmul_add_add(ptr,s->window,s->output,ptr,0,2*n,1); /* specific fast case for ms-stereo : add to second channel if it is not coded */ if (s->ms_stereo && !s->channel_coded[1]) { ptr = &s->frame_out[1][index]; - s->dsp.vector_fmul_add_add(ptr,window,output,ptr,0,2*n,1); + s->dsp.vector_fmul_add_add(ptr,s->window,s->output,ptr,0,2*n,1); } } }