[vlc-commits] hw:d3d11: deinterlace: adjust the deinterlaced area if there is an offset

Steve Lhomme git at videolan.org
Mon Feb 5 19:21:12 CET 2018


vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Feb  5 15:10:00 2018 +0100| [b1b69cf24a7882d3c1789cfe85f0eef4154e956d] | committer: Jean-Baptiste Kempf

hw:d3d11: deinterlace: adjust the deinterlaced area if there is an offset

(cherry picked from commit 10db447e00201dc557998aa2d73e4aabaa1f1332)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/hw/d3d11/d3d11_deinterlace.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/hw/d3d11/d3d11_deinterlace.c b/modules/hw/d3d11/d3d11_deinterlace.c
index b52f76072c..91d26cf912 100644
--- a/modules/hw/d3d11/d3d11_deinterlace.c
+++ b/modules/hw/d3d11/d3d11_deinterlace.c
@@ -185,10 +185,10 @@ static int RenderPic( filter_t *p_filter, picture_t *p_outpic, picture_t *p_pic,
     }
 
     RECT srcRect;
-    srcRect.left = 0;
-    srcRect.top = 0;
-    srcRect.right  = p_pic->format.i_visible_width;
-    srcRect.bottom = p_pic->format.i_visible_height;
+    srcRect.left   = p_pic->format.i_x_offset;
+    srcRect.top    = p_pic->format.i_y_offset;
+    srcRect.right  = srcRect.left + p_pic->format.i_visible_width;
+    srcRect.bottom = srcRect.top  + 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,



More information about the vlc-commits mailing list