diff options
author | wm4 <wm4@nowhere> | 2015-11-04 14:26:28 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-11-04 21:49:54 +0100 |
commit | e6a395c2979689761a5d86bdf1863530f5553f9d (patch) | |
tree | 4be9c1413287ef9cf5227c0425874de440d7fbdd /video/out/opengl | |
parent | be49da72ea245e2b5227ce4b96b6c2c8f360cfaf (diff) |
vo_opengl, vo_opengl_cb: drop unneeded vo_frame fields
next_vsync/prev_vsync was only used to retrieve the vsync duration. We
can get this in a simpler way.
This also removes the vsync duration estimation from vo_opengl_cb.c,
which is probably worthless anyway. (And once interpolation is made
display-sync only, this won't matter at all.)
Diffstat (limited to 'video/out/opengl')
-rw-r--r-- | video/out/opengl/video.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c index 00c7663e91..e7398e50ba 100644 --- a/video/out/opengl/video.c +++ b/video/out/opengl/video.c @@ -1859,8 +1859,7 @@ static void gl_video_interpolate_frame(struct gl_video *p, struct vo_frame *t, // Blend the frames together if (oversample) { - double vsync_dist = (t->next_vsync - t->prev_vsync)/1e6 - / (pts_nxt - pts_now), + double vsync_dist = t->vsync_interval / 1e6 / (pts_nxt - pts_now), threshold = tscale->conf.kernel.params[0]; threshold = isnan(threshold) ? 0.0 : threshold; mix = (1 - mix) / vsync_dist; @@ -1884,7 +1883,7 @@ static void gl_video_interpolate_frame(struct gl_video *p, struct vo_frame *t, MP_STATS(p, "frame-mix"); MP_DBG(p, "inter frame pts: %lld, vsync: %lld, mix: %f\n", - (long long)t->pts, (long long)t->next_vsync, mix); + (long long)t->pts, (long long)t->vsync_interval, mix); p->is_interpolated = true; } pass_draw_to_screen(p, fbo); |