[vlc-commits] direct3d11: bring back the 128 pixels padding required by the DXVA HEVC decoder

Steve Lhomme git at videolan.org
Sun Dec 17 23:36:40 CET 2017


vlc/vlc-3.0 | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Thu Dec 14 14:40:56 2017 +0100| [aa85b0527978e74a2d35c4982ac959e081ddcf7d] | committer: Jean-Baptiste Kempf

direct3d11: bring back the 128 pixels padding required by the DXVA HEVC decoder

Since the vout doesn't know in advance what alignment the decoder will need we use
the maximum.

This is needed in light of the previous bug fixed where the decoder accepts
texture with the wrong alignment but uses them as if the alignment was correct.
So we always need to make sure the alignment is correct.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit e669140daaec8b4bc262013afd111864fbbf9a18)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/video_output/win32/direct3d11.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 2eeafc4899..c0cad8d612 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -2036,6 +2036,12 @@ static int Direct3D11CreateFormatResources(vout_display_t *vd, const video_forma
 
     sys->picQuad.i_width  = fmt->i_width;
     sys->picQuad.i_height = fmt->i_height;
+    if (is_d3d11_opaque(fmt->i_chroma))
+    {
+        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 )
     {



More information about the vlc-commits mailing list