[Ffmpeg-devel] alsa input / output

Måns Rullgård mans
Wed Mar 21 09:48:33 CET 2007


Rich Felker <dalias at aerifal.cx> writes:

> On Wed, Mar 21, 2007 at 04:13:10AM +0100, Michael Niedermayer wrote:
>> Hi
>> 
>> On Tue, Mar 20, 2007 at 09:42:38PM -0500, Rich Felker wrote:
>> > On Wed, Mar 21, 2007 at 12:52:47AM +0000, M?ns Rullg?rd wrote:
>> > > Assuming the input is not undersampled, is there not exactly one
>> > > mathematically correct resampling?  It's been a while since I studied
>> > > signal processing, so I may have forgotten something.
>> > 
>> > Yes. Unfortunately it's O(???)... :)
>
> Your (broken? weird that it becomes 3 ?'s and not just 1..) charset
> config lost the infinity. :(
>
>> if the ratio of the sample rates is rational (and constant relative to n)
>> then this can trivially be done in O(n*log n)
>> 1. upsample by adding zeros to the least common multiple of the samplerates
>>   (slow and silly but just adds a constant factor C*n)
>> 2. FFT
>
> M?ns said the mathematically correct resampling. For this, the FT
> (and IFT) are infinite processes. What you describe is a finite
> approximation of it.

You can get results correct within the precision of the machine number
representation, whatever it is, in a finite time.  Correct within the
abilities of human perception should be even easier.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list