[MPlayer-dev-eng] [BUG] surround audio plugin broken

Michael Niedermayer michaelni at gmx.at
Wed Jan 8 12:37:50 CET 2003


Hi

On Tuesday 07 January 2003 01:24, Anders Johansson wrote:
> Hi,
>
> > Hi
> >
> > On Monday 06 January 2003 09:14, Anders Johansson wrote:
> > > Hi,
> > >
> > > > ill try to optimize the libaf stuff tomorrow perhaps ...
> > >
> > > What are you planing to do?
> >
> > rewrite the innermost loops in af_resample.h & mmx optimize them, perhaps
> > SSE for the float stuff, i assume they are the most timeconsuming part
> > but ill check that
>
> Sounds great, a starting point for the mmx can be found in
> libao2/fir.h, also I think the optimized fir code should be moved to a
> separate file (af_fir.h) since it will be used elewhere (see
> af_surround for example).
>
> BTW before you start rewriting take a look at the compiler output. I
> did some optimization of the C-code by looking at the assembly output
> when I first wrote the code, so it compiles quite well. Another thing
> which would be great would be to combine up and downsampling into one
> routine.

hmm, seems its a bit more tricky to optimize
the problem:
the circular buffer is filled 1 sample at a time and then these are immediatly 
used in the FIR filter, this makes MMX&SSE useless as there are large 
penalties for reading something which was written with a different size 
immedeately before, i ll try to use a larger buffer and prefill it before 
running the FIR filter over it ...

btw, is 
#define ADDQUE(xi,xq,in)\
  xq[xi]=xq[xi+L]=(*in);\
  xi=(xi-1)&(L-1);
correct?
shouldnt it be
#define ADDQUE(xi,xq,in)\
  xi=(xi-1)&(L-1);\
  xq[xi]=xq[xi+L]=(*in);
?

[...]

Michael


More information about the MPlayer-dev-eng mailing list