diff options
author | Christian König <[email protected]> | 2012-02-13 11:41:23 +0100 |
---|---|---|
committer | Christian König <[email protected]> | 2012-02-14 22:31:29 +0100 |
commit | 553e8203879d163e6fe2f3a8f6b80a44749514c1 (patch) | |
tree | 978284cbd8621e5cacf849d956d0a99c50fd4ca1 /src/gallium/state_trackers/vdpau/mixer.c | |
parent | 356eb0aadbb977b0732da077ad31cd66d1b53e23 (diff) |
vl: fix low strength denoise filter
A filter strength of zero or one doesn't make any
sense. Thanks to Andy Furniss for pointing this out.
Signed-off-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/vdpau/mixer.c')
-rw-r--r-- | src/gallium/state_trackers/vdpau/mixer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/vdpau/mixer.c b/src/gallium/state_trackers/vdpau/mixer.c index 5ce40d619ed..c3c2411eb7e 100644 --- a/src/gallium/state_trackers/vdpau/mixer.c +++ b/src/gallium/state_trackers/vdpau/mixer.c @@ -278,12 +278,12 @@ vlVdpVideoMixerUpdateNoiseReductionFilter(vlVdpVideoMixer *vmixer) } /* and create a new filter as needed */ - if (vmixer->noise_reduction. enabled && vmixer->noise_reduction.level > 0.0f) { + if (vmixer->noise_reduction. enabled && vmixer->noise_reduction.level > 0) { vmixer->noise_reduction.filter = MALLOC(sizeof(struct vl_median_filter)); vl_median_filter_init(vmixer->noise_reduction.filter, vmixer->device->context->pipe, vmixer->video_width, vmixer->video_height, - 9 * vmixer->noise_reduction.level, + vmixer->noise_reduction.level + 1, VL_MEDIAN_FILTER_CROSS); } } @@ -545,7 +545,7 @@ vlVdpVideoMixerSetAttributeValues(VdpVideoMixer mixer, if (val < 0.f || val > 1.f) return VDP_STATUS_INVALID_VALUE; - vmixer->noise_reduction.level = val; + vmixer->noise_reduction.level = val * 10; vlVdpVideoMixerUpdateNoiseReductionFilter(vmixer); break; @@ -658,7 +658,7 @@ vlVdpVideoMixerGetAttributeValues(VdpVideoMixer mixer, break; case VDP_VIDEO_MIXER_ATTRIBUTE_NOISE_REDUCTION_LEVEL: - *(float*)attribute_values[i] = vmixer->noise_reduction.level; + *(float*)attribute_values[i] = (float)vmixer->noise_reduction.level / 10.0f; break; case VDP_VIDEO_MIXER_ATTRIBUTE_LUMA_KEY_MIN_LUMA: |