diff options
author | Christian König <[email protected]> | 2016-08-26 09:56:18 +0200 |
---|---|---|
committer | Christian König <[email protected]> | 2016-08-29 11:23:51 +0200 |
commit | 77e4424106290208ebf33eb021766c50741c55e0 (patch) | |
tree | 90cea6dffe799a4baec01151b8b7575a33a35f38 | |
parent | 9c9f45b82410646d2f7a8576d03de9916118bf07 (diff) |
st/vdpau: Revert "change the order in which filters are applied(v3)"
This reverts commit 09dff7ae2e179d5a3490481762c6bd3d50430c9f.
Turned out this can cause some artifacts in the output. Let's revert
it for now until we have sorted out all issues.
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Nayan Deshmukh <[email protected]>
-rw-r--r-- | src/gallium/state_trackers/vdpau/mixer.c | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/src/gallium/state_trackers/vdpau/mixer.c b/src/gallium/state_trackers/vdpau/mixer.c index 56b667d320d..cb0ef039722 100644 --- a/src/gallium/state_trackers/vdpau/mixer.c +++ b/src/gallium/state_trackers/vdpau/mixer.c @@ -240,8 +240,8 @@ VdpStatus vlVdpVideoMixerRender(VdpVideoMixer mixer, struct u_rect rect, clip, *prect, dirty_area; unsigned i, layer = 0; struct pipe_video_buffer *video_buffer; - struct pipe_sampler_view *sampler_view, **sampler_views; - struct pipe_surface *surface, **surfaces; + struct pipe_sampler_view *sampler_view; + struct pipe_surface *surface; vlVdpVideoMixer *vmixer; vlVdpSurface *surf; @@ -325,22 +325,6 @@ VdpStatus vlVdpVideoMixerRender(VdpVideoMixer mixer, } } - surfaces = video_buffer->get_surfaces(video_buffer); - sampler_views = video_buffer->get_sampler_view_planes(video_buffer); - - for(i = 0; i < VL_MAX_SURFACES; ++i) { - if(sampler_views[i] != NULL && surfaces[i] != NULL) { - if (vmixer->noise_reduction.filter) - vl_median_filter_render(vmixer->noise_reduction.filter, - sampler_views[i], surfaces[i]); - - if (vmixer->sharpness.filter) - vl_matrix_filter_render(vmixer->sharpness.filter, - sampler_views[i], surfaces[i]); - - } - } - prect = RectToPipe(video_source_rect, &rect); if (!prect) { rect.x0 = 0; @@ -410,6 +394,14 @@ VdpStatus vlVdpVideoMixerRender(VdpVideoMixer mixer, else { vl_compositor_render(&vmixer->cstate, compositor, surface, &dirty_area, true); + if (vmixer->noise_reduction.filter) + vl_median_filter_render(vmixer->noise_reduction.filter, + sampler_view, surface); + + if (vmixer->sharpness.filter) + vl_matrix_filter_render(vmixer->sharpness.filter, + sampler_view, surface); + if (vmixer->bicubic.filter) vl_bicubic_filter_render(vmixer->bicubic.filter, sampler_view, dst->surface, |