From 02c87f0578bcb21a1057ec37dcfa7f2b43960f79 Mon Sep 17 00:00:00 2001 From: cehoyos Date: Mon, 16 Mar 2009 23:03:18 +0000 Subject: Add chroma-deint option to vo vdpau (nochroma-deint speeds up deinterlacing). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28979 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/man/en/mplayer.1 | 5 +++++ libvo/vo_vdpau.c | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1 index 6f866c8c16..ad06109077 100644 --- a/DOCS/man/en/mplayer.1 +++ b/DOCS/man/en/mplayer.1 @@ -3474,6 +3474,11 @@ This is the default if "D" is used to enable deinterlacing. Motion adaptive temporal deinterlacing with edge-guided spatial interpolation (currently only working with software-decoded video). .RE +.IPs chroma\-deint +Makes temporal deinterlacers operate both on luma and chroma (default). +Use nochroma\-deint to solely use luma and speed up advanced deinterlacing. +Useful with slow video memory. +.RE .IPs pullup Try to apply inverse telecine, needs temporal deinterlacing. .RE diff --git a/libvo/vo_vdpau.c b/libvo/vo_vdpau.c index 00a2614fdd..05f2f68ee4 100644 --- a/libvo/vo_vdpau.c +++ b/libvo/vo_vdpau.c @@ -157,6 +157,7 @@ static int deint_counter; static int pullup; static float denoise; static float sharpen; +static int chroma_deint; static int top_field_first; static VdpDecoder decoder; @@ -398,6 +399,9 @@ static int create_vdp_mixer(VdpChromaType vdp_chroma_type) { 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_attrib[] = {VDP_VIDEO_MIXER_ATTRIBUTE_SKIP_CHROMA_DEINTERLACE}; + const uint8_t skip_chroma_value = 1; + const void * const skip_chroma_value_ptr[] = {&skip_chroma_value}; static const VdpVideoMixerParameter parameters[VDP_NUM_MIXER_PARAMETER] = { VDP_VIDEO_MIXER_PARAMETER_VIDEO_SURFACE_WIDTH, VDP_VIDEO_MIXER_PARAMETER_VIDEO_SURFACE_HEIGHT, @@ -433,6 +437,8 @@ static int create_vdp_mixer(VdpChromaType vdp_chroma_type) { 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 (!chroma_deint) + vdp_video_mixer_set_attribute_values(video_mixer, 1, skip_chroma_attrib, skip_chroma_value_ptr); return 0; } @@ -964,6 +970,7 @@ static void uninit(void) static const opt_t subopts[] = { {"deint", OPT_ARG_INT, &deint, (opt_test_f)int_non_neg}, + {"chroma-deint", OPT_ARG_BOOL, &chroma_deint, NULL}, {"pullup", OPT_ARG_BOOL, &pullup, NULL}, {"denoise", OPT_ARG_FLOAT, &denoise, NULL}, {"sharpen", OPT_ARG_FLOAT, &sharpen, NULL}, @@ -980,6 +987,9 @@ static const char help_msg[] = " 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" + " chroma-deint\n" + " Operate on luma and chroma when using temporal deinterlacing (default)\n" + " Use nochroma-deint to speed up temporal deinterlacing\n" " pullup\n" " Try to apply inverse-telecine (needs temporal deinterlacing)\n" " denoise\n" @@ -997,6 +1007,7 @@ static int preinit(const char *arg) deint = 0; deint_type = 3; deint_counter = 0; + chroma_deint = 1; pullup = 0; denoise = 0; sharpen = 0; -- cgit v1.2.3