[vlc-commits] d3d11_deinterlace: set the source and destination rectangle

Steve Lhomme git at videolan.org
Tue Oct 31 16:43:34 CET 2017


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Tue Oct 31 14:10:53 2017 +0100| [6ffc98f63e8fa9fa03a93ca04027c43464630393] | committer: Jean-Baptiste Kempf

d3d11_deinterlace: set the source and destination rectangle

This way it doesn't try to use extra parts of the texture for interlacing.

Fixes #18775 and possibly #18928

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6ffc98f63e8fa9fa03a93ca04027c43464630393
---

 modules/video_output/win32/d3d11_deinterlace.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/modules/video_output/win32/d3d11_deinterlace.c b/modules/video_output/win32/d3d11_deinterlace.c
index 694ce596c8..438c4b836e 100644
--- a/modules/video_output/win32/d3d11_deinterlace.c
+++ b/modules/video_output/win32/d3d11_deinterlace.c
@@ -183,6 +183,16 @@ static int RenderPic( filter_t *p_filter, picture_t *p_outpic, picture_t *p_pic,
         stream.pInputSurface = p_sys_src->processorInput;
     }
 
+    RECT srcRect;
+    srcRect.left = 0;
+    srcRect.top = 0;
+    srcRect.right  = p_pic->format.i_visible_width;
+    srcRect.bottom = p_pic->format.i_visible_height;
+    ID3D11VideoContext_VideoProcessorSetStreamSourceRect(p_sys->d3dvidctx, p_sys->videoProcessor,
+                                                         0, TRUE, &srcRect);
+    ID3D11VideoContext_VideoProcessorSetStreamDestRect(p_sys->d3dvidctx, p_sys->videoProcessor,
+                                                         0, TRUE, &srcRect);
+
     hr = ID3D11VideoContext_VideoProcessorBlt(p_sys->d3dvidctx, p_sys->videoProcessor,
                                               p_sys->processorOutput,
                                               0, 1, &stream);



More information about the vlc-commits mailing list