summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/vf.h
diff options
context:
space:
mode:
authorRudolf Polzer <divverent@alientrap.org>2011-04-23 18:56:47 +0200
committerUoti Urpala <uau@mplayer2.org>2011-04-24 03:55:47 +0300
commit994b21a80a2f37b0d672526739cb742b87f33ad9 (patch)
tree222e014be69723c4772d5045fee35eb98ffc8a63 /libmpcodecs/vf.h
parent28b3cc0efe7a575cb8004d1b109ce5ca2f2953bb (diff)
downloadmpv-994b21a80a2f37b0d672526739cb742b87f33ad9.tar.bz2
mpv-994b21a80a2f37b0d672526739cb742b87f33ad9.tar.xz
vf_*: fix pts values passed to the next filter
Many video filters failed to calculate or even just pass through pts values for their output frames. Fix this, and also make the two remaining filters that called vf_next_put_image() twice for the same input frame (vf_softpulldown, vf_telecine) use vf_queue_frame() so that e.g. framestepping properly sees both frames. Changed filters: vf_bmovl, vf_detc, vf_divtc, vf_filmdint, vf_ivtc, vf_lavc, vf_phase, vf_pullup, vf_softpulldown, vf_telecine, vf_tile, vf_tinterlace.
Diffstat (limited to 'libmpcodecs/vf.h')
-rw-r--r--libmpcodecs/vf.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/libmpcodecs/vf.h b/libmpcodecs/vf.h
index 58cfaaf787..ec1a9c23ff 100644
--- a/libmpcodecs/vf.h
+++ b/libmpcodecs/vf.h
@@ -21,6 +21,7 @@
#include "mp_image.h"
#include "mpcommon.h"
+#include "stdbool.h"
struct MPOpts;
struct vf_instance;
@@ -169,4 +170,19 @@ static inline int norm_qscale(int qscale, int type)
return qscale;
}
+struct vf_detc_pts_buf {
+ double inpts_prev, outpts_prev;
+ double lastdelta;
+};
+void vf_detc_init_pts_buf(struct vf_detc_pts_buf *p);
+/* Adjust pts when detelecining.
+ * skip_frame: do not render this frame
+ * reset_pattern: set to 1 if the telecine pattern has reset due to scene cut
+ */
+double vf_detc_adjust_pts(struct vf_detc_pts_buf *p, double pts,
+ bool reset_pattern, bool skip_frame);
+double vf_softpulldown_adjust_pts(struct vf_detc_pts_buf *p, double pts,
+ bool reset_pattern, bool skip_frame,
+ int last_frame_duration);
+
#endif /* MPLAYER_VF_H */