[FFmpeg-devel] [PATCH] ALSA: fix timefilter divergence

Nicolas George nicolas.george at normalesup.org
Thu Mar 1 19:32:50 CET 2012

Le duodi 2 ventôse, an CCXX, Michael Niedermayer a écrit :
> Iam not opposed to using a 2nd order filter with additional handling
> for discontinuities. Though IIRC the new filter contains a loop and
> this might cause it to eat more cpu cycles than would be ideal.

I agree that that loop is not elegant at all. As for CPU cycles, the loop
actually loops only when the period is longer than 2 ms; for reference,
on real-world hardware, the period is usually around 0.67 ms (HDA Intel),
0.33 ms (old Ensoniq AudioPCI) or 1 ms (Logitech USB webcam). Therefore, the
loop will only waste cycles when the user has stacked plugins on top of
their ALSA device, and the plugins will waste much more CPU cycles than this
little timefilter.

Shall I push this patch series, then, and later consider adding
discontinuity detection to the timefilter?

By the way, V4L2 will also need to use the time filter, as some kernels have
started giving monotonic timestamps.


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120301/74ba7ded/attachment.asc>

More information about the ffmpeg-devel mailing list