[vlc-commits] commit: direct3d11: use the crop dimensions from vd->source

Steve Lhomme git at videolan.org
Tue Sep 1 09:23:17 CEST 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Sep  1 09:22:18 2020 +0200| [31b49c06409450e90bd1dce7c3370c23ec8fe175] | committer: Steve Lhomme

commit: direct3d11: use the crop dimensions from vd->source

The cropping information used to come from the vd->fmt but now the core sets
the new values in vd->source.

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

 modules/video_output/win32/direct3d11.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index b6881ecc8b..eb7c926006 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -278,10 +278,10 @@ static void UpdateSize(vout_display_t *vd)
     D3D11_UpdateViewport( &sys->picQuad, &rect_dst, sys->display.pixelFormat );
 
     RECT source_rect = {
-        .left   = vd->fmt.i_x_offset,
-        .right  = vd->fmt.i_x_offset + vd->fmt.i_visible_width,
-        .top    = vd->fmt.i_y_offset,
-        .bottom = vd->fmt.i_y_offset + vd->fmt.i_visible_height,
+        .left   = vd->source.i_x_offset,
+        .right  = vd->source.i_x_offset + vd->source.i_visible_width,
+        .top    = vd->source.i_y_offset,
+        .bottom = vd->source.i_y_offset + vd->source.i_visible_height,
     };
     d3d11_device_lock( sys->d3d_dev );
 
@@ -1076,10 +1076,10 @@ static int Direct3D11CreateFormatResources(vout_display_t *vd, const video_forma
     }
 
     RECT source_rect = {
-        .left   = vd->fmt.i_x_offset,
-        .right  = vd->fmt.i_x_offset + vd->fmt.i_visible_width,
-        .top    = vd->fmt.i_y_offset,
-        .bottom = vd->fmt.i_y_offset + vd->fmt.i_visible_height,
+        .left   = fmt->i_x_offset,
+        .right  = fmt->i_x_offset + fmt->i_visible_width,
+        .top    = fmt->i_y_offset,
+        .bottom = fmt->i_y_offset + fmt->i_visible_height,
     };
     if (!D3D11_UpdateQuadPosition(vd, sys->d3d_dev, &sys->picQuad, &source_rect, vd->source.orientation))
     {



More information about the vlc-commits mailing list