diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | video.c | 37 |
2 files changed, 33 insertions, 8 deletions
@@ -1,6 +1,8 @@ User johns -Date: +Date: Thu Dec 29 19:44:43 CET 2011 + Release Version 0.1.4 + Prepared vdpau noise reduction support. Vdpau also displays a black surface, when no video is available. Fix bug: CodecVideoDecode destroys avpkt. @@ -3103,6 +3103,7 @@ static int VdpauHqScalingMax; ///< highest supported scaling level static int VdpauTemporal; ///< temporal deinterlacer supported static int VdpauTemporalSpatial; ///< temporal spatial deint. supported static int VdpauInverseTelecine; ///< inverse telecine deint. supported +static int VdpauNoiseReduction; ///< noise reduction supported static int VdpauSkipChroma; ///< skip chroma deint. supported /// display surface ring buffer @@ -3343,8 +3344,8 @@ static void VdpauMixerSetup(VdpauDecoder * decoder) { VdpStatus status; int i; - VdpVideoMixerFeature features[13]; - VdpBool enables[13]; + VdpVideoMixerFeature features[14]; + VdpBool enables[14]; int feature_n; VdpVideoMixerParameter paramaters[10]; void const *values[10]; @@ -3366,8 +3367,9 @@ static void VdpauMixerSetup(VdpauDecoder * decoder) if (VdpauInverseTelecine) { features[feature_n++] = VDP_VIDEO_MIXER_FEATURE_INVERSE_TELECINE; } - // FIXME: - // VDP_VIDEO_MIXER_FEATURE_NOISE_REDUCTION + if (VdpauNoiseReduction) { + features[feature_n++] = VDP_VIDEO_MIXER_FEATURE_NOISE_REDUCTION; + } // VDP_VIDEO_MIXER_FEATURE_SHARPNESS for (i = VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1; i <= VdpauHqScalingMax; ++i) { @@ -3426,6 +3428,12 @@ static void VdpauMixerSetup(VdpauDecoder * decoder) Debug(3, "video/vdpau: inverse telecine %s\n", enables[feature_n - 1] ? "enabled" : "disabled"); } + if (VdpauNoiseReduction) { + enables[feature_n] = VDP_FALSE; + features[feature_n++] = VDP_VIDEO_MIXER_FEATURE_INVERSE_TELECINE; + Debug(3, "video/vdpau: noise reduction %s\n", + enables[feature_n - 1] ? "enabled" : "disabled"); + } for (i = VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1; i <= VdpauHqScalingMax; ++i) { enables[feature_n] = @@ -3439,9 +3447,14 @@ static void VdpauMixerSetup(VdpauDecoder * decoder) enables); /* - FIXME: - VdpVideoMixerSetAttributeValues(decoder->Mixer, attribute_n, - attributes, values); + FIXME: + VDP_VIDEO_MIXER_ATTRIBUTE_NOISE_REDUCTION_LEVEL + VDP_VIDEO_MIXER_ATTRIBUTE_SHARPNESS_LEVEL + VDP_VIDEO_MIXER_ATTRIBUTE_LUMA_KEY_MIN_LUMA + VDP_VIDEO_MIXER_ATTRIBUTE_LUMA_KEY_MAX_LUMA + VDP_VIDEO_MIXER_ATTRIBUTE_SKIP_CHROMA_DEINTERLACE + VdpVideoMixerSetAttributeValues(decoder->Mixer, attribute_n, + attributes, values); */ //VdpColorStandard color_standard; @@ -3864,6 +3877,16 @@ static void VideoVdpauInit(const char *display_name) status = VdpauVideoMixerQueryFeatureSupport(VdpauDevice, + VDP_VIDEO_MIXER_FEATURE_NOISE_REDUCTION, &flag); + if (status != VDP_STATUS_OK) { + Error(_("video/vdpau: can't query feature '%s': %s\n"), + "noise-reduction", VdpauGetErrorString(status)); + } else { + VdpauNoiseReduction = flag; + } + + status = + VdpauVideoMixerQueryFeatureSupport(VdpauDevice, VDP_VIDEO_MIXER_ATTRIBUTE_SKIP_CHROMA_DEINTERLACE, &flag); if (status != VDP_STATUS_OK) { Error(_("video/vdpau: can't query feature '%s': %s\n"), |