changeset 12549:bb9bf9a97ac6

configurable 'junk' borders for pullup
author rfelker
date Thu, 10 Jun 2004 05:20:50 +0000
parents 8584fdad0188
children 733c9d9882d1
files DOCS/man/en/mplayer.1 libmpcodecs/vf_pullup.c
diffstat 2 files changed, 19 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/DOCS/man/en/mplayer.1	Thu Jun 10 05:06:34 2004 +0000
+++ b/DOCS/man/en/mplayer.1	Thu Jun 10 05:20:50 2004 +0000
@@ -3176,7 +3176,7 @@
 Further development on ivtc has stopped, as the pullup and filmdint
 filters appear to be much more accurate.
 .TP
-.B pullup\ 
+.B pullup[=jl:jr:jt:jb:sb]\ 
 Third-generation pulldown reversal (inverse telecine) filter,
 capable of handling mixed hard-telecine, 24 fps progressive, and 30
 fps progressive content.
@@ -3186,7 +3186,15 @@
 a pattern to follow, but it instead looks forward to the following
 fields in order to identify matches and rebuild progressive frames.
 It is still under development, but believed to be quite accurate.
-No configuration options are available yet.
+The jl, jr, jt, and jb options set the amount of "junk" to ignore at
+the left, right, top, and bottom of the image, respectively.
+Left/right are in units of 8 pixels, while top/bottom are in units of
+2 lines.
+The default is 8 pixels on each side.
+Setting the sb (strict breaks) option to 1 will reduce the chances of
+pullup generating an occasional mismatched frame, but it may also
+cause an excessive number of frames to be dropped during high motion
+sequences.
 .I NOTE:
 Always follow pullup with the softskip filter when encoding to ensure
 that pullup is able to see each frame. Failure to do so will lead to
--- a/libmpcodecs/vf_pullup.c	Thu Jun 10 05:06:34 2004 +0000
+++ b/libmpcodecs/vf_pullup.c	Thu Jun 10 05:20:50 2004 +0000
@@ -80,11 +80,6 @@
 		c->metric_plane = 0;
 	}
 
-	c->strict_breaks = 0;
-	c->junk_left = c->junk_right = 1;
-	c->junk_top = c->junk_bottom = 4;
-	c->verbose = verbose;
-
 	if (gCpuCaps.hasMMX) c->cpu |= PULLUP_CPU_MMX;
 	if (gCpuCaps.hasMMX2) c->cpu |= PULLUP_CPU_MMX2;
 	if (gCpuCaps.has3DNow) c->cpu |= PULLUP_CPU_3DNOW;
@@ -315,6 +310,7 @@
 static int open(vf_instance_t *vf, char* args)
 {
 	struct vf_priv_s *p;
+	struct pullup_context *c;
 	vf->get_image = get_image;
 	vf->put_image = put_image;
 	vf->config = config;
@@ -322,8 +318,15 @@
 	vf->uninit = uninit;
 	vf->default_reqs = VFCAP_ACCEPT_STRIDE;
 	vf->priv = p = calloc(1, sizeof(struct vf_priv_s));
-	p->ctx = pullup_alloc_context();
+	p->ctx = c = pullup_alloc_context();
 	p->fakecount = 2;
+	c->verbose = verbose;
+	c->junk_left = c->junk_right = 1;
+	c->junk_top = c->junk_bottom = 4;
+	c->strict_breaks = 0;
+	if (args) {
+		sscanf(args, "%d:%d:%d:%d:%d", &c->junk_left, &c->junk_right, &c->junk_top, &c->junk_bottom, &c->strict_breaks);
+	}
 	return 1;
 }