diff options
Diffstat (limited to 'libmpcodecs/vf_yadif.c')
-rw-r--r-- | libmpcodecs/vf_yadif.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libmpcodecs/vf_yadif.c b/libmpcodecs/vf_yadif.c index 6c23f16088..e1a08c737a 100644 --- a/libmpcodecs/vf_yadif.c +++ b/libmpcodecs/vf_yadif.c @@ -26,6 +26,7 @@ #include "config.h" #include "cpudetect.h" +#include "options.h" #include "mp_msg.h" #include "img_format.h" @@ -363,7 +364,7 @@ static void filter(struct vf_priv_s *p, uint8_t *dst[3], int dst_stride[3], int #endif } -static int config(struct vf_instance *vf, +static int config(struct vf_instance* vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ int i, j; @@ -382,9 +383,8 @@ static int config(struct vf_instance *vf, } static int continue_buffered_image(struct vf_instance *vf); -extern int correct_pts; -static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ int tff; if(vf->priv->parity < 0) { @@ -411,6 +411,8 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ return continue_buffered_image(vf); } +extern const int under_mencoder; + static int continue_buffered_image(struct vf_instance *vf) { mp_image_t *mpi = vf->priv->buffered_mpi; @@ -429,19 +431,17 @@ static int continue_buffered_image(struct vf_instance *vf) mpi->width,mpi->height); vf_clone_mpi_attributes(dmpi, mpi); filter(vf->priv, dmpi->planes, dmpi->stride, mpi->w, mpi->h, i ^ tff ^ 1, tff); - if (correct_pts && i < (vf->priv->mode & 1)) + if (i < (vf->priv->mode & 1) && !under_mencoder) vf_queue_frame(vf, continue_buffered_image); ret |= vf_next_put_image(vf, dmpi, pts /*FIXME*/); - if (correct_pts) + if (!under_mencoder) break; - if(i<(vf->priv->mode&1)) - vf_extra_flip(vf); } vf->priv->buffered_i = 1; return ret; } -static void uninit(struct vf_instance *vf){ +static void uninit(struct vf_instance* vf){ int i; if(!vf->priv) return; @@ -455,7 +455,7 @@ static void uninit(struct vf_instance *vf){ } //===========================================================================// -static int query_format(struct vf_instance *vf, unsigned int fmt){ +static int query_format(struct vf_instance* vf, unsigned int fmt){ switch(fmt){ case IMGFMT_YV12: case IMGFMT_I420: @@ -467,7 +467,7 @@ static int query_format(struct vf_instance *vf, unsigned int fmt){ return 0; } -static int control(struct vf_instance *vf, int request, void* data){ +static int control(struct vf_instance* vf, int request, void* data){ switch (request){ case VFCTRL_GET_DEINTERLACE: *(int*)data = vf->priv->do_deinterlace; |