[vlc-commits] direct3d11: remove write-only decoderFormat
Steve Lhomme
git at videolan.org
Tue Aug 22 08:48:02 CEST 2017
vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Sat Aug 19 08:55:28 2017 +0200| [832b332ee4befd9c24f400ba9b5fe5960b4e969b] | committer: Jean-Baptiste Kempf
direct3d11: remove write-only decoderFormat
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=832b332ee4befd9c24f400ba9b5fe5960b4e969b
---
modules/video_chroma/d3d11_fmt.h | 1 -
modules/video_output/win32/direct3d11.c | 9 ++-------
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/modules/video_chroma/d3d11_fmt.h b/modules/video_chroma/d3d11_fmt.h
index f1651ffa73..db462111ba 100644
--- a/modules/video_chroma/d3d11_fmt.h
+++ b/modules/video_chroma/d3d11_fmt.h
@@ -45,7 +45,6 @@ struct picture_sys_t
ID3D11VideoProcessorInputView *processorInput; /* when used as processor input */
ID3D11VideoProcessorOutputView *processorOutput; /* when used as processor output */
ID3D11ShaderResourceView *resourceView[D3D11_MAX_SHADER_VIEW];
- DXGI_FORMAT decoderFormat;
DXGI_FORMAT formatTexture;
bool mapped;
};
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 505cbfd910..baeee4f1fc 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -149,7 +149,6 @@ struct vout_display_sys_t
const d3d_format_t *picQuadConfig;
ID3D11PixelShader *picQuadPixelShader;
- DXGI_FORMAT decoderFormat;
picture_sys_t stagingSys;
ID3D11RenderTargetView *d3drenderTargetView;
@@ -442,7 +441,7 @@ static int Direct3D11LockDirectTexture(picture_t *picture)
static void Direct3D11UnlockDirectTexture(picture_t *picture)
{
- picture_sys_t *p_sys = picture->p_sys;
+ picture_sys_t *p_sys = ActivePictureSys(picture);
if (p_sys->mapped) {
for (int i = 0; i < picture->i_planes; i++)
ID3D11DeviceContext_Unmap(p_sys->context, p_sys->resource[i], 0);
@@ -806,7 +805,6 @@ static picture_pool_t *Pool(vout_display_t *vd, unsigned pool_size)
picsys->slice_index = picture_count;
picsys->formatTexture = sys->picQuadConfig->formatTexture;
- picsys->decoderFormat = sys->decoderFormat;
picsys->context = sys->d3dcontext;
picture_resource_t resource = {
@@ -1231,7 +1229,7 @@ static void Prepare(vout_display_t *vd, picture_t *picture, subpicture_t *subpic
WaitForSingleObjectEx( sys->context_lock, INFINITE, FALSE );
#endif
picture_sys_t *p_sys = ActivePictureSys(picture);
- if (picture->p_sys->formatTexture == DXGI_FORMAT_UNKNOWN)
+ if (p_sys->formatTexture == DXGI_FORMAT_UNKNOWN)
{
Direct3D11UnlockDirectTexture(picture);
for (int plane = 0; plane < D3D11_MAX_SHADER_VIEW; plane++)
@@ -1773,9 +1771,6 @@ static int Direct3D11Open(vout_display_t *vd, video_format_t *fmt)
return VLC_EGENERIC;
}
- /* we will need a converter from 420_OPAQUE to our display format */
- if ( decoder_format )
- sys->decoderFormat = decoder_format->formatTexture;
fmt->i_chroma = sys->picQuadConfig->fourcc;
msg_Dbg( vd, "Using pixel format %s for chroma %4.4s", sys->picQuadConfig->name,
More information about the vlc-commits
mailing list