[vlc-commits] [Git][videolan/vlc][master] d3d11: add support for 8-bit I444 rendering

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Tue May 17 11:31:00 UTC 2022



Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
90f81012 by Steve Lhomme at 2022-05-17T11:09:25+00:00
d3d11: add support for 8-bit I444 rendering

We already support 16-bit I444

- - - - -


3 changed files:

- modules/video_chroma/dxgi_fmt.c
- modules/video_output/win32/d3d11_quad.cpp
- modules/video_output/win32/d3d_dynamic_shader.c


Changes:

=====================================
modules/video_chroma/dxgi_fmt.c
=====================================
@@ -86,6 +86,7 @@ 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 } },
     { "YUVA",     DXGI_FORMAT_UNKNOWN,        VLC_CODEC_YUVA,          8, 1, 1, { DXGI_FORMAT_R8_UNORM,      DXGI_FORMAT_R8_UNORM, DXGI_FORMAT_R8_UNORM, DXGI_FORMAT_R8_UNORM } },
+    { "I444",     DXGI_FORMAT_UNKNOWN,        VLC_CODEC_I444,          8, 1, 1, { DXGI_FORMAT_R8_UNORM,      DXGI_FORMAT_R8_UNORM, DXGI_FORMAT_R8_UNORM } },
     { "I444_16",  DXGI_FORMAT_UNKNOWN,        VLC_CODEC_I444_16L,     16, 1, 1, { 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_BGRA,  8, 1, 1, { DXGI_FORMAT_B8G8R8A8_UNORM } },


=====================================
modules/video_output/win32/d3d11_quad.cpp
=====================================
@@ -341,6 +341,14 @@ void d3d11_quad_t::UpdateViewport(const RECT *rect, const d3d_format_t *display)
     case DXGI_FORMAT_UNKNOWN:
         switch ( generic.textureFormat->fourcc )
         {
+        case VLC_CODEC_I444:
+            if ( display->formatTexture != DXGI_FORMAT_NV12 &&
+                 display->formatTexture != DXGI_FORMAT_P010 )
+            {
+                cropViewport[1] = cropViewport[0];
+                break;
+            }
+            break;
         case VLC_CODEC_YUVA:
             if ( display->formatTexture != DXGI_FORMAT_NV12 &&
                  display->formatTexture != DXGI_FORMAT_P010 )


=====================================
modules/video_output/win32/d3d_dynamic_shader.c
=====================================
@@ -536,6 +536,7 @@ HRESULT (D3D_CompilePixelShader)(vlc_object_t *o, const d3d_shader_compiler_t *c
                 psz_shader_resource_views[0] = "3"; shader_views[0] = 3;
                 break;
             case VLC_CODEC_I444_16L:
+            case VLC_CODEC_I444:
             case VLC_CODEC_I420:
                 psz_sampler[0] = "SAMPLE_TRIPLANAR_TO_YUVA";
                 psz_shader_resource_views[0] = "3"; shader_views[0] = 3;



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/90f810121b42d7a2dc6e66d8c0e0711e3589f355

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/90f810121b42d7a2dc6e66d8c0e0711e3589f355
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list