summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohns <johns98@gmx.net>2011-12-29 19:45:00 +0100
committerJohns <johns98@gmx.net>2011-12-29 19:45:00 +0100
commitbded2ae5dfa5e8b79c900699c6b6e87b784b71ed (patch)
tree6e1ece73c90569aea29a1a2b13f7c6eea04d8004
parent1f2d1d235e162b8913f381e426ce40540460485a (diff)
downloadvdr-plugin-softhddevice-bded2ae5dfa5e8b79c900699c6b6e87b784b71ed.tar.gz
vdr-plugin-softhddevice-bded2ae5dfa5e8b79c900699c6b6e87b784b71ed.tar.bz2
Prepared vdpau noise reduction support.
-rw-r--r--ChangeLog4
-rw-r--r--video.c37
2 files changed, 33 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 7927942..70eee1c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/video.c b/video.c
index accab80..b7c80c2 100644
--- a/video.c
+++ b/video.c
@@ -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"),