summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/vf_yadif.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmpcodecs/vf_yadif.c')
-rw-r--r--libmpcodecs/vf_yadif.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/libmpcodecs/vf_yadif.c b/libmpcodecs/vf_yadif.c
index 4b408a2e21..477ea03c9b 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_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;
@@ -381,10 +382,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) {
@@ -411,7 +411,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)
+extern const int under_mencoder;
+
+static int continue_buffered_image(struct vf_instance *vf)
{
mp_image_t *mpi = vf->priv->buffered_mpi;
int tff = vf->priv->buffered_tff;
@@ -429,19 +431,17 @@ 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 (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_s* vf){
+static void uninit(struct vf_instance* vf){
int i;
if(!vf->priv) return;
@@ -455,7 +455,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:
@@ -467,7 +467,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;