[MPlayer-dev-eng] [PATCH][RFC]One more change for vdpau:deint

Carl Eugen Hoyos cehoyos at rainbow.studorg.tuwien.ac.at
Fri Feb 27 17:58:38 CET 2009


Hi!

I believe, we should also support single field output for -vo vdpau. This 
would be the last change to the command line options (I hope).
If acceptable, I would commit in at least two steps and update the manual 
page.

Reimar, could you comment?
Thank you, Carl Eugen
-------------- next part --------------
Index: libvo/vo_vdpau.c
===================================================================
--- libvo/vo_vdpau.c	(revision 28739)
+++ libvo/vo_vdpau.c	(working copy)
@@ -148,6 +148,7 @@
 
 static VdpVideoMixer                      video_mixer;
 static int                                deint;
+static int                                deint_type;
 static int                                pullup;
 static float                              denoise;
 static float                              sharpen;
@@ -208,7 +209,7 @@
 
     // we would need to provide 2 past and 1 future frames to allow advanced
     // deinterlacing, which is not really possible currently.
-    for (i = 0; i <= !!deint; i++) {
+    for (i = 0; i <= !!(deint > 1); i++) {
         int field = VDP_VIDEO_MIXER_PICTURE_STRUCTURE_FRAME;
         VdpOutputSurface output_surface;
         if (i)
@@ -394,9 +395,9 @@
         &vid_height,
         &vdp_chroma_type
     };
-    if (deint == 2)
+    if (deint == 3)
         features[feature_count++] = VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL;
-    if (deint == 3)
+    if (deint == 4)
         features[feature_count++] = VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL_SPATIAL;
     if (pullup)
         features[feature_count++] = VDP_VIDEO_MIXER_FEATURE_INVERSE_TELECINE;
@@ -944,11 +945,12 @@
     "\n-vo vdpau command line help:\n"
     "Example: mplayer -vo vdpau:deint=2\n"
     "\nOptions:\n"
-    "  deint\n"
+    "  deint (all modes > 0 respect -field-dominance)\n"
     "    0: no deinterlacing\n"
-    "    1: bob deinterlacing (current fallback)\n"
-    "    2: temporal deinterlacing (not yet working)\n"
-    "    3: temporal-spatial deinterlacing (not yet working)\n"
+    "    1: only show first field\n"
+    "    2: bob deinterlacing (current fallback)\n"
+    "    3: temporal deinterlacing (not yet working)\n"
+    "    4: temporal-spatial deinterlacing (not yet working)\n"
     "  pullup\n"
     "    Try to apply inverse-telecine (needs deinterlacing, not working)\n"
     "  denoise\n"
@@ -964,6 +966,7 @@
     static const char *vdpau_device_create = "vdp_device_create_x11";
 
     deint = 0;
+    deint_type = 3;
     pullup = 0;
     denoise = 0;
     sharpen = 0;
@@ -971,6 +974,8 @@
         mp_msg(MSGT_VO, MSGL_FATAL, help_msg);
         return -1;
     }
+    if (deint)
+        deint_type = deint;
 
     vdpau_lib_handle = dlopen(vdpaulibrary, RTLD_LAZY);
     if (!vdpau_lib_handle) {
@@ -1017,6 +1022,8 @@
             return VO_TRUE;
         case VOCTRL_SET_DEINTERLACE:
             deint = *(int*)data;
+            if (deint)
+                deint = deint_type;
             return VO_TRUE;
         case VOCTRL_PAUSE:
             return (int_pause = 1);


More information about the MPlayer-dev-eng mailing list