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

Balatoni Denes pnis at coder.hu
Mon Jan 6 10:17:25 CET 2003


Hi!

How much cpu is the original and the linint resample eats on your machine?
On my strongarm (206mhz, no fpu) af with the 32bit linint (one add, one shr) 
used iirc 1,7 %, with the64bit 2,3 and with the original about 5 % (11127hz 
8bit mono->44100hz 16bit stereo) - this is from the times when libaf didn't 
support float sample format btw.

By the carry stuff you mean something like
	add pointer,step
	add counter,step2
	jnc bla
	inc pointer
	sub counter,denominator
bla:	
	mov output,input[pointer]
	loop innerloop
?

actually the only motiviation for linint was that it took a long time to set 
the filter up for that 11127->44100hz resample (70 secs). With sloppy it
was already acceptable though(3 secs).


> 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. 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. Ideally it should
> be a runtime option, IMO...
>
> Rich

bye
Denes




More information about the MPlayer-dev-eng mailing list