From be7eef3827543d529b6a1314d4e743a4d48a0075 Mon Sep 17 00:00:00 2001 From: rfelker Date: Thu, 10 Jun 2004 05:20:50 +0000 Subject: [PATCH] configurable 'junk' borders for pullup git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12550 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/man/en/mplayer.1 | 12 ++++++++++-- libmpcodecs/vf_pullup.c | 15 +++++++++------ 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1 index b264c2b447..1dc02dca66 100644 --- a/DOCS/man/en/mplayer.1 +++ b/DOCS/man/en/mplayer.1 @@ -3176,7 +3176,7 @@ As with detc, you must specify the correct output framerate (\-ofps 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 @@ Like ivtc, pullup is stateless in the sense that it does not lock onto 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 diff --git a/libmpcodecs/vf_pullup.c b/libmpcodecs/vf_pullup.c index 08a293f23e..710d24e3cd 100644 --- a/libmpcodecs/vf_pullup.c +++ b/libmpcodecs/vf_pullup.c @@ -80,11 +80,6 @@ static void init_pullup(struct vf_instance_s* vf, mp_image_t *mpi) 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 void uninit(struct vf_instance_s* vf) 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 @@ static int open(vf_instance_t *vf, char* args) 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; }