diff options
author | wm4 <wm4@nowhere> | 2015-01-27 19:10:13 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-01-27 19:10:13 +0100 |
commit | 86bba0dc5ba5ce9a5b10d602c9c261ed613cbbf3 (patch) | |
tree | 211044d9761d9876793de2c3d874ebe52bda93c9 /video/filter/vf.c | |
parent | 97f32fdb238aa7e8a38298935ea1f47cf8817adf (diff) | |
download | mpv-86bba0dc5ba5ce9a5b10d602c9c261ed613cbbf3.tar.bz2 mpv-86bba0dc5ba5ce9a5b10d602c9c261ed613cbbf3.tar.xz |
vf_divtc: remove this filter
Better solutions are available in vf_vapoursynth and vf_lavfi. The only
user I know who used this is now using vf_vapoursynth.
Diffstat (limited to 'video/filter/vf.c')
-rw-r--r-- | video/filter/vf.c | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/video/filter/vf.c b/video/filter/vf.c index 14ee694ac1..890c297cc0 100644 --- a/video/filter/vf.c +++ b/video/filter/vf.c @@ -58,7 +58,6 @@ extern const vf_info_t vf_info_ilpack; extern const vf_info_t vf_info_dsize; extern const vf_info_t vf_info_pullup; extern const vf_info_t vf_info_delogo; -extern const vf_info_t vf_info_divtc; extern const vf_info_t vf_info_screenshot; extern const vf_info_t vf_info_sub; extern const vf_info_t vf_info_yadif; @@ -97,7 +96,6 @@ static const vf_info_t *const filter_list[] = { &vf_info_dsize, &vf_info_pullup, &vf_info_delogo, - &vf_info_divtc, &vf_info_sub, &vf_info_yadif, &vf_info_stereo3d, @@ -756,72 +754,3 @@ void vf_set_dar(int *d_w, int *d_h, int w, int h, double dar) } } } - -void vf_detc_init_pts_buf(struct vf_detc_pts_buf *p) -{ - p->inpts_prev = MP_NOPTS_VALUE; - p->outpts_prev = MP_NOPTS_VALUE; - p->lastdelta = 0; -} - -static double vf_detc_adjust_pts_internal(struct vf_detc_pts_buf *p, - double pts, bool reset_pattern, - bool skip_frame, double delta, - double boundfactor_minus, - double increasefactor, - double boundfactor_plus) -{ - double newpts; - - if (pts == MP_NOPTS_VALUE) - return pts; - - if (delta <= 0) { - if (p->inpts_prev == MP_NOPTS_VALUE) - delta = 0; - else if (pts == p->inpts_prev) - delta = p->lastdelta; - else - delta = pts - p->inpts_prev; - } - p->inpts_prev = pts; - p->lastdelta = delta; - - if (skip_frame) - return MP_NOPTS_VALUE; - - /* detect bogus deltas and then passthru pts (possibly caused by seeking, - * or bad input) */ - if (p->outpts_prev == MP_NOPTS_VALUE || reset_pattern || delta <= 0.0 || - delta >= 0.5) - newpts = pts; - else { - // turn 5 frames into 4 - newpts = p->outpts_prev + delta * increasefactor; - - // bound to input pts in a sensible way; these numbers come because we - // map frames the following way when ivtc'ing: - // 0/30 -> 0/24 diff=0 - // 1/30 -> 1/24 diff=1/120 - // 2/30 -> - - // 3/30 -> 2/24 diff=-1/60 - // 4/30 -> 3/24 diff=-1/120 - if (newpts < pts - delta * boundfactor_minus) - newpts = pts - delta * boundfactor_minus; - if (newpts > pts + delta * boundfactor_plus) - newpts = pts + delta * boundfactor_plus; - if (newpts < p->outpts_prev) - newpts = p->outpts_prev; // damage control - } - p->outpts_prev = newpts; - - return newpts; -} - -double vf_detc_adjust_pts(struct vf_detc_pts_buf *p, double pts, - bool reset_pattern, bool skip_frame) -{ - // standard telecine (see above) - return vf_detc_adjust_pts_internal(p, pts, reset_pattern, skip_frame, - 0, 0.5, 1.25, 0.25); -} |