[vlc-devel] [PATCH 5/6] direct3d11: bring patch the 128 pixels padding required by the DXVA HEVC decoder
Steve Lhomme
robux4 at videolabs.io
Wed Dec 13 17:17:22 CET 2017
Since we don'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.
---
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 34827d7442..3bc9d24fe5 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -2033,6 +2033,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 )
{
--
2.14.2
More information about the vlc-devel
mailing list