Hey Andy, the attached patch should fix your issue.
Please test it. Christian. Am Mittwoch, den 17.08.2011, 12:52 +0100 schrieb Andy Furniss: > Maybe this is already known/just not complete yet, but as I've > previously written that r600 -vo vdpau without decode looked OK I ought > to mention it as I've just noticed. > > 1080 height mpeg2 or h264 "internally" is 1088, the bottom 8 lines > should be cropped off, which is what -vo x11/gl/xv/xvmc do. > > vdpau is not doing this, but is scaling 1088 to 1080. > > Depending on the source material this may not be very noticeable, > possibly just extra black at the bottom + scale, which is only really > obvious with vertres test type patterns. Some h264 I've tried do result > in a more irritating distorted green band at the bottom of the picture. > > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>From 04bcb1667c2fa4a52660a462e0d95b5bf990e77e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= <deathsim...@vodafone.de> Date: Sun, 28 Aug 2011 13:52:44 +0200 Subject: [PATCH] st/vdpau: Respect source_rect in VideoMixerRender Fixing a bug reported by Andy Furniss. --- src/gallium/state_trackers/vdpau/mixer.c | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/src/gallium/state_trackers/vdpau/mixer.c b/src/gallium/state_trackers/vdpau/mixer.c index fbd24a2..e74b241 100644 --- a/src/gallium/state_trackers/vdpau/mixer.c +++ b/src/gallium/state_trackers/vdpau/mixer.c @@ -139,6 +139,8 @@ VdpStatus vlVdpVideoMixerRender(VdpVideoMixer mixer, uint32_t layer_count, VdpLayer const *layers) { + struct pipe_video_rect src_rect, *p_src_rect = NULL; + vlVdpVideoMixer *vmixer; vlVdpSurface *surf; vlVdpOutputSurface *dst; @@ -154,9 +156,17 @@ VdpStatus vlVdpVideoMixerRender(VdpVideoMixer mixer, dst = vlGetDataHTAB(destination_surface); if (!dst) return VDP_STATUS_INVALID_HANDLE; + + if (video_source_rect) { + src_rect.x = MIN2(video_source_rect->x1, video_source_rect->x0); + src_rect.y = MIN2(video_source_rect->y1, video_source_rect->y0); + src_rect.w = abs(video_source_rect->x1 - video_source_rect->x0); + src_rect.h = abs(video_source_rect->y1 - video_source_rect->y0); + p_src_rect = &src_rect; + } vl_compositor_clear_layers(&vmixer->compositor); - vl_compositor_set_buffer_layer(&vmixer->compositor, 0, surf->video_buffer, NULL, NULL); + vl_compositor_set_buffer_layer(&vmixer->compositor, 0, surf->video_buffer, p_src_rect, NULL); vl_compositor_render(&vmixer->compositor, dst->surface, NULL, NULL); return VDP_STATUS_OK; -- 1.7.4.1
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev