[vlc-commits] direct3d11: rename picture_sys_t to picture_sys_d3d11_t
Steve Lhomme
git at videolan.org
Thu Jun 6 12:09:24 CEST 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Jun 6 11:15:49 2019 +0200| [d3c7378618ac6e8a50c2e4a77a5c04d177aab319] | committer: Steve Lhomme
direct3d11: rename picture_sys_t to picture_sys_d3d11_t
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d3c7378618ac6e8a50c2e4a77a5c04d177aab319
---
modules/codec/avcodec/d3d11va.c | 14 +++++++-------
modules/hw/d3d11/d3d11_deinterlace.c | 14 +++++++-------
modules/hw/d3d11/d3d11_filters.c | 6 +++---
modules/hw/d3d11/d3d11_instance.c | 4 ++--
modules/hw/d3d11/d3d11_processor.c | 2 +-
modules/hw/d3d11/d3d11_processor.h | 2 +-
modules/hw/d3d11/d3d11_surface.c | 20 ++++++++++----------
modules/video_chroma/d3d11_fmt.c | 6 +++---
modules/video_chroma/d3d11_fmt.h | 6 +++---
modules/video_output/vmem.c | 2 +-
modules/video_output/win32/d3d11_shaders.h | 2 +-
modules/video_output/win32/direct3d11.c | 16 ++++++++--------
12 files changed, 47 insertions(+), 47 deletions(-)
diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index b4e8a4b39e..b08dd363f5 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -50,7 +50,7 @@
#include "../../video_chroma/d3d11_fmt.h"
-typedef picture_sys_t VA_PICSYS;
+typedef picture_sys_d3d11_t VA_PICSYS;
#include "va_surface.h"
#define D3D_DecoderType ID3D11VideoDecoder
@@ -59,7 +59,7 @@ typedef picture_sys_t VA_PICSYS;
#include "directx_va.h"
static int Open(vlc_va_t *, AVCodecContext *, enum PixelFormat,
- const es_format_t *, picture_sys_t *p_sys);
+ const es_format_t *, picture_sys_d3d11_t *p_sys);
static void Close(vlc_va_t *, void **);
vlc_module_begin()
@@ -251,11 +251,11 @@ static struct va_pic_context* NewSurfacePicContext(vlc_va_t *va, int surface_ind
static int Get(vlc_va_t *va, picture_t *pic, uint8_t **data)
{
- picture_sys_t *p_sys = pic->p_sys;
+ picture_sys_d3d11_t *p_sys = pic->p_sys;
#if D3D11_DIRECT_DECODE
if (va->sys->dx_sys.can_extern_pool)
{
- /* copy the original picture_sys_t in the va_pic_context */
+ /* copy the original picture_sys_d3d11_t in the va_pic_context */
if (!pic->context)
{
assert(p_sys!=NULL);
@@ -311,7 +311,7 @@ static void Close(vlc_va_t *va, void **ctx)
}
static int Open(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat pix_fmt,
- const es_format_t *fmt, picture_sys_t *p_sys)
+ const es_format_t *fmt, picture_sys_d3d11_t *p_sys)
{
int err = VLC_EGENERIC;
directx_sys_t *dx_sys;
@@ -786,7 +786,7 @@ static int DxCreateDecoderSurfaces(vlc_va_t *va, int codec_id,
}
D3D11_TEXTURE2D_DESC texDesc;
- picture_sys_t * p_sys = pic->p_sys;
+ picture_sys_d3d11_t * p_sys = pic->p_sys;
ID3D11Texture2D_GetDesc(p_sys->texture[KNOWN_DXGI_INDEX], &texDesc);
assert(texDesc.Format == sys->render);
assert(texDesc.BindFlags & D3D11_BIND_DECODER);
@@ -828,7 +828,7 @@ static int DxCreateDecoderSurfaces(vlc_va_t *va, int codec_id,
}
if (sys->extern_pics[i])
{
- picture_sys_t *p_sys = sys->extern_pics[i]->p_sys;
+ picture_sys_d3d11_t *p_sys = sys->extern_pics[i]->p_sys;
p_sys->decoder = NULL;
picture_Release(sys->extern_pics[i]);
sys->extern_pics[i] = NULL;
diff --git a/modules/hw/d3d11/d3d11_deinterlace.c b/modules/hw/d3d11/d3d11_deinterlace.c
index 4e7eb14a4e..f27a7b355c 100644
--- a/modules/hw/d3d11/d3d11_deinterlace.c
+++ b/modules/hw/d3d11/d3d11_deinterlace.c
@@ -39,7 +39,7 @@
#include "../../video_chroma/d3d11_fmt.h"
#include "../../video_filter/deinterlace/common.h"
-typedef picture_sys_t VA_PICSYS;
+typedef picture_sys_d3d11_t VA_PICSYS;
#include "../../codec/avcodec/va_surface.h"
typedef struct
@@ -88,7 +88,7 @@ static int RenderPic( filter_t *p_filter, picture_t *p_outpic, picture_t *p_pic,
VLC_UNUSED(order);
HRESULT hr;
filter_sys_t *p_sys = p_filter->p_sys;
- picture_sys_t *p_out_sys = p_outpic->p_sys;
+ picture_sys_d3d11_t *p_out_sys = p_outpic->p_sys;
picture_t *p_prev = p_sys->context.pp_history[0];
picture_t *p_cur = p_sys->context.pp_history[1];
@@ -108,17 +108,17 @@ static int RenderPic( filter_t *p_filter, picture_t *p_outpic, picture_t *p_pic,
if( p_cur && p_next )
{
- picture_sys_t *picsys_next = ActivePictureSys(p_next);
+ picture_sys_d3d11_t *picsys_next = ActivePictureSys(p_next);
if ( unlikely(!picsys_next) || FAILED(D3D11_Assert_ProcessorInput(p_filter, &p_sys->d3d_proc, picsys_next) ))
return VLC_EGENERIC;
- picture_sys_t *picsys_cur = ActivePictureSys(p_cur);
+ picture_sys_d3d11_t *picsys_cur = ActivePictureSys(p_cur);
if ( unlikely(!picsys_cur) || FAILED( D3D11_Assert_ProcessorInput(p_filter, &p_sys->d3d_proc, picsys_cur) ))
return VLC_EGENERIC;
if ( p_prev )
{
- picture_sys_t *picsys_prev = ActivePictureSys(p_prev);
+ picture_sys_d3d11_t *picsys_prev = ActivePictureSys(p_prev);
if ( unlikely(!picsys_prev) || FAILED( D3D11_Assert_ProcessorInput(p_filter, &p_sys->d3d_proc, picsys_prev) ))
return VLC_EGENERIC;
@@ -139,7 +139,7 @@ static int RenderPic( filter_t *p_filter, picture_t *p_outpic, picture_t *p_pic,
}
else
{
- picture_sys_t *p_sys_src = ActivePictureSys(p_pic);
+ picture_sys_d3d11_t *p_sys_src = ActivePictureSys(p_pic);
if ( unlikely(!p_sys_src) || FAILED( D3D11_Assert_ProcessorInput(p_filter, &p_sys->d3d_proc, p_sys_src) ))
return VLC_EGENERIC;
@@ -235,7 +235,7 @@ picture_t *AllocPicture( filter_t *p_filter )
{
filter_sys_t *p_sys = p_filter->p_sys;
picture_t *pic = filter_NewPicture( p_filter );
- picture_sys_t *pic_sys = pic->p_sys;
+ picture_sys_d3d11_t *pic_sys = pic->p_sys;
if ( !pic->context )
{
bool b_local_texture = false;
diff --git a/modules/hw/d3d11/d3d11_filters.c b/modules/hw/d3d11/d3d11_filters.c
index e35cf7cfb0..1a23d072da 100644
--- a/modules/hw/d3d11/d3d11_filters.c
+++ b/modules/hw/d3d11/d3d11_filters.c
@@ -41,7 +41,7 @@
#include "d3d11_processor.h"
#include "../../video_chroma/d3d11_fmt.h"
-typedef picture_sys_t VA_PICSYS;
+typedef picture_sys_d3d11_t VA_PICSYS;
#include "../../codec/avcodec/va_surface.h"
#ifdef __MINGW32__
@@ -196,7 +196,7 @@ static picture_t *Filter(filter_t *p_filter, picture_t *p_pic)
{
filter_sys_t *p_sys = p_filter->p_sys;
- picture_sys_t *p_src_sys = ActivePictureSys(p_pic);
+ picture_sys_d3d11_t *p_src_sys = ActivePictureSys(p_pic);
if (FAILED( D3D11_Assert_ProcessorInput(p_filter, &p_sys->d3d_proc, p_src_sys) ))
{
picture_Release( p_pic );
@@ -209,7 +209,7 @@ static picture_t *Filter(filter_t *p_filter, picture_t *p_pic)
picture_Release( p_pic );
return NULL;
}
- picture_sys_t *p_out_sys = p_outpic->p_sys;
+ picture_sys_d3d11_t *p_out_sys = p_outpic->p_sys;
if (unlikely(!p_out_sys))
{
/* the output filter configuration may have changed since the filter
diff --git a/modules/hw/d3d11/d3d11_instance.c b/modules/hw/d3d11/d3d11_instance.c
index 684943f928..f751f98938 100644
--- a/modules/hw/d3d11/d3d11_instance.c
+++ b/modules/hw/d3d11/d3d11_instance.c
@@ -33,7 +33,7 @@
#include <d3d11.h>
#include "d3d11_filters.h"
-typedef picture_sys_t VA_PICSYS;
+typedef picture_sys_d3d11_t VA_PICSYS;
#include "../../codec/avcodec/va_surface.h"
static vlc_mutex_t inst_lock = VLC_STATIC_MUTEX;
@@ -47,7 +47,7 @@ void D3D11_FilterHoldInstance(filter_t *filter, d3d11_device_t *out, D3D11_TEXTU
if (!pic)
return;
- picture_sys_t *p_sys = ActivePictureSys(pic);
+ picture_sys_d3d11_t *p_sys = ActivePictureSys(pic);
vlc_mutex_lock(&inst_lock);
if (p_sys)
diff --git a/modules/hw/d3d11/d3d11_processor.c b/modules/hw/d3d11/d3d11_processor.c
index d1a29b91e4..44309e47a2 100644
--- a/modules/hw/d3d11/d3d11_processor.c
+++ b/modules/hw/d3d11/d3d11_processor.c
@@ -145,7 +145,7 @@ void D3D11_ReleaseProcessor(d3d11_processor_t *out)
}
#undef D3D11_Assert_ProcessorInput
-HRESULT D3D11_Assert_ProcessorInput(vlc_object_t *o, d3d11_processor_t *d3d_proc, picture_sys_t *p_sys)
+HRESULT D3D11_Assert_ProcessorInput(vlc_object_t *o, d3d11_processor_t *d3d_proc, picture_sys_d3d11_t *p_sys)
{
if (p_sys->processorInput)
return S_OK;
diff --git a/modules/hw/d3d11/d3d11_processor.h b/modules/hw/d3d11/d3d11_processor.h
index b4bd124b03..4274a7cd09 100644
--- a/modules/hw/d3d11/d3d11_processor.h
+++ b/modules/hw/d3d11/d3d11_processor.h
@@ -44,7 +44,7 @@ int D3D11_CreateProcessor(vlc_object_t *, d3d11_device_t *,
void D3D11_ReleaseProcessor(d3d11_processor_t *);
-HRESULT D3D11_Assert_ProcessorInput(vlc_object_t *, d3d11_processor_t *, picture_sys_t *);
+HRESULT D3D11_Assert_ProcessorInput(vlc_object_t *, d3d11_processor_t *, picture_sys_d3d11_t *);
#define D3D11_Assert_ProcessorInput(a,b,c) D3D11_Assert_ProcessorInput(VLC_OBJECT(a),b,c)
#endif
diff --git a/modules/hw/d3d11/d3d11_surface.c b/modules/hw/d3d11/d3d11_surface.c
index 4befbb4660..d59e74def6 100644
--- a/modules/hw/d3d11/d3d11_surface.c
+++ b/modules/hw/d3d11/d3d11_surface.c
@@ -45,7 +45,7 @@
#include "d3d11_processor.h"
#include "../../video_chroma/d3d11_fmt.h"
-typedef picture_sys_t VA_PICSYS;
+typedef picture_sys_d3d11_t VA_PICSYS;
#include "../../codec/avcodec/va_surface.h"
#ifdef ID3D11VideoContext_VideoProcessorBlt
@@ -153,7 +153,7 @@ static HRESULT can_map(filter_sys_t *sys, ID3D11DeviceContext *context)
return hr;
}
-static int assert_staging(filter_t *p_filter, picture_sys_t *p_sys)
+static int assert_staging(filter_t *p_filter, picture_sys_d3d11_t *p_sys)
{
filter_sys_t *sys = p_filter->p_sys;
HRESULT hr;
@@ -238,7 +238,7 @@ static void D3D11_YUY2(filter_t *p_filter, picture_t *src, picture_t *dst)
}
filter_sys_t *sys = p_filter->p_sys;
- picture_sys_t *p_sys = &((struct va_pic_context*)src->context)->picsys;
+ picture_sys_d3d11_t *p_sys = &((struct va_pic_context*)src->context)->picsys;
D3D11_TEXTURE2D_DESC desc;
D3D11_MAPPED_SUBRESOURCE lock;
@@ -367,7 +367,7 @@ static void D3D11_NV12(filter_t *p_filter, picture_t *src, picture_t *dst)
}
filter_sys_t *sys = p_filter->p_sys;
- picture_sys_t *p_sys = &((struct va_pic_context*)src->context)->picsys;
+ picture_sys_d3d11_t *p_sys = &((struct va_pic_context*)src->context)->picsys;
D3D11_TEXTURE2D_DESC desc;
D3D11_MAPPED_SUBRESOURCE lock;
@@ -457,7 +457,7 @@ static void D3D11_RGBA(filter_t *p_filter, picture_t *src, picture_t *dst)
{
filter_sys_t *sys = p_filter->p_sys;
assert(src->context != NULL);
- picture_sys_t *p_sys = &((struct va_pic_context*)src->context)->picsys;
+ picture_sys_d3d11_t *p_sys = &((struct va_pic_context*)src->context)->picsys;
D3D11_TEXTURE2D_DESC desc;
D3D11_MAPPED_SUBRESOURCE lock;
@@ -499,7 +499,7 @@ static void D3D11_RGBA(filter_t *p_filter, picture_t *src, picture_t *dst)
static void DestroyPicture(picture_t *picture)
{
- picture_sys_t *p_sys = picture->p_sys;
+ picture_sys_d3d11_t *p_sys = picture->p_sys;
ReleaseD3D11PictureSys( p_sys );
free(p_sys);
}
@@ -574,7 +574,7 @@ static struct picture_context_t *d3d11_pic_context_copy(struct picture_context_t
static void NV12_D3D11(filter_t *p_filter, picture_t *src, picture_t *dst)
{
filter_sys_t *sys = p_filter->p_sys;
- picture_sys_t *p_sys = dst->p_sys;
+ picture_sys_d3d11_t *p_sys = dst->p_sys;
if (unlikely(p_sys==NULL))
{
/* the output filter configuration may have changed since the filter
@@ -582,7 +582,7 @@ static void NV12_D3D11(filter_t *p_filter, picture_t *src, picture_t *dst)
return;
}
- picture_sys_t *p_staging_sys = sys->staging_pic->p_sys;
+ picture_sys_d3d11_t *p_staging_sys = sys->staging_pic->p_sys;
D3D11_TEXTURE2D_DESC texDesc;
ID3D11Texture2D_GetDesc( p_staging_sys->texture[KNOWN_DXGI_INDEX], &texDesc);
@@ -748,7 +748,7 @@ int D3D11OpenCPUConverter( vlc_object_t *obj )
picture_resource_t res;
res.pf_destroy = DestroyPicture;
- picture_sys_t *res_sys = calloc(1, sizeof(picture_sys_t));
+ picture_sys_d3d11_t *res_sys = calloc(1, sizeof(picture_sys_d3d11_t));
if (res_sys == NULL) {
err = VLC_ENOMEM;
goto done;
@@ -767,7 +767,7 @@ int D3D11OpenCPUConverter( vlc_object_t *obj )
msg_Err(p_filter, "Failed to map create the temporary picture.");
goto done;
}
- picture_sys_t *p_dst_sys = p_dst->p_sys;
+ picture_sys_d3d11_t *p_dst_sys = p_dst->p_sys;
picture_Setup(p_dst, &p_dst->format);
texDesc.MipLevels = 1;
diff --git a/modules/video_chroma/d3d11_fmt.c b/modules/video_chroma/d3d11_fmt.c
index cba6a400ab..00151df868 100644
--- a/modules/video_chroma/d3d11_fmt.c
+++ b/modules/video_chroma/d3d11_fmt.c
@@ -38,10 +38,10 @@
#include "d3d11_fmt.h"
-typedef picture_sys_t VA_PICSYS;
+typedef picture_sys_d3d11_t VA_PICSYS;
#include "../codec/avcodec/va_surface.h"
-void AcquireD3D11PictureSys(picture_sys_t *p_sys)
+void AcquireD3D11PictureSys(picture_sys_d3d11_t *p_sys)
{
for (int i=0; i<D3D11_MAX_SHADER_VIEW; i++) {
if (p_sys->renderSrc[i])
@@ -59,7 +59,7 @@ void AcquireD3D11PictureSys(picture_sys_t *p_sys)
ID3D11VideoProcessorOutputView_AddRef(p_sys->processorOutput);
}
-void ReleaseD3D11PictureSys(picture_sys_t *p_sys)
+void ReleaseD3D11PictureSys(picture_sys_d3d11_t *p_sys)
{
for (int i=0; i<D3D11_MAX_SHADER_VIEW; i++) {
if (p_sys->renderSrc[i])
diff --git a/modules/video_chroma/d3d11_fmt.h b/modules/video_chroma/d3d11_fmt.h
index bb1f7b72a8..8950eb99b9 100644
--- a/modules/video_chroma/d3d11_fmt.h
+++ b/modules/video_chroma/d3d11_fmt.h
@@ -72,7 +72,7 @@ typedef struct
ID3D11VideoProcessorOutputView *processorOutput; /* when used as processor output */
ID3D11ShaderResourceView *renderSrc[D3D11_MAX_SHADER_VIEW];
DXGI_FORMAT formatTexture;
-} picture_sys_t;
+} picture_sys_d3d11_t;
/* index to use for texture/resource that use a known DXGI format
* (ie not DXGI_FORMAT_UNKNWON) */
@@ -86,9 +86,9 @@ static inline bool is_d3d11_opaque(vlc_fourcc_t chroma)
chroma == VLC_CODEC_D3D11_OPAQUE_BGRA;
}
-void AcquireD3D11PictureSys(picture_sys_t *p_sys);
+void AcquireD3D11PictureSys(picture_sys_d3d11_t *p_sys);
-void ReleaseD3D11PictureSys(picture_sys_t *p_sys);
+void ReleaseD3D11PictureSys(picture_sys_d3d11_t *p_sys);
/* map texture planes to resource views */
int D3D11_AllocateResourceView(vlc_object_t *obj, ID3D11Device *d3ddevice,
diff --git a/modules/video_output/vmem.c b/modules/video_output/vmem.c
index ee5e544656..e0f43fb409 100644
--- a/modules/video_output/vmem.c
+++ b/modules/video_output/vmem.c
@@ -84,7 +84,7 @@ vlc_module_end()
typedef struct
{
void *id;
-} picture_sys_t;
+} picture_sys_d3d11_t;
/* NOTE: the callback prototypes must match those of LibVLC */
struct vout_display_sys_t {
diff --git a/modules/video_output/win32/d3d11_shaders.h b/modules/video_output/win32/d3d11_shaders.h
index b7bba5d602..42ae75fedc 100644
--- a/modules/video_output/win32/d3d11_shaders.h
+++ b/modules/video_output/win32/d3d11_shaders.h
@@ -73,7 +73,7 @@ typedef struct {
/* A Quad is texture that can be displayed in a rectangle */
typedef struct
{
- picture_sys_t picSys;
+ picture_sys_d3d11_t picSys;
const d3d_format_t *textureFormat;
UINT resourceCount;
ID3D11Buffer *pVertexBuffer;
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 4eabe17698..5a123ef951 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -51,7 +51,7 @@
# include <windows.ui.xaml.media.dxinterop.h> */
#include "../../video_chroma/d3d11_fmt.h"
-typedef picture_sys_t VA_PICSYS;
+typedef picture_sys_d3d11_t VA_PICSYS;
#include "../../codec/avcodec/va_surface.h"
#include "d3d11_quad.h"
@@ -105,7 +105,7 @@ struct vout_display_sys_t
ID3D11Query *prepareWait;
- picture_sys_t stagingSys;
+ picture_sys_d3d11_t stagingSys;
picture_pool_t *pool; /* hardware decoding pool */
d3d_vshader_t projectionVShader;
@@ -433,7 +433,7 @@ static picture_pool_t *Pool(vout_display_t *vd, unsigned pool_size)
goto error;
for (picture_count = 0; picture_count < pool_size; picture_count++) {
- picture_sys_t *picsys = calloc(1, sizeof(*picsys));
+ picture_sys_d3d11_t *picsys = calloc(1, sizeof(*picsys));
if (unlikely(picsys == NULL))
goto error;
@@ -465,7 +465,7 @@ static picture_pool_t *Pool(vout_display_t *vd, unsigned pool_size)
#endif
{
for (picture_count = 0; picture_count < pool_size; picture_count++) {
- picture_sys_t *p_sys = pictures[picture_count]->p_sys;
+ picture_sys_d3d11_t *p_sys = pictures[picture_count]->p_sys;
if (!p_sys->texture[0])
continue;
if (D3D11_AllocateResourceView(vd, sys->d3d_dev.d3ddevice, sys->picQuad.textureFormat,
@@ -497,7 +497,7 @@ error:
static void DestroyDisplayPoolPicture(picture_t *picture)
{
- picture_sys_t *p_sys = picture->p_sys;
+ picture_sys_d3d11_t *p_sys = picture->p_sys;
ReleaseD3D11PictureSys( p_sys );
free(p_sys);
}
@@ -667,7 +667,7 @@ static void PreparePicture(vout_display_t *vd, picture_t *picture, subpicture_t
}
else
{
- picture_sys_t *p_sys = ActivePictureSys(picture);
+ picture_sys_d3d11_t *p_sys = ActivePictureSys(picture);
d3d11_device_lock( &sys->d3d_dev );
@@ -731,7 +731,7 @@ static void PreparePicture(vout_display_t *vd, picture_t *picture, subpicture_t
if (!is_d3d11_opaque(picture->format.i_chroma) || sys->legacy_shader)
renderSrc = sys->stagingSys.renderSrc;
else {
- picture_sys_t *p_sys = ActivePictureSys(picture);
+ picture_sys_d3d11_t *p_sys = ActivePictureSys(picture);
renderSrc = p_sys->renderSrc;
}
D3D11_RenderQuad(&sys->d3d_dev, &sys->picQuad,
@@ -1430,7 +1430,7 @@ static int Direct3D11MapSubpicture(vout_display_t *vd, int *subpicture_region_co
continue;
}
picture_resource_t picres = {
- .p_sys = (picture_sys_t *) d3dquad,
+ .p_sys = (picture_sys_d3d11_t *) d3dquad,
.pf_destroy = DestroyPictureQuad,
};
(*region)[i] = picture_NewFromResource(&r->p_picture->format, &picres);
More information about the vlc-commits
mailing list