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

Michael Niedermayer michaelni at gmx.at
Tue Oct 19 14:32:29 CEST 2004


Hi

On Monday 18 October 2004 20:19, Ed Wildgoose wrote:
> >>Would a patch to incorporate libsamplerate be acceptable?  We obviously
> >>don't want a ton of sample rate convertors, and I would expect it to be
> >>tricky to completely integrate libsamplerate (if we need to be able to
> >>compile it on funny architectures for example), but I could make it a
> >>compile time option to use the internal stuff or libsamplerate?
> >
> >why, dont u just use the audio resample code from libavcodec ?
> >it can easily be extended to support any linear filter, can compensate for
> >timestamp drift correctly (no ugly sounding duplicated/dropped samples)
>
> Well my goal is very high end audio and video, comparable with 20K
> systems or more....  Libsamplerate seems to be the highest quality
> resampler out there, and most likely somewhat better than the libavcodec
> one (or the mplayer one).  And the CPU requirements are "sufficient" as
> well.  Also it is very nicely contained with a very simple api
>
> I would not have thought that we would need to correct for timestamp
> drift in general if we are clocking video to audio?  What kind of things
> did you have in mind?
>
> >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


[...]
-- 
Michael

"I do not agree with what you have to say, but I'll defend to the death your
right to say it." -- Voltaire




More information about the MPlayer-dev-eng mailing list