[vlc-devel] [PATCH 4/4] va: remove the WIN32 check on the actual va output

Steve Lhomme robux4 at videolabs.io
Wed May 17 14:49:14 CEST 2017


Now we always output opaque pictures.
---
 modules/codec/avcodec/d3d11va.c |  6 ------
 modules/codec/avcodec/dxva2.c   |  6 ------
 modules/codec/avcodec/va.c      | 13 -------------
 modules/codec/avcodec/va.h      |  4 ----
 4 files changed, 29 deletions(-)

diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index 4d1f859604..80adf632b1 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -153,11 +153,6 @@ static void SetupAVCodecContext(vlc_va_t *);
 static picture_t *DxAllocPicture(vlc_va_t *, const video_format_t *, unsigned index);
 
 /* */
-static void Setup(vlc_va_t *va, vlc_fourcc_t *chroma)
-{
-    *chroma = va->sys->i_chroma;
-}
-
 void SetupAVCodecContext(vlc_va_t *va)
 {
     vlc_va_sys_t *sys = va->sys;
@@ -441,7 +436,6 @@ static int Open(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat pix_fmt,
 
     /* TODO print the hardware name/vendor for debugging purposes */
     va->description = DxDescribe(dx_sys);
-    va->setup   = Setup;
     va->get     = Get;
 #if D3D11_DIRECT_DECODE
     va->release = sys->b_extern_pool ? NULL : directx_va_Release;
diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c
index b289c194f4..facdf06ca6 100644
--- a/modules/codec/avcodec/dxva2.c
+++ b/modules/codec/avcodec/dxva2.c
@@ -153,11 +153,6 @@ static int DxResetVideoDecoder(vlc_va_t *);
 static void SetupAVCodecContext(vlc_va_t *);
 
 /* */
-static void Setup(vlc_va_t *va, vlc_fourcc_t *chroma)
-{
-    *chroma = va->sys->i_chroma;
-}
-
 void SetupAVCodecContext(vlc_va_t *va)
 {
     vlc_va_sys_t *sys = va->sys;
@@ -314,7 +309,6 @@ static int Open(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat pix_fmt,
 
     /* TODO print the hardware name/vendor for debugging purposes */
     va->description = DxDescribe(sys);
-    va->setup   = Setup;
     va->get     = Get;
     va->release = directx_va_Release;
     va->extract = Extract;
diff --git a/modules/codec/avcodec/va.c b/modules/codec/avcodec/va.c
index de10736013..90cf51fce7 100644
--- a/modules/codec/avcodec/va.c
+++ b/modules/codec/avcodec/va.c
@@ -119,19 +119,6 @@ vlc_va_t *vlc_va_New(vlc_object_t *obj, AVCodecContext *avctx,
     if (va->module == NULL)
     {
         vlc_object_release(va);
-#ifdef _WIN32
-        return NULL;
-    }
-
-    vlc_fourcc_t chroma;
-    vlc_fourcc_t expected = vlc_va_GetChroma( pix_fmt, avctx->sw_pix_fmt );
-    va->setup(va, &chroma);
-    if (chroma != expected)
-    {   /* Mismatch, cannot work, fail */
-        msg_Dbg( obj, "chroma mismatch %4.4s expected %4.4s",
-                 (const char*)&chroma, (const char*) &expected );
-        vlc_va_Delete(va, avctx);
-#endif
         va = NULL;
     }
     return va;
diff --git a/modules/codec/avcodec/va.h b/modules/codec/avcodec/va.h
index ec70e389ba..6c082695c7 100644
--- a/modules/codec/avcodec/va.h
+++ b/modules/codec/avcodec/va.h
@@ -36,10 +36,6 @@ struct vlc_va_t {
     module_t *module;
     const char *description;
 
-#ifdef _WIN32
-    VLC_DEPRECATED
-    void (*setup)(vlc_va_t *, vlc_fourcc_t *output);
-#endif
     int  (*get)(vlc_va_t *, picture_t *pic, uint8_t **data);
     void (*release)(void *pic, uint8_t *data);
     int  (*extract)(vlc_va_t *, picture_t *pic, uint8_t *data);
-- 
2.12.1



More information about the vlc-devel mailing list