diff options
author | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-06-07 17:21:45 +0000 |
---|---|---|
committer | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-06-07 17:21:45 +0000 |
commit | e4c69a69198525719021b839f5a4b12e4b7e22b5 (patch) | |
tree | 9892b4f389a5f2d77b10bd8363cf43af77ec3619 | |
parent | 81d95fdb6d05a42595053e7cd08fa35b6f1fd441 (diff) | |
download | mpv-e4c69a69198525719021b839f5a4b12e4b7e22b5.tar.bz2 mpv-e4c69a69198525719021b839f5a4b12e4b7e22b5.tar.xz |
make spatial interlacing check optional
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18627 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | DOCS/man/en/mplayer.1 | 3 | ||||
-rw-r--r-- | libmpcodecs/vf_yadif.c | 9 |
2 files changed, 5 insertions, 7 deletions
diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1 index 324fc42b52..10884dab32 100644 --- a/DOCS/man/en/mplayer.1 +++ b/DOCS/man/en/mplayer.1 @@ -5906,7 +5906,8 @@ Yet another deinterlacing filter .PD 0 .RSs .IPs <mode> -0 (output 1 frame for each frame), 1 (output 1 frame for each field) +0 (output 1 frame for each frame), 1 (output 1 frame for each field), +2 (like 0 but skip spatial interlacing check), 3 (like 1 but skip spatial interlacing check) .IPs <field_dominance> like tfields .RE diff --git a/libmpcodecs/vf_yadif.c b/libmpcodecs/vf_yadif.c index d5f3ac394b..1e20a8fcc2 100644 --- a/libmpcodecs/vf_yadif.c +++ b/libmpcodecs/vf_yadif.c @@ -103,7 +103,7 @@ static void filter(struct vf_priv_s *p, uint8_t *dst[3], int dst_stride[3], int spatial_pred= (cur[-refs +j] + cur[+refs -j])>>1; } } - { + if(p->mode<2){ int b= (prev2[-2*refs] + next2[-2*refs])>>1; int f= (prev2[+2*refs] + next2[+2*refs])>>1; #if 0 @@ -164,7 +164,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){ store_ref(vf->priv, mpi->planes, mpi->stride, mpi->w, mpi->h); - for(i=0; i<=vf->priv->mode; i++){ + for(i=0; i<=(vf->priv->mode&1); i++){ dmpi=vf_get_image(vf->next,mpi->imgfmt, MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE|MP_IMGFLAG_PREFER_ALIGNED_STRIDE, @@ -172,7 +172,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){ vf_clone_mpi_attributes(dmpi, mpi); filter(vf->priv, dmpi->planes, dmpi->stride, mpi->w, mpi->h, i ^ tff ^ 1, tff); ret |= vf_next_put_image(vf, dmpi, pts /*FIXME*/); - if(i<vf->priv->mode) + if(i<(vf->priv->mode&1)) vf_next_control(vf, VFCTRL_FLIP_PAGE, NULL); } @@ -219,9 +219,6 @@ static int open(vf_instance_t *vf, char* args){ if (args) sscanf(args, "%d:%d", &vf->priv->mode, &vf->priv->parity); - if(vf->priv->mode < 0 || vf->priv->mode > 1) - vf->priv->mode=0; - return 1; } |