diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-10-15 18:27:34 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-10-15 18:27:34 +0000 |
commit | 140ee2645b5275e5fa1fc1388cd4d5add13a7150 (patch) | |
tree | 9655296187c3c35f24fe1fd729920485d2c34701 | |
parent | 045b49c45e4fc2c48c4264f4474fa94fe6fe55a7 (diff) |
Implement bob (pseudo?) deinterlacing for xvmc.
Patch from Tomas Janousek (tomi at nomi cz) with modifications by
Carl Eugen Hoyos (cehoyos at ag or at) and me.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20250 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | DOCS/man/de/mplayer.1 | 4 | ||||
-rw-r--r-- | DOCS/man/en/mplayer.1 | 4 | ||||
-rw-r--r-- | libvo/vo_xvmc.c | 12 |
3 files changed, 19 insertions, 1 deletions
diff --git a/DOCS/man/de/mplayer.1 b/DOCS/man/de/mplayer.1 index baea38afa4..a24606a4a7 100644 --- a/DOCS/man/de/mplayer.1 +++ b/DOCS/man/de/mplayer.1 @@ -3230,6 +3230,10 @@ Deaktiviert die Anzeige von Bildern. Benötigt für einwandfreies Benchmarking von Treibern, die den Bildpuffer nur bei einem Monitor-Retrace ändern (nVidia). Voreinstellung ist, die Bildwiedergabe nicht zu deaktivieren (nobenchmark). +.IPs (no)bobdeint +Sehr einfacher Deinterlacer. +Sieht m\366glicherweise nicht besser als -vf tfields=1 aus, ist aber +der einzige Deinterlacer, der mit xvmc funktioniert. (Standard: nobobdeint) .IPs (no)queue Frames werden in einer Queue angeordnet, um der Videohardware weitergehendes paralleles Arbeiten zu ermöglichen. diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1 index 2da102055e..f7e9ea2818 100644 --- a/DOCS/man/en/mplayer.1 +++ b/DOCS/man/en/mplayer.1 @@ -3087,6 +3087,10 @@ Disables image display. Necessary for proper benchmarking of drivers that change image buffers on monitor retrace only (nVidia). Default is not to disable image display (nobenchmark). +.IPs (no)bobdeint +Very simple deinterlacer. +Might not look better than -vf tfields=1, +but it's the only deinterlacer for xvmc (default: nobobdeint). .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). diff --git a/libvo/vo_xvmc.c b/libvo/vo_xvmc.c index 3f90d678e4..de86e0facd 100644 --- a/libvo/vo_xvmc.c +++ b/libvo/vo_xvmc.c @@ -51,6 +51,8 @@ static int use_sleep; static int first_frame;//draw colorkey on first frame static int use_queue; static int xv_port_request = 0; +static int bob_deinterlace; +static int top_field_first; static int image_width,image_height; static uint32_t drwX,drwY; @@ -345,6 +347,7 @@ xvmc_render_state_t * rndr; // 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; + top_field_first = mpi->fields & MP_IMGFIELD_TOP_FIRST; return VO_TRUE; } @@ -363,6 +366,7 @@ opt_t subopts [] = { "benchmark", OPT_ARG_BOOL, &benchmark, NULL }, { "sleep", OPT_ARG_BOOL, &use_sleep, NULL }, { "queue", OPT_ARG_BOOL, &use_queue, NULL }, + { "bobdeint", OPT_ARG_BOOL, &bob_deinterlace, NULL }, { NULL } }; @@ -400,6 +404,7 @@ opt_t subopts [] = benchmark = 0; //disable PutImageto allow faster display than screen refresh use_sleep = 0; use_queue = 0; + bob_deinterlace = 0; /* parse suboptions */ if ( subopt_parse( arg, subopts ) != 0 ) @@ -1014,6 +1019,7 @@ int status,rez; static void put_xvmc_image(xvmc_render_state_t * p_render_surface, int draw_ck){ int rez; int clipX,clipY,clipW,clipH; +int i; if(p_render_surface == NULL) return; @@ -1029,15 +1035,19 @@ int clipX,clipY,clipW,clipH; if(benchmark) return; + for (i = 1; i <= bob_deinterlace + 1; i++) { + int field = top_field_first ? i : i ^ 3; rez = XvMCPutSurface(mDisplay, p_render_surface->p_surface, vo_window, 0, 0, image_width, image_height, clipX, clipY, clipW, clipH, - 3);//p_render_surface_to_show->display_flags); + bob_deinterlace ? field : 3); + //p_render_surface_to_show->display_flags); if(rez != Success){ printf("vo_xvmc: PutSurface failer, critical error %d!\n",rez); assert(0); } + } XFlush(mDisplay); } |