[MPlayer-dev-eng] [BUG] surround audio plugin broken
Anders Johansson
ajh at watri.uwa.edu.au
Mon Jan 6 05:15:05 CET 2003
Hi,
> > > > > > ill try to optimize the libaf stuff tomorrow perhaps ...
> > > > >
> > > > > Cool. AC3 decoding and resampling to 44100 are the two biggest
> > > > > bottlenecks preventing realtime dvd playback on my box right now! With
> > > > > Fabrice working on the ffmpeg ac3 decoder and libaf optimized, I
> > > > > imagine I'll finally be able to play dvds (without -framedrop).
> > > >
> > > > Try the linear interpolation it is faster than the filter bank
> > > > resampling.
> > >
> > > It does indeed help, reducing sound cpu usage by a couple percent.
> > > However, I expect that an optimized implementation of the filter bank
> > > code could be even faster.
> >
> > It will never be faster than linear interpolation cause it only
> > duplicates or removes samples (no addition or multiplication at all).
>
> Hmm, I assumed it interpolated samples rather than just inserting or
> dropping them. Reading the code, however, I still think it's much less
> efficient than a good asm implementation would be, and I wouldn't be
> at all surprised if a good asm implementation of the filter bank
> resample could rival the current C linint resample.
Perhaps.. there is a mmx implementation made, you will find it in the
old libao2/fir.h I just never had time to port it.
> For example, the 64 bit arithmetic has an obvious replacement with
> nice use of carries, eliminating the shifts at the same
> time. Perhaps a good compiler would do this for you, but last I
> checked gcc wasn't a "good compiler". :) And of course vector
> instructions (mmx, etc.) could reduce the impact of arithmetic in
> the filter bank code quite a bit.
>
> BTW, I'm reading the code as I write this, and I question the validity
> of selecting filter length based on the presence of MMX. Certainly
> length 16 should be chosen on fast non-x86 systems.
I have never been able to figure out which ones though, do you know?
> Ideally it should be a runtime option, IMO...
Yes, the speed setting should select filter lenght not sample format,
I am planning to fix this as well, when I do the other changes.
> Rich
//Anders
More information about the MPlayer-dev-eng
mailing list