[vlc-commits] direct3d9: support the NV12 4:2:0 pixel format

Steve Lhomme git at videolan.org
Fri Apr 10 15:03:11 CEST 2015


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Wed Apr  1 10:26:40 2015 +0000| [fce3563d0e433b30c3d003dbe44818baa078ba02] | committer: Jean-Baptiste Kempf

direct3d9: support the NV12 4:2:0 pixel format

best candidate when using DxVA2 decoding, almost guaranteed to be there if DxVA2 is

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

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

 modules/video_output/msw/direct3d9.c |    1 +
 src/misc/fourcc.c                    |    4 ++++
 2 files changed, 5 insertions(+)

diff --git a/modules/video_output/msw/direct3d9.c b/modules/video_output/msw/direct3d9.c
index 56d053b..d38f3a3 100644
--- a/modules/video_output/msw/direct3d9.c
+++ b/modules/video_output/msw/direct3d9.c
@@ -859,6 +859,7 @@ static const d3d_format_t d3d_formats[] = {
     { "YV12",       MAKEFOURCC('Y','V','1','2'),    VLC_CODEC_YV12,  0,0,0 },
     { "YV12",       MAKEFOURCC('Y','V','1','2'),    VLC_CODEC_I420,  0,0,0 },
     { "YV12",       MAKEFOURCC('Y','V','1','2'),    VLC_CODEC_J420,  0,0,0 },
+    { "NV12",       MAKEFOURCC('N','V','1','2'),    VLC_CODEC_NV12,  0,0,0 },
     { "UYVY",       D3DFMT_UYVY,    VLC_CODEC_UYVY,  0,0,0 },
     { "YUY2",       D3DFMT_YUY2,    VLC_CODEC_YUYV,  0,0,0 },
     { "X8R8G8B8",   D3DFMT_X8R8G8B8,VLC_CODEC_RGB32, 0xff0000, 0x00ff00, 0x0000ff },
diff --git a/src/misc/fourcc.c b/src/misc/fourcc.c
index 014f84b..0a08be4 100644
--- a/src/misc/fourcc.c
+++ b/src/misc/fourcc.c
@@ -1821,6 +1821,9 @@ static const vlc_fourcc_t p_J420_fallback[] = {
 static const vlc_fourcc_t p_YV12_fallback[] = {
     VLC_CODEC_YV12, VLC_CODEC_I420, VLC_CODEC_J420, VLC_CODEC_FALLBACK_420, 0
 };
+static const vlc_fourcc_t p_NV12_fallback[] = {
+    VLC_CODEC_NV12, VLC_CODEC_I420, VLC_CODEC_J420, VLC_CODEC_FALLBACK_420, 0
+};
 
 #define VLC_CODEC_FALLBACK_420_16 \
     VLC_CODEC_I420, VLC_CODEC_YV12, VLC_CODEC_J420, VLC_CODEC_FALLBACK_420
@@ -1971,6 +1974,7 @@ static const vlc_fourcc_t *pp_YUV_fallback[] = {
     p_YVYU_fallback,
     p_UYVY_fallback,
     p_VYUY_fallback,
+    p_NV12_fallback,
 
 
     NULL,



More information about the vlc-commits mailing list