[FFmpeg-devel] [PATCH] ALSA: use a different time filter.

Michael Niedermayer michaelni at gmx.at
Wed Dec 28 21:13:47 CET 2011


On Wed, Dec 28, 2011 at 08:35:22PM +0100, Nicolas George wrote:
> The time filter used so far was designed for JACK, which returns data in
> small packets with constant size. Reads from ALSA have varying size,
> especially in non-blocking mode, and can be much bigger with some plugins.
> With these parameters, the filter is likely to diverge.
> 
> The new filter is based on a least-square linear fit maintained with an
> exponential weighted moving average. It converges somewhat slower but can
> handle larger and varying periods and can not diverge under normal
> circumstances.
> 
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> ---
> 
> 
> This is one of two options I have found. The other is this: use an arbitrary
> period size, maybe sample_rate / 256, and use the current time filter with
> interpolated values. That would probably make less code overall, but I am
> not comfortable with the arbitrary values and the possible divergence.

Can you explain how the current timefilter becomes divergent ?

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
-------------- 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/20111228/aece0ab4/attachment.asc>


More information about the ffmpeg-devel mailing list