[Ffmpeg-devel] alsa input / output
Michael Niedermayer
michaelni
Wed Mar 21 04:13:10 CET 2007
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(???)... :)
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
3. multiply coefficients with the correct constants (this if iam not too
tired just multiplies coeffs with 0 or 1)
4. IFFT
5. downsample by throwing away the right samples
and yes there are certainly much more efficient ways to implement it, i
just wanted to demonstrate the low asymptotic complexity
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The educated differ from the uneducated as much as the living from the
dead. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070321/4e2f9814/attachment.pgp>
More information about the ffmpeg-devel
mailing list