[vlc-commits] d3d11_quad: handle a different crop target for the second render target in NV12/P010

Steve Lhomme git at videolan.org
Mon May 28 13:25:46 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Jan 10 09:38:17 2018 +0100| [c49a4f6110dbd08e7703d191cdde81a0567db649] | committer: Steve Lhomme

d3d11_quad: handle a different crop target for the second render target in NV12/P010

This is for the UV plane.

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

 modules/video_output/win32/d3d11_quad.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/modules/video_output/win32/d3d11_quad.c b/modules/video_output/win32/d3d11_quad.c
index b4490d5d6a..b908f748cf 100644
--- a/modules/video_output/win32/d3d11_quad.c
+++ b/modules/video_output/win32/d3d11_quad.c
@@ -806,4 +806,13 @@ void D3D11_UpdateViewport(d3d_quad_t *quad, const RECT *rect)
     quad->cropViewport[0].TopLeftY = rect->top;
     quad->cropViewport[0].Width    = rect->right  - rect->left;
     quad->cropViewport[0].Height   = rect->bottom - rect->top;
+
+    if ( quad->formatInfo->formatTexture == DXGI_FORMAT_NV12 ||
+         quad->formatInfo->formatTexture == DXGI_FORMAT_P010 )
+    {
+        quad->cropViewport[1].TopLeftX = rect->left / 2;
+        quad->cropViewport[1].TopLeftY = rect->top / 2;
+        quad->cropViewport[1].Width    = (rect->right  - rect->left) / 2;
+        quad->cropViewport[1].Height   = (rect->bottom - rect->top) / 2;
+    }
 }



More information about the vlc-commits mailing list