[vlc-commits] hw:d3d9:dxa9: swap UV planes when converting I420 to NV12 in direct3d9
Steve Lhomme
git at videolan.org
Fri Jan 19 11:55:20 CET 2018
vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Jan 18 14:31:41 2018 +0100| [1c3bd80cf3a42d4c5cbd77e70c3fcdca203ed22c] | committer: Jean-Baptiste Kempf
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
(cherry picked from commit 7f81a32fcdc24b90bdf9bf8cefabbdd2df149919)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=1c3bd80cf3a42d4c5cbd77e70c3fcdca203ed22c
---
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 3f564e871a..bbff337dbf 100644
--- a/modules/hw/d3d9/dxa9.c
+++ b/modules/hw/d3d9/dxa9.c
@@ -257,7 +257,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