[MPlayer-dev-eng] [PATCH]Add field_dominance to bobdeint
Carl Eugen Hoyos
cehoyos at ag.or.at
Fri Jan 26 02:22:54 CET 2007
Hi!
http://samples.mplayerhq.hu/MPEG-VOB/interlaced/V.VOB claims to be interlaced
with bottom field first, but is actually top field first. Attached patch
allows it to play correctly with -vo xvmc:bobdeint by adding field_dominance:
mplayer V.VOB -vc ffmpeg12mc -vo xvmc:bobdeint:field_dominance=0
Carl Eugen
-------------- next part --------------
Index: libvo/vo_xvmc.c
===================================================================
--- libvo/vo_xvmc.c (Revision 22017)
+++ libvo/vo_xvmc.c (Arbeitskopie)
@@ -53,6 +53,7 @@
static int xv_port_request = 0;
static int bob_deinterlace;
static int top_field_first;
+static int field_dominance = -1;
static int image_width,image_height;
static uint32_t drwX,drwY;
@@ -347,7 +348,10 @@
// the surface have passed vf system without been skiped, it will be displayed
rndr->state |= MP_XVMC_STATE_DISPLAY_PENDING;
p_render_surface_to_show = rndr;
+ if (field_dominance < 0)
top_field_first = mpi->fields & MP_IMGFIELD_TOP_FIRST;
+ else
+ top_field_first = !field_dominance;
return VO_TRUE;
}
@@ -367,6 +371,7 @@
{ "sleep", OPT_ARG_BOOL, &use_sleep, NULL },
{ "queue", OPT_ARG_BOOL, &use_queue, NULL },
{ "bobdeint", OPT_ARG_BOOL, &bob_deinterlace, NULL },
+ { "field_dominance", OPT_ARG_INT, &field_dominance, NULL },
{ NULL }
};
Index: DOCS/man/en/mplayer.1
===================================================================
--- DOCS/man/en/mplayer.1 (Revision 22017)
+++ DOCS/man/en/mplayer.1 (Arbeitskopie)
@@ -3110,6 +3110,8 @@
Very simple deinterlacer.
Might not look better than \-vf tfields=1,
but it is the only deinterlacer for xvmc (default: nobobdeint).
+.IPs field_dominance=<-1\-1>
+Operates like tfields.
.IPs (no)queue
Queue frames for display to allow more parallel work of the video hardware.
May add a small (not noticeable) constant A/V desync (default: noqueue).
Index: DOCS/man/de/mplayer.1
===================================================================
--- DOCS/man/de/mplayer.1 (Revision 22017)
+++ DOCS/man/de/mplayer.1 (Arbeitskopie)
@@ -3253,6 +3253,8 @@
Sehr einfacher Deinterlacer.
Sieht möglicherweise nicht besser als \-vf tfields=1 aus, ist aber
der einzige Deinterlacer, der mit xvmc funktioniert (Standard: nobobdeint).
+.IPs field_dominance=<-1\-1>
+Arbeitet wie tfields.
.IPs (no)queue
Frames werden in einer Queue angeordnet, um der Videohardware weitergehendes
paralleles Arbeiten zu ermöglichen.
More information about the MPlayer-dev-eng
mailing list