mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Vertical align.
Originally committed as revision 17847 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
2e51dedd24
commit
bc3057f499
@ -59,15 +59,15 @@ double ff_timefilter_update(TimeFilter *self, double system_time, double period)
|
||||
self->count++;
|
||||
if (self->count==1) {
|
||||
/// init loop
|
||||
self->cycle_time = system_time;
|
||||
self->cycle_time = system_time;
|
||||
} else {
|
||||
double loop_error;
|
||||
self->cycle_time += self->clock_period * period;
|
||||
/// calculate loop error
|
||||
loop_error = system_time - self->cycle_time;
|
||||
loop_error = system_time - self->cycle_time;
|
||||
|
||||
/// update loop
|
||||
self->cycle_time += FFMAX(self->feedback2_factor, 1.0/(self->count)) * loop_error;
|
||||
self->cycle_time += FFMAX(self->feedback2_factor, 1.0/(self->count)) * loop_error;
|
||||
self->clock_period += self->feedback3_factor * loop_error / period;
|
||||
}
|
||||
return self->cycle_time;
|
||||
|
Loading…
Reference in New Issue
Block a user