[vlc-commits] d3d9_fmt and d3d11_fmt: inline ActivePictureSys()
Zhao Zhili
git at videolan.org
Thu Jul 12 09:17:15 CEST 2018
vlc | branch: master | Zhao Zhili <quinkblack at foxmail.com> | Thu Jul 12 11:36:41 2018 +0800| [a3d8e30b56561a23fceb400f2b22b00aa7ca8560] | committer: Steve Lhomme
d3d9_fmt and d3d11_fmt: inline ActivePictureSys()
Fix static build.
Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a3d8e30b56561a23fceb400f2b22b00aa7ca8560
---
modules/video_chroma/d3d11_fmt.c | 6 ------
modules/video_chroma/d3d11_fmt.h | 6 +++++-
modules/video_chroma/d3d9_fmt.c | 6 ------
modules/video_chroma/d3d9_fmt.h | 6 +++++-
4 files changed, 10 insertions(+), 14 deletions(-)
diff --git a/modules/video_chroma/d3d11_fmt.c b/modules/video_chroma/d3d11_fmt.c
index a8543b0f57..0057387f86 100644
--- a/modules/video_chroma/d3d11_fmt.c
+++ b/modules/video_chroma/d3d11_fmt.c
@@ -39,12 +39,6 @@
#include "../codec/avcodec/va_surface.h"
-picture_sys_t *ActivePictureSys(picture_t *p_pic)
-{
- struct va_pic_context *pic_ctx = (struct va_pic_context*)p_pic->context;
- return pic_ctx ? &pic_ctx->picsys : p_pic->p_sys;
-}
-
void AcquirePictureSys(picture_sys_t *p_sys)
{
for (int i=0; i<D3D11_MAX_SHADER_VIEW; i++) {
diff --git a/modules/video_chroma/d3d11_fmt.h b/modules/video_chroma/d3d11_fmt.h
index 1124010807..f1ad455557 100644
--- a/modules/video_chroma/d3d11_fmt.h
+++ b/modules/video_chroma/d3d11_fmt.h
@@ -76,7 +76,11 @@ typedef struct
#include "../codec/avcodec/va_surface.h"
-picture_sys_t *ActivePictureSys(picture_t *p_pic);
+static inline picture_sys_t *ActivePictureSys(picture_t *p_pic)
+{
+ struct va_pic_context *pic_ctx = (struct va_pic_context*)p_pic->context;
+ return pic_ctx ? &pic_ctx->picsys : p_pic->p_sys;
+}
/* index to use for texture/resource that use a known DXGI format
* (ie not DXGI_FORMAT_UNKNWON) */
diff --git a/modules/video_chroma/d3d9_fmt.c b/modules/video_chroma/d3d9_fmt.c
index 6b67f0c2ac..f42a1c8dc0 100644
--- a/modules/video_chroma/d3d9_fmt.c
+++ b/modules/video_chroma/d3d9_fmt.c
@@ -29,12 +29,6 @@
#include "../codec/avcodec/va_surface.h"
-picture_sys_t *ActivePictureSys(picture_t *p_pic)
-{
- struct va_pic_context *pic_ctx = (struct va_pic_context*)p_pic->context;
- return pic_ctx ? &pic_ctx->picsys : p_pic->p_sys;
-}
-
#undef D3D9_CreateDevice
HRESULT D3D9_CreateDevice(vlc_object_t *o, d3d9_handle_t *hd3d, HWND hwnd,
const video_format_t *source, d3d9_device_t *out)
diff --git a/modules/video_chroma/d3d9_fmt.h b/modules/video_chroma/d3d9_fmt.h
index 9db5659abf..1e065f83c3 100644
--- a/modules/video_chroma/d3d9_fmt.h
+++ b/modules/video_chroma/d3d9_fmt.h
@@ -69,7 +69,11 @@ typedef struct
#include "../codec/avcodec/va_surface.h"
-picture_sys_t *ActivePictureSys(picture_t *p_pic);
+static inline picture_sys_t *ActivePictureSys(picture_t *p_pic)
+{
+ struct va_pic_context *pic_ctx = (struct va_pic_context*)p_pic->context;
+ return pic_ctx ? &pic_ctx->picsys : p_pic->p_sys;
+}
static inline void AcquirePictureSys(picture_sys_t *p_sys)
{
More information about the vlc-commits
mailing list