[vlc-commits] hw:d3d9:dxa9: swap UV planes when converting I420 to NV12 in direct3d9

Steve Lhomme git at videolan.org
Thu Jan 18 14:33:28 CET 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Jan 18 14:31:41 2018 +0100| [7f81a32fcdc24b90bdf9bf8cefabbdd2df149919] | committer: Steve Lhomme

hw:d3d9:dxa9: swap UV planes when converting I420 to NV12 in direct3d9

Same thing we do when converting NV12 to I420 in the same file.

Fixes #19482

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

 modules/hw/d3d9/dxa9.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/hw/d3d9/dxa9.c b/modules/hw/d3d9/dxa9.c
index 64b87db093..7ebed928e7 100644
--- a/modules/hw/d3d9/dxa9.c
+++ b/modules/hw/d3d9/dxa9.c
@@ -251,7 +251,12 @@ static void YV12_D3D9(filter_t *p_filter, picture_t *src, picture_t *dst)
     picture_UpdatePlanes(sys->staging, d3drect.pBits, d3drect.Pitch);
 
     picture_Hold( src );
+
+    if (src->format.i_chroma == VLC_CODEC_I420)
+        plane_SwapUV( src->p );
     sys->filter->pf_video_filter(sys->filter, src);
+    if (src->format.i_chroma == VLC_CODEC_I420)
+        plane_SwapUV( src->p );
 
     IDirect3DSurface9_UnlockRect(sys->staging->p_sys->surface);
 



More information about the vlc-commits mailing list