[vlc-commits] dxva: remove the video format from the device init

Steve Lhomme git at videolan.org
Wed Jun 26 12:06:27 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Jun 26 11:29:47 2019 +0200| [f4d47b28a5ba9fbbc948d4078154183973024a21] | committer: Steve Lhomme

dxva: remove the video format from the device init

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

 modules/codec/avcodec/d3d11va.c             | 6 +++---
 modules/codec/avcodec/directx_va.c          | 4 ++--
 modules/codec/avcodec/directx_va.h          | 2 +-
 modules/codec/avcodec/dxva2.c               | 6 +++---
 modules/codec/avcodec/va_surface.c          | 4 ++--
 modules/codec/avcodec/va_surface_internal.h | 4 ++--
 6 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index d52fa80da5..91df7bc397 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -127,7 +127,7 @@ struct vlc_va_sys_t
 };
 
 /* */
-static int D3dCreateDevice(vlc_va_t *, const video_format_t *);
+static int D3dCreateDevice(vlc_va_t *);
 static void D3dDestroyDevice(vlc_va_t *);
 
 static int DxCreateVideoService(vlc_va_t *);
@@ -388,7 +388,7 @@ static int Open(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat pix_fmt,
         }
     }
 
-    err = directx_va_Open(va, &fmt->video, &sys->dx_sys);
+    err = directx_va_Open(va, &sys->dx_sys);
     if (err!=VLC_SUCCESS)
         goto error;
 
@@ -422,7 +422,7 @@ error:
 /**
  * It creates a Direct3D device usable for decoding
  */
-static int D3dCreateDevice(vlc_va_t *va, const video_format_t *fmt)
+static int D3dCreateDevice(vlc_va_t *va)
 {
     vlc_va_sys_t *sys = va->sys;
     HRESULT hr;
diff --git a/modules/codec/avcodec/directx_va.c b/modules/codec/avcodec/directx_va.c
index 517632eb96..fd93aeec15 100644
--- a/modules/codec/avcodec/directx_va.c
+++ b/modules/codec/avcodec/directx_va.c
@@ -339,9 +339,9 @@ void directx_va_Close(vlc_va_t *va, directx_sys_t *dx_sys)
     va_pool_Close(va, &dx_sys->va_pool);
 }
 
-int directx_va_Open(vlc_va_t *va, const video_format_t *fmt, directx_sys_t *dx_sys)
+int directx_va_Open(vlc_va_t *va, directx_sys_t *dx_sys)
 {
-    return va_pool_Open(va, fmt, &dx_sys->va_pool);
+    return va_pool_Open(va, &dx_sys->va_pool);
 }
 
 static bool profile_supported(const directx_va_mode_t *mode, const es_format_t *fmt,
diff --git a/modules/codec/avcodec/directx_va.h b/modules/codec/avcodec/directx_va.h
index ede4c02b75..88a6af2e1b 100644
--- a/modules/codec/avcodec/directx_va.h
+++ b/modules/codec/avcodec/directx_va.h
@@ -77,7 +77,7 @@ typedef struct
 
 } directx_sys_t;
 
-int directx_va_Open(vlc_va_t *, const video_format_t *, directx_sys_t *);
+int directx_va_Open(vlc_va_t *, directx_sys_t *);
 void directx_va_Close(vlc_va_t *, directx_sys_t *);
 int directx_va_Setup(vlc_va_t *, directx_sys_t *, const AVCodecContext *avctx, const es_format_t *, int flag_xbox);
 char *directx_va_GetDecoderName(const GUID *guid);
diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c
index 36a5fee439..a3cde68f88 100644
--- a/modules/codec/avcodec/dxva2.c
+++ b/modules/codec/avcodec/dxva2.c
@@ -136,7 +136,7 @@ struct vlc_va_sys_t
 
 
 /* */
-static int D3dCreateDevice(vlc_va_t *, const video_format_t *);
+static int D3dCreateDevice(vlc_va_t *);
 static void D3dDestroyDevice(vlc_va_t *);
 
 static int D3dCreateDeviceManager(vlc_va_t *);
@@ -320,7 +320,7 @@ static int Open(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat pix_fmt,
 
     va->sys = sys;
 
-    err = directx_va_Open(va, &fmt->video, &sys->dx_sys);
+    err = directx_va_Open(va, &sys->dx_sys);
     if (err!=VLC_SUCCESS)
         goto error;
 
@@ -350,7 +350,7 @@ error:
 /**
  * It creates a Direct3D device usable for DXVA 2
  */
-static int D3dCreateDevice(vlc_va_t *va, const video_format_t *fmt)
+static int D3dCreateDevice(vlc_va_t *va)
 {
     vlc_va_sys_t *sys = va->sys;
 
diff --git a/modules/codec/avcodec/va_surface.c b/modules/codec/avcodec/va_surface.c
index 7f96d65ef2..2506296d93 100644
--- a/modules/codec/avcodec/va_surface.c
+++ b/modules/codec/avcodec/va_surface.c
@@ -197,10 +197,10 @@ void va_pool_Close(vlc_va_t *va, va_pool_t *va_pool)
     va_pool->pf_destroy_device(va);
 }
 
-int va_pool_Open(vlc_va_t *va, const video_format_t *fmt, va_pool_t *va_pool)
+int va_pool_Open(vlc_va_t *va, va_pool_t *va_pool)
 {
     /* */
-    if (va_pool->pf_create_device(va, fmt)) {
+    if (va_pool->pf_create_device(va)) {
         msg_Err(va, "Failed to create device");
         goto error;
     }
diff --git a/modules/codec/avcodec/va_surface_internal.h b/modules/codec/avcodec/va_surface_internal.h
index 41360ee0e2..f5e2ab24c0 100644
--- a/modules/codec/avcodec/va_surface_internal.h
+++ b/modules/codec/avcodec/va_surface_internal.h
@@ -43,7 +43,7 @@ typedef struct
 
     struct va_pic_context  *surface[MAX_SURFACE_COUNT];
 
-    int (*pf_create_device)(vlc_va_t *, const video_format_t *);
+    int (*pf_create_device)(vlc_va_t *);
     void (*pf_destroy_device)(vlc_va_t *);
 
     int (*pf_create_device_manager)(vlc_va_t *);
@@ -74,7 +74,7 @@ typedef struct
 
 } va_pool_t;
 
-int va_pool_Open(vlc_va_t *, const video_format_t *, va_pool_t *);
+int va_pool_Open(vlc_va_t *, va_pool_t *);
 void va_pool_Close(vlc_va_t *va, va_pool_t *);
 int va_pool_SetupDecoder(vlc_va_t *, va_pool_t *, const AVCodecContext *, unsigned count, int alignment);
 int va_pool_SetupSurfaces(vlc_va_t *, va_pool_t *, unsigned count);



More information about the vlc-commits mailing list