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

Michael Niedermayer michaelni at gmx.at
Sat Mar 3 00:18:24 CET 2012


On Fri, Mar 02, 2012 at 11:10:58AM +0100, Nicolas George wrote:
> Le tridi 13 ventôse, an CCXX, Michael Niedermayer a écrit :
> > how does your timefilter perform compared to: ?
> > 
> > --- a/libavdevice/timefilter.c
> > +++ b/libavdevice/timefilter.c
> > @@ -71,7 +71,7 @@ double ff_timefilter_update(TimeFilter *self, double system_time, double period)
> > 
> >          /// update loop
> >          self->cycle_time   += FFMAX(self->feedback2_factor, 1.0 / self->count) * loop_error;
> > -        self->clock_period += self->feedback3_factor * loop_error / period;
> > +        self->clock_period += self->feedback3_factor * loop_error;
> >      }
> >      return self->cycle_time;
> >  }
> > 
> > I was not able to reproduce unstable behavior with this change and
> > it would avoid the loop.
> 
> I assume you hid a "/ constant_period" inside the value of feedback3_factor?
> Otherwise, the code fails at dimensional homogeneity and actually diverges
> immediately.

i was using a 2d search for optimal parameters and verified that
during the search no divergence happened. I have not treated
either parameter as anything but a blackbox input.
But i think i have not tested either being >1 because optimal values
always where smaller than 1

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

Many things microsoft did are stupid, but not doing something just because
microsoft did it is even more stupid. If everything ms did were stupid they
would be bankrupt already.
-------------- 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/20120303/23413cde/attachment.asc>


More information about the ffmpeg-devel mailing list