[vlc-commits] [Git][videolan/vlc][master] 3 commits: d3d11_scaler: fix AMD super scaler if the source has padding

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Mon Jun 10 09:37:36 UTC 2024



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


Commits:
29f6fd96 by Steve Lhomme at 2024-06-10T06:41:30+00:00
d3d11_scaler: fix AMD super scaler if the source has padding

It asserts in debug build and will keep the padding in release mode.

- - - - -
75e99006 by Steve Lhomme at 2024-06-10T06:41:30+00:00
d3d11_tonemap: log when the TrueHDR feature is not available

That is the case for win32 builds on win64.

- - - - -
94f7f48c by Steve Lhomme at 2024-06-10T06:41:30+00:00
d3d11_scaler: always read the staging size without the decoder padding

- - - - -


2 changed files:

- modules/video_output/win32/d3d11_scaler.cpp
- modules/video_output/win32/d3d11_tonemap.cpp


Changes:

=====================================
modules/video_output/win32/d3d11_scaler.cpp
=====================================
@@ -630,14 +630,17 @@ int D3D11_UpscalerScale(vlc_object_t *vd, d3d11_scaler *scaleProc, picture_sys_d
         auto packedStaging = scaleProc->amfInput->GetPlane(amf::AMF_PLANE_PACKED);
         ID3D11Texture2D *amfStaging = reinterpret_cast<ID3D11Texture2D *>(packedStaging->GetNative());
 
-#ifndef NDEBUG
         D3D11_TEXTURE2D_DESC stagingDesc, inputDesc;
         amfStaging->GetDesc(&stagingDesc);
         p_sys->texture[KNOWN_DXGI_INDEX]->GetDesc(&inputDesc);
-        assert(stagingDesc.Width == inputDesc.Width);
-        assert(stagingDesc.Height == inputDesc.Height);
+        assert(stagingDesc.Width <= inputDesc.Width);
+        assert(stagingDesc.Height <= inputDesc.Height);
         assert(stagingDesc.Format == inputDesc.Format);
-#endif
+
+        D3D11_BOX box = {};
+        box.bottom = stagingDesc.Height,
+        box.right = stagingDesc.Width,
+        box.back = 1,
 
         // copy source into staging as it may not be shared
         d3d11_device_lock( scaleProc->d3d_dev );
@@ -646,7 +649,7 @@ int D3D11_UpscalerScale(vlc_object_t *vd, d3d11_scaler *scaleProc, picture_sys_d
                                                 0, 0, 0,
                                                 p_sys->texture[KNOWN_DXGI_INDEX],
                                                 p_sys->slice_index,
-                                                NULL);
+                                                &box);
         d3d11_device_unlock( scaleProc->d3d_dev );
         submitSurface = scaleProc->amfInput;
 


=====================================
modules/video_output/win32/d3d11_tonemap.cpp
=====================================
@@ -115,6 +115,7 @@ d3d11_tonemapper *D3D11_TonemapperCreate(vlc_object_t *vd, d3d11_device_t *d3d_d
 
         if (!available)
         {
+            msg_Warn(vd, "True HDR not supported");
             d3d11_device_unlock(d3d_dev);
             goto error;
         }



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/ae6a59447187d09b09fe771b60bd6f27eb9c2021...94f7f48cc722326901f182408a5e2adb4995d761

-- 
This project does not include diff previews in email notifications.
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/ae6a59447187d09b09fe771b60bd6f27eb9c2021...94f7f48cc722326901f182408a5e2adb4995d761
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