[vlc-commits] d3d11: use is_d3d11_opaque() is more places
Steve Lhomme
git at videolan.org
Thu Nov 23 09:58:49 CET 2017
vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Wed Nov 22 11:03:37 2017 +0100| [40fa6b7a60de56968c209ac370257db592bd06aa] | committer: Jean-Baptiste Kempf
d3d11: use is_d3d11_opaque() is more places
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=40fa6b7a60de56968c209ac370257db592bd06aa
---
modules/codec/avcodec/d3d11va.c | 2 +-
modules/video_chroma/d3d11_fmt.c | 3 +--
modules/video_output/win32/d3d11_adjust.c | 3 +--
modules/video_output/win32/d3d11_deinterlace.c | 3 +--
4 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index 88513065e0..8596119b58 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -712,7 +712,7 @@ static int DxCreateDecoderSurfaces(vlc_va_t *va, int codec_id,
output_format->name != NULL; ++output_format)
{
if (output_format->formatTexture == sys->render &&
- (output_format->fourcc == VLC_CODEC_D3D11_OPAQUE || output_format->fourcc == VLC_CODEC_D3D11_OPAQUE_10B))
+ is_d3d11_opaque(output_format->fourcc))
{
textureFmt = output_format;
break;
diff --git a/modules/video_chroma/d3d11_fmt.c b/modules/video_chroma/d3d11_fmt.c
index b947bd64c4..0553041d7f 100644
--- a/modules/video_chroma/d3d11_fmt.c
+++ b/modules/video_chroma/d3d11_fmt.c
@@ -293,8 +293,7 @@ const d3d_format_t *FindD3D11Format(ID3D11Device *d3ddevice,
continue;
if (bits_per_channel && bits_per_channel > output_format->bitsPerChannel)
continue;
- if (!allow_opaque && (output_format->fourcc == VLC_CODEC_D3D11_OPAQUE ||
- output_format->fourcc == VLC_CODEC_D3D11_OPAQUE_10B))
+ if (!allow_opaque && is_d3d11_opaque(output_format->fourcc))
continue;
DXGI_FORMAT textureFormat;
diff --git a/modules/video_output/win32/d3d11_adjust.c b/modules/video_output/win32/d3d11_adjust.c
index 894ff78927..e00bdf3c7a 100644
--- a/modules/video_output/win32/d3d11_adjust.c
+++ b/modules/video_output/win32/d3d11_adjust.c
@@ -306,8 +306,7 @@ static int Open(vlc_object_t *obj)
ID3D11Device *d3ddevice = NULL;
ID3D11VideoProcessorEnumerator *processorEnumerator = NULL;
- if (filter->fmt_in.video.i_chroma != VLC_CODEC_D3D11_OPAQUE
- && filter->fmt_in.video.i_chroma != VLC_CODEC_D3D11_OPAQUE_10B)
+ if (!is_d3d11_opaque(filter->fmt_in.video.i_chroma))
return VLC_EGENERIC;
if (!video_format_IsSimilar(&filter->fmt_in.video, &filter->fmt_out.video))
return VLC_EGENERIC;
diff --git a/modules/video_output/win32/d3d11_deinterlace.c b/modules/video_output/win32/d3d11_deinterlace.c
index b68158b38e..b47f0dc342 100644
--- a/modules/video_output/win32/d3d11_deinterlace.c
+++ b/modules/video_output/win32/d3d11_deinterlace.c
@@ -288,8 +288,7 @@ static int Open(vlc_object_t *obj)
ID3D11Device *d3ddevice = NULL;
ID3D11VideoProcessorEnumerator *processorEnumerator = NULL;
- if (filter->fmt_in.video.i_chroma != VLC_CODEC_D3D11_OPAQUE
- && filter->fmt_in.video.i_chroma != VLC_CODEC_D3D11_OPAQUE_10B)
+ if (!is_d3d11_opaque(filter->fmt_in.video.i_chroma))
return VLC_EGENERIC;
if (!video_format_IsSimilar(&filter->fmt_in.video, &filter->fmt_out.video))
return VLC_EGENERIC;
More information about the vlc-commits
mailing list