[MPlayer-dev-eng] [PATCH] fix for -srate bug

Ed Wildgoose lists at wildgooses.com
Tue Oct 19 14:51:44 CEST 2004


>>>u shouldnt compare against the MPlayer resampler, IIRC it has modulo,
>>>divide and gotos in the innermost loop
>>>      
>>>
>>Sure, but isn't that yet another reason to consider a high quality,
>>maintained alternative like libsamplerate?  I would suggest
>>incorporating the code directly except that I think there is a fair bit
>>of assembly and this might become a problem with a portable project like
>>mplayer.  It would certainly be beyond my abilities to help porting it
>>to all platforms (assuming it isn't supported already)
>>    
>>
>
>ive just downloaded libsamplerate-0.1.2, theres no asm in there except a 
>lrintf() implementation and its pure floating point code with divides and 
>modulo in the innermost loop, so it cannot be as fast as u claim unless i 
>missed some integer resampler
>  
>

Aha, yes you appear to be right.  I havent looked at the code that much, 
I just saw what turned out to be a file with asm in the title and 
assumed something that it wasn't

Your point stands that it may not be any faster as a result.  However, 
my intention really was not so much to implement it because it might be 
faster, but because it might have higher quality.  I haven't done any 
A/B testing yet, but mplayer still sounds a little "funny" to me with 
the high quality resampler engaged.  I will try to quickly hack in 
libsamplerate so that I can compare and report on the difference. 

My comments on speed are based on having implemented libsamplerate in 
mythtv and comparing the rough incremental CPU difference with it on and 
off, and doing the same with the resample in mplayer.  It's not a 
scientific approach at all, and should be taken with a +/- 100% 
confidence interval... 

My thoughts on making libsamplerate available for mplayer would 
initially be a compiler time #define which would leave the current one 
as the default, but allow you to hook in libsamplerate if it was 
available.  However, of course some more testing is still needed, but 
that at least was my suggested approach

What do you think?

Ed W





More information about the MPlayer-dev-eng mailing list