[vlc-commits] vdpau: fix video scaling
Rinat Ibragimov
git at videolan.org
Wed Aug 24 13:11:47 CEST 2016
vlc/vlc-2.2 | branch: master | Rinat Ibragimov <ibragimovrinat at mail.ru> | Mon Jun 13 19:53:02 2016 +0300| [0e205d42bae881f4218564f6193dc06ecbb5ee71] | committer: Rémi Denis-Courmont
vdpau: fix video scaling
There is a possible issue in VdpVideoMixerRender [1] call. While
destination_rect is set to dst_rect, which is fine, destination_video_rect
parameter is set to NULL, which makes video keep the size, while it's
expected to fill the entire output rectangle.
Proposed patch sets destination_video_rect to dst_rect, which makes
video scale when player window is resized.
[1] http://http.download.nvidia.com/XFree86/vdpau/doxygen/html/group___vdp_video_mixer.html#ga62bf3bf8c5f01322a03b07065c5ea3db
Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
There has been no clarifications about the intended behaviour of NULL
destination_video_rect in the VDPAU API specification; presumably the
behaviour of the NVIDIA driver is intended. But the VA-GL driver has
had a different behaviour. This patch avoids relying on either by
setting the destination_video_rect explicitly always since it is not
clear what is correct.
(cherry picked from commit 7df48e30dc0f176cb86da361faa1da718593bc29)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=0e205d42bae881f4218564f6193dc06ecbb5ee71
---
modules/hw/vdpau/chroma.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/hw/vdpau/chroma.c b/modules/hw/vdpau/chroma.c
index 00f5ad7..ee89e70 100644
--- a/modules/hw/vdpau/chroma.c
+++ b/modules/hw/vdpau/chroma.c
@@ -660,7 +660,8 @@ static picture_t *Render(filter_t *filter, picture_t *src, bool import)
err = vdp_video_mixer_render(sys->vdp, sys->mixer, VDP_INVALID_HANDLE,
NULL, structure,
MAX_PAST, past, surface, MAX_FUTURE, future,
- &src_rect, output, &dst_rect, NULL, 0, NULL);
+ &src_rect, output, &dst_rect, &dst_rect, 0,
+ NULL);
if (err != VDP_STATUS_OK)
{
msg_Err(filter, "video %s %s failure: %s", "mixer", "rendering",
More information about the vlc-commits
mailing list