[vlc-commits] d3d11/d3d9: only include va_surface.h when necessary
Steve Lhomme
git at videolan.org
Thu Jun 6 12:09:18 CEST 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Jun 6 11:02:45 2019 +0200| [b60d0a57157482c6a5a37845b9043145e2cbe4e1] | committer: Steve Lhomme
d3d11/d3d9: only include va_surface.h when necessary
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b60d0a57157482c6a5a37845b9043145e2cbe4e1
---
modules/codec/avcodec/d3d11va.c | 2 ++
modules/codec/avcodec/dxva2.c | 2 ++
modules/codec/avcodec/va_surface.c | 1 +
modules/codec/avcodec/va_surface_internal.h | 2 --
modules/hw/d3d11/d3d11_deinterlace.c | 2 ++
modules/hw/d3d11/d3d11_filters.c | 2 ++
modules/hw/d3d11/d3d11_instance.c | 1 +
modules/hw/d3d11/d3d11_surface.c | 2 ++
modules/hw/d3d9/d3d9_filters.c | 2 ++
modules/hw/d3d9/d3d9_instance.c | 2 ++
modules/hw/d3d9/dxa9.c | 2 ++
modules/hw/d3d9/dxva2_deinterlace.c | 2 ++
modules/video_chroma/d3d11_fmt.h | 2 --
modules/video_chroma/d3d9_fmt.h | 2 --
modules/video_output/win32/d3d11_shaders.h | 2 ++
modules/video_output/win32/d3d11_swapchain.c | 2 ++
modules/video_output/win32/direct3d11.c | 2 ++
modules/video_output/win32/direct3d9.c | 2 ++
18 files changed, 28 insertions(+), 6 deletions(-)
diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index 979b2940ab..39e2221eaa 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -50,6 +50,8 @@
#include "../../video_chroma/d3d11_fmt.h"
+#include "va_surface.h"
+
#define D3D_DecoderType ID3D11VideoDecoder
#define D3D_DecoderDevice ID3D11VideoDevice
#define D3D_DecoderSurface ID3D11VideoDecoderOutputView
diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c
index 5f1a85d6c1..6643ddfa88 100644
--- a/modules/codec/avcodec/dxva2.c
+++ b/modules/codec/avcodec/dxva2.c
@@ -37,6 +37,8 @@
#include <libavcodec/dxva2.h>
#include "../../video_chroma/d3d9_fmt.h"
+#include "va_surface.h"
+
#define D3D_DecoderType IDirectXVideoDecoder
#define D3D_DecoderDevice IDirectXVideoDecoderService
#define D3D_DecoderSurface IDirect3DSurface9
diff --git a/modules/codec/avcodec/va_surface.c b/modules/codec/avcodec/va_surface.c
index eb09413dc8..008828d04a 100644
--- a/modules/codec/avcodec/va_surface.c
+++ b/modules/codec/avcodec/va_surface.c
@@ -39,6 +39,7 @@ typedef struct
void *dummy;
} picture_sys_t;
#include "va_surface_internal.h"
+#include "va_surface.h"
#include "avcodec.h"
diff --git a/modules/codec/avcodec/va_surface_internal.h b/modules/codec/avcodec/va_surface_internal.h
index 117128bbed..2b062c27dc 100644
--- a/modules/codec/avcodec/va_surface_internal.h
+++ b/modules/codec/avcodec/va_surface_internal.h
@@ -27,8 +27,6 @@
#ifndef AVCODEC_VA_SURFACE_INTERNAL_H
#define AVCODEC_VA_SURFACE_INTERNAL_H
-#include "va_surface.h"
-
#include <libavcodec/avcodec.h>
#include "va.h"
diff --git a/modules/hw/d3d11/d3d11_deinterlace.c b/modules/hw/d3d11/d3d11_deinterlace.c
index 7309a8fd6e..0312c4bae9 100644
--- a/modules/hw/d3d11/d3d11_deinterlace.c
+++ b/modules/hw/d3d11/d3d11_deinterlace.c
@@ -39,6 +39,8 @@
#include "../../video_chroma/d3d11_fmt.h"
#include "../../video_filter/deinterlace/common.h"
+#include "../../codec/avcodec/va_surface.h"
+
typedef struct
{
d3d11_handle_t hd3d;
diff --git a/modules/hw/d3d11/d3d11_filters.c b/modules/hw/d3d11/d3d11_filters.c
index 845e81d31d..57c349144b 100644
--- a/modules/hw/d3d11/d3d11_filters.c
+++ b/modules/hw/d3d11/d3d11_filters.c
@@ -41,6 +41,8 @@
#include "d3d11_processor.h"
#include "../../video_chroma/d3d11_fmt.h"
+#include "../../codec/avcodec/va_surface.h"
+
#ifdef __MINGW32__
#define D3D11_VIDEO_PROCESSOR_FILTER_CAPS_BRIGHTNESS 0x1
#define D3D11_VIDEO_PROCESSOR_FILTER_CAPS_CONTRAST 0x2
diff --git a/modules/hw/d3d11/d3d11_instance.c b/modules/hw/d3d11/d3d11_instance.c
index 373bd8a0e1..9612062249 100644
--- a/modules/hw/d3d11/d3d11_instance.c
+++ b/modules/hw/d3d11/d3d11_instance.c
@@ -33,6 +33,7 @@
#include <d3d11.h>
#include "d3d11_filters.h"
+#include "../../codec/avcodec/va_surface.h"
static vlc_mutex_t inst_lock = VLC_STATIC_MUTEX;
static d3d11_device_t device = { .context_mutex = INVALID_HANDLE_VALUE };
diff --git a/modules/hw/d3d11/d3d11_surface.c b/modules/hw/d3d11/d3d11_surface.c
index 5b16bbf84a..6db062ef17 100644
--- a/modules/hw/d3d11/d3d11_surface.c
+++ b/modules/hw/d3d11/d3d11_surface.c
@@ -45,6 +45,8 @@
#include "d3d11_processor.h"
#include "../../video_chroma/d3d11_fmt.h"
+#include "../../codec/avcodec/va_surface.h"
+
#ifdef ID3D11VideoContext_VideoProcessorBlt
#define CAN_PROCESSOR 1
#else
diff --git a/modules/hw/d3d9/d3d9_filters.c b/modules/hw/d3d9/d3d9_filters.c
index 2fc363ad9c..5152e53810 100644
--- a/modules/hw/d3d9/d3d9_filters.c
+++ b/modules/hw/d3d9/d3d9_filters.c
@@ -39,6 +39,8 @@
#include <dxva2api.h>
#include "../../video_chroma/d3d9_fmt.h"
+#include "../../codec/avcodec/va_surface.h"
+
#include "d3d9_filters.h"
struct filter_level
diff --git a/modules/hw/d3d9/d3d9_instance.c b/modules/hw/d3d9/d3d9_instance.c
index 81dc704b26..3b63238f9d 100644
--- a/modules/hw/d3d9/d3d9_instance.c
+++ b/modules/hw/d3d9/d3d9_instance.c
@@ -34,6 +34,8 @@
#include "d3d9_filters.h"
+#include "../../codec/avcodec/va_surface.h"
+
static vlc_mutex_t inst_lock = VLC_STATIC_MUTEX;
static d3d9_device_t device = { .dev = NULL };
static size_t instances = 0;
diff --git a/modules/hw/d3d9/dxa9.c b/modules/hw/d3d9/dxa9.c
index 035d96aaee..ada2e3d161 100644
--- a/modules/hw/d3d9/dxa9.c
+++ b/modules/hw/d3d9/dxa9.c
@@ -41,6 +41,8 @@
#include <d3d9.h>
#include "../../video_chroma/d3d9_fmt.h"
+#include "../../codec/avcodec/va_surface.h"
+
typedef struct
{
/* GPU to CPU */
diff --git a/modules/hw/d3d9/dxva2_deinterlace.c b/modules/hw/d3d9/dxva2_deinterlace.c
index 01b9c6f696..95e6bbf97a 100644
--- a/modules/hw/d3d9/dxva2_deinterlace.c
+++ b/modules/hw/d3d9/dxva2_deinterlace.c
@@ -40,6 +40,8 @@
#include "d3d9_filters.h"
+#include "../../codec/avcodec/va_surface.h"
+
typedef struct
{
HINSTANCE hdecoder_dll;
diff --git a/modules/video_chroma/d3d11_fmt.h b/modules/video_chroma/d3d11_fmt.h
index e8a2a78850..fb7c36a39e 100644
--- a/modules/video_chroma/d3d11_fmt.h
+++ b/modules/video_chroma/d3d11_fmt.h
@@ -74,8 +74,6 @@ typedef struct
DXGI_FORMAT formatTexture;
} picture_sys_t;
-#include "../codec/avcodec/va_surface.h"
-
/* index to use for texture/resource that use a known DXGI format
* (ie not DXGI_FORMAT_UNKNWON) */
#define KNOWN_DXGI_INDEX 0
diff --git a/modules/video_chroma/d3d9_fmt.h b/modules/video_chroma/d3d9_fmt.h
index 6b758e0ffa..4e2429349e 100644
--- a/modules/video_chroma/d3d9_fmt.h
+++ b/modules/video_chroma/d3d9_fmt.h
@@ -67,8 +67,6 @@ typedef struct
D3DCAPS9 caps;
} d3d9_device_t;
-#include "../codec/avcodec/va_surface.h"
-
static inline void AcquirePictureSys(picture_sys_t *p_sys)
{
IDirect3DSurface9_AddRef(p_sys->surface);
diff --git a/modules/video_output/win32/d3d11_shaders.h b/modules/video_output/win32/d3d11_shaders.h
index 7caf8ecf33..b7bba5d602 100644
--- a/modules/video_output/win32/d3d11_shaders.h
+++ b/modules/video_output/win32/d3d11_shaders.h
@@ -25,6 +25,8 @@
#include "../../video_chroma/d3d11_fmt.h"
+#include <vlc_es.h>
+
#define DEFAULT_BRIGHTNESS 100
#define DEFAULT_SRGB_BRIGHTNESS 100
#define MAX_HLG_BRIGHTNESS 1000
diff --git a/modules/video_output/win32/d3d11_swapchain.c b/modules/video_output/win32/d3d11_swapchain.c
index f4c8eec607..67d9a381cc 100644
--- a/modules/video_output/win32/d3d11_swapchain.c
+++ b/modules/video_output/win32/d3d11_swapchain.c
@@ -31,6 +31,8 @@
#include <vlc/libvlc_renderer_discoverer.h>
#include <vlc/libvlc_media_player.h>
+#include <assert.h>
+
#if !defined(_WIN32_WINNT) || _WIN32_WINNT < _WIN32_WINNT_WIN7
# undef _WIN32_WINNT
# define _WIN32_WINNT _WIN32_WINNT_WIN7
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index f9cd66eb05..ce73fe2f59 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -51,6 +51,8 @@
# include <windows.ui.xaml.media.dxinterop.h> */
#include "../../video_chroma/d3d11_fmt.h"
+#include "../../codec/avcodec/va_surface.h"
+
#include "d3d11_quad.h"
#include "d3d11_shaders.h"
#include "d3d11_swapchain.h"
diff --git a/modules/video_output/win32/direct3d9.c b/modules/video_output/win32/direct3d9.c
index 1aef90560f..c71476223a 100644
--- a/modules/video_output/win32/direct3d9.c
+++ b/modules/video_output/win32/direct3d9.c
@@ -56,6 +56,8 @@
#endif
#include "../../video_chroma/d3d9_fmt.h"
+#include "../../codec/avcodec/va_surface.h"
+
#include "common.h"
#include "builtin_shaders.h"
#include "../../video_chroma/copy.h"
More information about the vlc-commits
mailing list