diff options
Diffstat (limited to 'libmpcodecs/vf_yadif.c')
-rw-r--r-- | libmpcodecs/vf_yadif.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/libmpcodecs/vf_yadif.c b/libmpcodecs/vf_yadif.c index 971ad988e2..fd46f241cd 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" @@ -368,7 +369,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_s* 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; @@ -386,10 +387,9 @@ static int config(struct vf_instance_s* vf, return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt); } -static int continue_buffered_image(struct vf_instance_s *vf); -extern int correct_pts; +static int continue_buffered_image(struct vf_instance *vf); -static int put_image(struct vf_instance_s* 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) { @@ -416,8 +416,9 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){ return continue_buffered_image(vf); } -static int continue_buffered_image(struct vf_instance_s *vf) +static int continue_buffered_image(struct vf_instance *vf) { + struct MPOpts *opts = vf->opts; mp_image_t *mpi = vf->priv->buffered_mpi; int tff = vf->priv->buffered_tff; double pts = vf->priv->buffered_pts; @@ -434,10 +435,10 @@ static int continue_buffered_image(struct vf_instance_s *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 (opts->correct_pts && i < (vf->priv->mode & 1)) vf_queue_frame(vf, continue_buffered_image); ret |= vf_next_put_image(vf, dmpi, pts /*FIXME*/); - if (correct_pts) + if (opts->correct_pts) break; if(i<(vf->priv->mode&1)) vf_next_control(vf, VFCTRL_FLIP_PAGE, NULL); @@ -446,7 +447,7 @@ static int continue_buffered_image(struct vf_instance_s *vf) return ret; } -static void uninit(struct vf_instance_s* vf){ +static void uninit(struct vf_instance* vf){ int i; if(!vf->priv) return; @@ -460,7 +461,7 @@ static void uninit(struct vf_instance_s* vf){ } //===========================================================================// -static int query_format(struct vf_instance_s* vf, unsigned int fmt){ +static int query_format(struct vf_instance* vf, unsigned int fmt){ switch(fmt){ case IMGFMT_YV12: case IMGFMT_I420: @@ -472,7 +473,7 @@ static int query_format(struct vf_instance_s* vf, unsigned int fmt){ return 0; } -static int control(struct vf_instance_s* 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; |