[vlc-commits] d3d11_quad: fix the viewport for RGB displayed on NV12/P010
Steve Lhomme
git at videolan.org
Mon May 28 13:25:54 CEST 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Jan 15 13:47:55 2018 +0100| [9a8283c3658fd3874530579b50b950d82ebb29a0] | committer: Steve Lhomme
d3d11_quad: fix the viewport for RGB displayed on NV12/P010
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9a8283c3658fd3874530579b50b950d82ebb29a0
---
modules/video_output/win32/d3d11_quad.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/modules/video_output/win32/d3d11_quad.c b/modules/video_output/win32/d3d11_quad.c
index 6afef274c8..1ebc7d633d 100644
--- a/modules/video_output/win32/d3d11_quad.c
+++ b/modules/video_output/win32/d3d11_quad.c
@@ -825,7 +825,15 @@ void D3D11_UpdateViewport(d3d_quad_t *quad, const RECT *rect, const d3d_format_t
case DXGI_FORMAT_B8G8R8X8_UNORM:
case DXGI_FORMAT_B5G6R5_UNORM:
case DXGI_FORMAT_R10G10B10A2_UNORM:
- break; /* packed format */
+ if ( display->formatTexture == DXGI_FORMAT_NV12 ||
+ display->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;
+ }
+ break;
case DXGI_FORMAT_UNKNOWN:
switch ( quad->formatInfo->fourcc )
{
More information about the vlc-commits
mailing list