[MPlayer-dev-eng] [PATCH]Allow vo vdpau to use SKIP_CHROMA_DEINT

Carl Eugen Hoyos cehoyos at rainbow.studorg.tuwien.ac.at
Sun Mar 15 23:14:12 CET 2009


Hi!

Attached patch allows the user to limit temporal deinterlacing for vdpau 
to luma. This speeds the deinterlacing process up by a minimal amount.

Please comment, Carl Eugen
-------------- next part --------------
Index: libvo/vo_vdpau.c
===================================================================
--- libvo/vo_vdpau.c	(revision 28970)
+++ libvo/vo_vdpau.c	(working copy)
@@ -157,6 +157,7 @@
 static int                                pullup;
 static float                              denoise;
 static float                              sharpen;
+static int                                skip_chroma_deint;
 static int                                top_field_first;
 
 static VdpDecoder                         decoder;
@@ -398,6 +399,8 @@
     const void * const denoise_value[] = {&denoise};
     static const VdpVideoMixerAttribute sharpen_attrib[] = {VDP_VIDEO_MIXER_ATTRIBUTE_SHARPNESS_LEVEL};
     const void * const sharpen_value[] = {&sharpen};
+    static const VdpVideoMixerAttribute skip_chroma_deint_attrib[] = {VDP_VIDEO_MIXER_ATTRIBUTE_SKIP_CHROMA_DEINTERLACE};
+    const void * const skip_chroma_deint_value[] = {&skip_chroma_deint};
     static const VdpVideoMixerParameter parameters[VDP_NUM_MIXER_PARAMETER] = {
         VDP_VIDEO_MIXER_PARAMETER_VIDEO_SURFACE_WIDTH,
         VDP_VIDEO_MIXER_PARAMETER_VIDEO_SURFACE_HEIGHT,
@@ -433,6 +436,8 @@
         vdp_video_mixer_set_attribute_values(video_mixer, 1, denoise_attrib, denoise_value);
     if (sharpen)
         vdp_video_mixer_set_attribute_values(video_mixer, 1, sharpen_attrib, sharpen_value);
+    if (skip_chroma_deint)
+        vdp_video_mixer_set_attribute_values(video_mixer, 1, skip_chroma_deint_attrib, skip_chroma_deint_value);
 
     return 0;
 }
@@ -964,6 +969,7 @@
 
 static const opt_t subopts[] = {
     {"deint",   OPT_ARG_INT,   &deint,   (opt_test_f)int_non_neg},
+    {"skip-chroma", OPT_ARG_BOOL,  &skip_chroma_deint,  NULL},
     {"pullup",  OPT_ARG_BOOL,  &pullup,  NULL},
     {"denoise", OPT_ARG_FLOAT, &denoise, NULL},
     {"sharpen", OPT_ARG_FLOAT, &sharpen, NULL},
@@ -980,6 +986,8 @@
     "    2: bob deinterlacing (current fallback for hardware decoding)\n"
     "    3: temporal deinterlacing (only works with software codecs)\n"
     "    4: temporal-spatial deinterlacing (only works with software codecs)\n"
+    "  skip-chroma\n"
+    "    Operate solely on luma when using temporal deinterlacing\n"
     "  pullup\n"
     "    Try to apply inverse-telecine (needs temporal deinterlacing)\n"
     "  denoise\n"
@@ -1006,6 +1014,8 @@
     }
     if (deint)
         deint_type = deint;
+    if (skip_chroma_deint)
+        skip_chroma_deint = 1;
 
     vdpau_lib_handle = dlopen(vdpaulibrary, RTLD_LAZY);
     if (!vdpau_lib_handle) {
Index: DOCS/man/en/mplayer.1
===================================================================
--- DOCS/man/en/mplayer.1	(revision 28968)
+++ DOCS/man/en/mplayer.1	(working copy)
@@ -3474,6 +3474,10 @@
 Motion adaptive temporal deinterlacing with edge-guided spatial interpolation
 (currently only working with software-decoded video).
 .RE
+.IPs skip-chroma-deint
+Makes temporal deinterlacers operate solely on luma, speeding them up.
+Useful with slow video memory.
+.RE
 .IPs pullup
 Try to apply inverse telecine, needs temporal deinterlacing.
 .RE


More information about the MPlayer-dev-eng mailing list