Commit 40fa6b7a authored by Steve Lhomme's avatar Steve Lhomme Committed by Jean-Baptiste Kempf

d3d11: use is_d3d11_opaque() is more places

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 346cbef2
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment