[vlc-commits] direct3d11: use VLC_CODEC_D3D11_OPAQUE_RGBA for RGBA display
Steve Lhomme
git at videolan.org
Wed Feb 21 12:20:46 CET 2018
vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Thu Dec 7 15:39:11 2017 +0100| [172bb6a97f5ff83ead4eb6dfe589995d8ee20a4a] | committer: Steve Lhomme
direct3d11: use VLC_CODEC_D3D11_OPAQUE_RGBA for RGBA display
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=172bb6a97f5ff83ead4eb6dfe589995d8ee20a4a
---
modules/video_chroma/d3d11_fmt.h | 3 ++-
modules/video_chroma/dxgi_fmt.c | 5 +++--
modules/video_output/win32/direct3d11.c | 1 +
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/modules/video_chroma/d3d11_fmt.h b/modules/video_chroma/d3d11_fmt.h
index 4e1a848352..e7685b2d5f 100644
--- a/modules/video_chroma/d3d11_fmt.h
+++ b/modules/video_chroma/d3d11_fmt.h
@@ -82,7 +82,8 @@ picture_sys_t *ActivePictureSys(picture_t *p_pic);
static inline bool is_d3d11_opaque(vlc_fourcc_t chroma)
{
return chroma == VLC_CODEC_D3D11_OPAQUE ||
- chroma == VLC_CODEC_D3D11_OPAQUE_10B;
+ chroma == VLC_CODEC_D3D11_OPAQUE_10B ||
+ chroma == VLC_CODEC_D3D11_OPAQUE_RGBA;
}
void AcquirePictureSys(picture_sys_t *p_sys);
diff --git a/modules/video_chroma/dxgi_fmt.c b/modules/video_chroma/dxgi_fmt.c
index 0c28f470fe..66c73bcd3e 100644
--- a/modules/video_chroma/dxgi_fmt.c
+++ b/modules/video_chroma/dxgi_fmt.c
@@ -80,11 +80,12 @@ static const d3d_format_t d3d_formats[] = {
{ "I420", DXGI_FORMAT_UNKNOWN, VLC_CODEC_I420, 8, 2, 2, { DXGI_FORMAT_R8_UNORM, DXGI_FORMAT_R8_UNORM, DXGI_FORMAT_R8_UNORM } },
{ "I420_10", DXGI_FORMAT_UNKNOWN, VLC_CODEC_I420_10L, 10, 2, 2, { DXGI_FORMAT_R16_UNORM, DXGI_FORMAT_R16_UNORM, DXGI_FORMAT_R16_UNORM } },
{ "B8G8R8A8", DXGI_FORMAT_B8G8R8A8_UNORM, VLC_CODEC_BGRA, 8, 1, 1, { DXGI_FORMAT_B8G8R8A8_UNORM } },
- { "VA_BGRA", DXGI_FORMAT_B8G8R8A8_UNORM, VLC_CODEC_D3D11_OPAQUE, 8, 1, 1, { DXGI_FORMAT_B8G8R8A8_UNORM } },
+ { "VA_BGRA", DXGI_FORMAT_B8G8R8A8_UNORM, VLC_CODEC_D3D11_OPAQUE_RGBA, 8, 1, 1, { DXGI_FORMAT_B8G8R8A8_UNORM } },
{ "R8G8B8A8", DXGI_FORMAT_R8G8B8A8_UNORM, VLC_CODEC_RGBA, 8, 1, 1, { DXGI_FORMAT_R8G8B8A8_UNORM } },
- { "VA_RGBA", DXGI_FORMAT_R8G8B8A8_UNORM, VLC_CODEC_D3D11_OPAQUE, 8, 1, 1, { DXGI_FORMAT_R8G8B8A8_UNORM } },
+ { "VA_RGBA", DXGI_FORMAT_R8G8B8A8_UNORM, VLC_CODEC_D3D11_OPAQUE_RGBA, 8, 1, 1, { DXGI_FORMAT_R8G8B8A8_UNORM } },
{ "R8G8B8X8", DXGI_FORMAT_B8G8R8X8_UNORM, VLC_CODEC_RGB32, 8, 1, 1, { DXGI_FORMAT_B8G8R8X8_UNORM } },
{ "RGB10A2", DXGI_FORMAT_R10G10B10A2_UNORM, VLC_CODEC_RGBA10, 10, 1, 1, { DXGI_FORMAT_R10G10B10A2_UNORM } },
+ { "VA_RGB10", DXGI_FORMAT_R10G10B10A2_UNORM, VLC_CODEC_D3D11_OPAQUE_RGBA, 10, 1, 1, { DXGI_FORMAT_R10G10B10A2_UNORM } },
{ "AYUV", DXGI_FORMAT_AYUV, VLC_CODEC_VUYA, 8, 1, 1, { DXGI_FORMAT_R8G8B8A8_UNORM } },
{ "B5G6R5", DXGI_FORMAT_B5G6R5_UNORM, VLC_CODEC_RGB16, 5, 1, 1, { DXGI_FORMAT_B5G6R5_UNORM } },
{ "I420_OPAQUE", DXGI_FORMAT_420_OPAQUE, VLC_CODEC_D3D11_OPAQUE, 8, 2, 2, { DXGI_FORMAT_UNKNOWN } },
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 00722a64d5..377fb33a8d 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -1628,6 +1628,7 @@ static int SetupOutputFormat(vout_display_t *vd, video_format_t *fmt)
switch (fmt->i_chroma)
{
case VLC_CODEC_D3D11_OPAQUE:
+ case VLC_CODEC_D3D11_OPAQUE_RGBA:
bits_per_channel = 8;
break;
case VLC_CODEC_D3D11_OPAQUE_10B:
More information about the vlc-commits
mailing list