[vlc-devel] [PATCH 4/5] dxgi_fmt: we can't handle I420 live NV12 in the shader

Steve Lhomme robux4 at videolabs.io
Thu May 5 11:54:21 CEST 2016


Pixel interpolation in the sampler has no idea it's dealing with 3 planes and
mixes wrong pixel data together.

This will result in a filter being introduced to turn I420 to NV12 or RGB.
---
 modules/video_chroma/dxgi_fmt.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/video_chroma/dxgi_fmt.c b/modules/video_chroma/dxgi_fmt.c
index 9772652..7f3fd53 100644
--- a/modules/video_chroma/dxgi_fmt.c
+++ b/modules/video_chroma/dxgi_fmt.c
@@ -57,8 +57,10 @@ static const dxgi_format_t dxgi_formats[] = {
 };
 
 static const d3d_format_t d3d_formats[] = {
+#if 0 /* pixel interpolation when resizing will be wrong because the sampler expects 2 planes */
     { "I420",     DXGI_FORMAT_NV12,           VLC_CODEC_I420,     DXGI_FORMAT_R8_UNORM,           DXGI_FORMAT_R8G8_UNORM },
     { "YV12",     DXGI_FORMAT_NV12,           VLC_CODEC_YV12,     DXGI_FORMAT_R8_UNORM,           DXGI_FORMAT_R8G8_UNORM },
+#endif
     { "NV12",     DXGI_FORMAT_NV12,           VLC_CODEC_NV12,     DXGI_FORMAT_R8_UNORM,           DXGI_FORMAT_R8G8_UNORM },
     { "VA_NV12",  DXGI_FORMAT_NV12,           VLC_CODEC_D3D11_OPAQUE, DXGI_FORMAT_R8_UNORM,       DXGI_FORMAT_R8G8_UNORM },
 #ifdef BROKEN_PIXEL
-- 
2.7.0



More information about the vlc-devel mailing list