[vlc-commits] direct3d11: do not use the padding size to compute the quad position

Steve Lhomme git at videolan.org
Fri Nov 24 16:28:16 CET 2017


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Fri Nov 24 10:23:37 2017 +0100| [e4e905da5d07d6937133135194c46306cfa0d44a] | committer: Jean-Baptiste Kempf

direct3d11: do not use the padding size to compute the quad position

Fixes #19141

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/video_output/win32/direct3d11.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index f390ed514c..e997c2e091 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -1121,7 +1121,6 @@ static void Prepare(vout_display_t *vd, picture_t *picture, subpicture_t *subpic
                  * display, do it preferrably when creating the texture */
                 assert(p_sys->resourceView[0]!=NULL);
             }
-
             if ( sys->picQuad.i_height != texDesc.Height ||
                  sys->picQuad.i_width != texDesc.Width )
             {
@@ -1546,14 +1545,8 @@ static int Direct3D11Open(vout_display_t *vd, video_format_t *fmt)
 
     sys->picQuad.i_width  = fmt->i_width;
     sys->picQuad.i_height = fmt->i_height;
-    if (is_d3d11_opaque(fmt->i_chroma))
-    {
-        /* worst case scenario we need 128 alignment for HEVC */
-        sys->picQuad.i_width  = (sys->picQuad.i_width  + 0x7F) & ~0x7F;
-        sys->picQuad.i_height = (sys->picQuad.i_height + 0x7F) & ~0x7F;
-    }
-    else if ( sys->picQuadConfig->formatTexture != DXGI_FORMAT_R8G8B8A8_UNORM &&
-              sys->picQuadConfig->formatTexture != DXGI_FORMAT_B5G6R5_UNORM )
+    if ( sys->picQuadConfig->formatTexture != DXGI_FORMAT_R8G8B8A8_UNORM &&
+         sys->picQuadConfig->formatTexture != DXGI_FORMAT_B5G6R5_UNORM )
     {
         sys->picQuad.i_width  = (sys->picQuad.i_width  + 0x01) & ~0x01;
         sys->picQuad.i_height = (sys->picQuad.i_height + 0x01) & ~0x01;



More information about the vlc-commits mailing list