diff options
author | Rudolf Polzer <divverent@alientrap.org> | 2011-04-23 18:56:47 +0200 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2011-04-24 03:55:47 +0300 |
commit | 994b21a80a2f37b0d672526739cb742b87f33ad9 (patch) | |
tree | 222e014be69723c4772d5045fee35eb98ffc8a63 /libmpcodecs/vf_filmdint.c | |
parent | 28b3cc0efe7a575cb8004d1b109ce5ca2f2953bb (diff) | |
download | mpv-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_filmdint.c')
-rw-r--r-- | libmpcodecs/vf_filmdint.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libmpcodecs/vf_filmdint.c b/libmpcodecs/vf_filmdint.c index c8da011d81..b40a66831a 100644 --- a/libmpcodecs/vf_filmdint.c +++ b/libmpcodecs/vf_filmdint.c @@ -91,6 +91,7 @@ struct vf_priv_s { struct metrics thres; char chflag; double diff_time, merge_time, decode_time, vo_time, filter_time; + struct vf_detc_pts_buf ptsbuf; }; #define PPZ { 2000, 2000, 0, 2000 } @@ -1331,7 +1332,8 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts) "" : " @@@@@@@@@@@@@@@@@"); p->merge_time += get_time() - diff_time; - return show_fields ? vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE) : 0; + pts = vf_detc_adjust_pts(&p->ptsbuf, pts, 0, !show_fields); + return show_fields ? vf_next_put_image(vf, dmpi, pts) : 0; } static int query_format(struct vf_instance *vf, unsigned int fmt) @@ -1357,6 +1359,7 @@ static int config(struct vf_instance *vf, unsigned long cxm = 0; unsigned long cym = 0; struct vf_priv_s *p = vf->priv; + vf_detc_init_pts_buf(&p->ptsbuf); // rounding: if(!IMGFMT_IS_RGB(outfmt) && !IMGFMT_IS_BGR(outfmt)){ switch(outfmt){ |