[vlc-devel] [PATCH] direct3d11: fix green pixels where there's padding

Steve Lhomme robux4 at videolabs.io
Sat May 7 08:53:01 CEST 2016

Because we use linear interpolation when scaling the texture up/down and the
sampler has no idea the texture is ending beofre its boundaries, it may be using
some padding pixels for the interpolation. So we shouldn't allow padding on the
inside of the vout.

This won't affect the direct rendering pool usage as there's no padding in
Replaces the ugly memset patch https://patches.videolan.org/patch/13194/
It also fixes the I420 green lines even though the interpolation still means
we are using slightly incorrect V values.
 modules/video_output/win32/direct3d11.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 3d674fd..84f20bb 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -1063,6 +1063,9 @@ static int Direct3D11Open(vout_display_t *vd, video_format_t *fmt)
        return VLC_EGENERIC;
+    fmt->i_height = fmt->i_visible_height;
+    fmt->i_width  = fmt->i_visible_width;
     /* check the region pixel format */
     i_quadSupportFlags |= D3D11_FORMAT_SUPPORT_BLENDABLE;
     if( SUCCEEDED( ID3D11Device_CheckFormatSupport(sys->d3ddevice,

More information about the vlc-devel mailing list