[vlc-commits] Revert "direct3d9: fix the black background when the decoder texture is in YUV"

Hugo Beauzée-Luyssen git at videolan.org
Thu Apr 6 16:38:06 CEST 2017


vlc/vlc-2.2 | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Thu Apr  6 10:30:09 2017 +0200| [c592914fa06e6376651875d1e18423a053de32d7] | committer: Hugo Beauzée-Luyssen

Revert "direct3d9: fix the black background when the decoder texture is in YUV"

This reverts commit b34d49b85b8c5332309df1e49ea8bfd72ecaf89b.

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

 modules/codec/avcodec/dxva2.c       | 8 --------
 modules/video_output/msw/direct3d.c | 9 +--------
 2 files changed, 1 insertion(+), 16 deletions(-)

diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c
index e7f10f1..3720319 100644
--- a/modules/codec/avcodec/dxva2.c
+++ b/modules/codec/avcodec/dxva2.c
@@ -836,13 +836,6 @@ static int DxFindVideoServiceConversion(vlc_va_t *va, GUID *input, D3DFORMAT *ou
     return VLC_EGENERIC;
 }
 
-static D3DCOLOR GetFormatBlack(D3DFORMAT format)
-{
-    if (vlc_fourcc_IsYUV(format))
-        return D3DCOLOR_XYUV(0,0x80,0x80);
-    return D3DCOLOR_ARGB(0xFF, 0, 0, 0);
-}
-
 /**
  * It creates a DXVA2 decoder using the given video format
  */
@@ -894,7 +887,6 @@ static int DxCreateVideoDecoder(vlc_va_t *va,
     for (unsigned i = 0; i < sys->surface_count; i++) {
         vlc_va_surface_t *surface = &sys->surface[i];
         surface->d3d = sys->hw_surface[i];
-        IDirect3DDevice9_ColorFill(sys->d3ddev, surface->d3d, NULL, GetFormatBlack(sys->render));
         surface->refcount = 0;
         surface->order = 0;
     }
diff --git a/modules/video_output/msw/direct3d.c b/modules/video_output/msw/direct3d.c
index acb0fa0..67f9921 100644
--- a/modules/video_output/msw/direct3d.c
+++ b/modules/video_output/msw/direct3d.c
@@ -270,13 +270,6 @@ static void Close(vlc_object_t *object)
     free(vd->sys);
 }
 
-static D3DCOLOR GetFormatBlack(D3DFORMAT format)
-{
-    if (vlc_fourcc_IsYUV(format))
-        return D3DCOLOR_XYUV(0,0x80,0x80);
-    return D3DCOLOR_ARGB(0xFF, 0, 0, 0);
-}
-
 /* */
 static picture_pool_t *Pool(vout_display_t *vd, unsigned count)
 {
@@ -989,7 +982,7 @@ static int Direct3DCreatePool(vout_display_t *vd, video_format_t *fmt)
         return VLC_EGENERIC;
     }
     /* fill surface with black color */
-    IDirect3DDevice9_ColorFill(d3ddev, surface, NULL, GetFormatBlack(d3dfmt->format));
+    IDirect3DDevice9_ColorFill(d3ddev, surface, NULL, D3DCOLOR_ARGB(0xFF, 0, 0, 0));
 
     /* Create the associated picture */
     picture_sys_t *picsys = malloc(sizeof(*picsys));



More information about the vlc-commits mailing list