[vlc-commits] d3d11_quad: allow setting the viewport depending on the output format
Steve Lhomme
git at videolan.org
Mon May 28 13:25:53 CEST 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Jan 15 13:47:14 2018 +0100| [22685469304c3f733ba5d2df631578b6bb18e620] | committer: Steve Lhomme
d3d11_quad: allow setting the viewport depending on the output format
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=22685469304c3f733ba5d2df631578b6bb18e620
---
modules/video_output/win32/d3d11_quad.c | 2 +-
modules/video_output/win32/d3d11_quad.h | 2 +-
modules/video_output/win32/direct3d11.c | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/video_output/win32/d3d11_quad.c b/modules/video_output/win32/d3d11_quad.c
index c8fc4f20bf..6afef274c8 100644
--- a/modules/video_output/win32/d3d11_quad.c
+++ b/modules/video_output/win32/d3d11_quad.c
@@ -804,7 +804,7 @@ error:
return VLC_EGENERIC;
}
-void D3D11_UpdateViewport(d3d_quad_t *quad, const RECT *rect)
+void D3D11_UpdateViewport(d3d_quad_t *quad, const RECT *rect, const d3d_format_t *display)
{
quad->cropViewport[0].TopLeftX = rect->left;
quad->cropViewport[0].TopLeftY = rect->top;
diff --git a/modules/video_output/win32/d3d11_quad.h b/modules/video_output/win32/d3d11_quad.h
index 208173e92b..b8d541cf92 100644
--- a/modules/video_output/win32/d3d11_quad.h
+++ b/modules/video_output/win32/d3d11_quad.h
@@ -82,7 +82,7 @@ bool D3D11_UpdateQuadPosition( vlc_object_t *, d3d11_device_t *, d3d_quad_t *,
const RECT *output, video_orientation_t );
#define D3D11_UpdateQuadPosition(a,b,c,d,e) D3D11_UpdateQuadPosition(VLC_OBJECT(a),b,c,d,e)
-void D3D11_UpdateViewport(d3d_quad_t *, const RECT *);
+void D3D11_UpdateViewport(d3d_quad_t *, const RECT *, const d3d_format_t *display);
void D3D11_UpdateQuadOpacity(vlc_object_t *, d3d11_device_t *, d3d_quad_t *, float opacity);
#define D3D11_UpdateQuadOpacity(a,b,c,d) D3D11_UpdateQuadOpacity(VLC_OBJECT(a),b,c,d)
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 3482a4819b..20e23d0553 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -1346,7 +1346,7 @@ static void UpdatePicQuadPosition(vout_display_t *vd)
{
vout_display_sys_t *sys = vd->sys;
- D3D11_UpdateViewport( &sys->picQuad, &sys->sys.rect_dest_clipped );
+ D3D11_UpdateViewport( &sys->picQuad, &sys->sys.rect_dest_clipped, sys->display.pixelFormat );
SetQuadVSProjection(vd, &sys->picQuad, &vd->cfg->viewpoint);
@@ -1807,7 +1807,7 @@ static int Direct3D11MapSubpicture(vout_display_t *vd, int *subpicture_region_co
spuViewport.right = sys->sys.rect_dest.left + (FLOAT) (r->i_x + r->fmt.i_visible_width) * RECTWidth(sys->sys.rect_dest) / subpicture->i_original_picture_width;
spuViewport.bottom = sys->sys.rect_dest.top + (FLOAT) (r->i_y + r->fmt.i_visible_height) * RECTHeight(sys->sys.rect_dest) / subpicture->i_original_picture_height;
- D3D11_UpdateViewport( quad, &spuViewport );
+ D3D11_UpdateViewport( quad, &spuViewport, sys->display.pixelFormat );
D3D11_UpdateQuadOpacity(vd, &sys->d3d_dev, quad, r->i_alpha / 255.0f );
}
More information about the vlc-commits
mailing list