diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2009-03-06 00:44:12 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2009-03-06 00:44:12 +0000 |
commit | 32284910277308ea3236edf5bf523cffc857cb12 (patch) | |
tree | c63cf610cbbe7cf868c110688714810b6ba2cfe9 /libavformat/timefilter.c | |
parent | 1b85ec1ea231f26184c8e7328322916bdaf08db9 (diff) | |
download | ffmpeg-32284910277308ea3236edf5bf523cffc857cb12.tar.gz |
Add clock_period parameter, this should make the code easier to use.
Originally committed as revision 17845 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/timefilter.c')
-rw-r--r-- | libavformat/timefilter.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/timefilter.c b/libavformat/timefilter.c index 809dbc60ce..6873ad7b55 100644 --- a/libavformat/timefilter.c +++ b/libavformat/timefilter.c @@ -35,10 +35,10 @@ struct TimeFilter { int count; }; -TimeFilter * ff_timefilter_new(double feedback2_factor, double feedback3_factor) +TimeFilter * ff_timefilter_new(double clock_period, double feedback2_factor, double feedback3_factor) { TimeFilter *self = av_mallocz(sizeof(TimeFilter)); - self->integrator2_state = 1.0; + self->integrator2_state = clock_period; self->feedback2_factor = feedback2_factor; self->feedback3_factor = feedback3_factor; return self; @@ -98,7 +98,7 @@ main(){ for(par0= bestpar0*0.8; par0<=bestpar0*1.21; par0+=bestpar0*0.05){ for(par1= bestpar1*0.8; par1<=bestpar1*1.21; par1+=bestpar1*0.05){ double error=0; - TimeFilter *tf= ff_timefilter_new(par0, par1); + TimeFilter *tf= ff_timefilter_new(1, par0, par1); for(i=0; i<SAMPLES; i++){ double filtered; filtered= ff_timefilter_update(tf, samples[i], 1); |