[vlc-commits] [Git][videolan/vlc][3.0.x] 2 commits: d3d11_scaler: fix AMD super scaler if the source has padding
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Sat Jun 8 13:22:01 UTC 2024
Jean-Baptiste Kempf pushed to branch 3.0.x at VideoLAN / VLC
Commits:
97d162d5 by Steve Lhomme at 2024-06-08T13:00:12+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.
- - - - -
4071ece4 by Steve Lhomme at 2024-06-08T13:00:12+00:00
d3d11_scaler: fix missing picture sys for AMD super scaler
This code is different from 4.0, must have been lost in a rebase.
- - - - -
1 changed file:
- modules/video_output/win32/d3d11_scaler.cpp
Changes:
=====================================
modules/video_output/win32/d3d11_scaler.cpp
=====================================
@@ -657,11 +657,16 @@ int D3D11_UpscalerScale(vlc_object_t *vd, d3d11_scaler *scaleProc, picture_sys_t
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 );
scaleProc->d3d_dev->d3dcontext->CopySubresourceRegion(amfStaging,
@@ -669,7 +674,7 @@ int D3D11_UpscalerScale(vlc_object_t *vd, d3d11_scaler *scaleProc, picture_sys_t
0, 0, 0,
p_sys->texture[KNOWN_DXGI_INDEX],
p_sys->slice_index,
- NULL);
+ &box);
d3d11_device_unlock( scaleProc->d3d_dev );
submitSurface = scaleProc->amfInput;
@@ -719,6 +724,19 @@ int D3D11_UpscalerScale(vlc_object_t *vd, d3d11_scaler *scaleProc, picture_sys_t
return (-ENOTSUP);
}
+ if (scaleProc->picsys.processorInput)
+ {
+ scaleProc->picsys.processorInput->Release();
+ scaleProc->picsys.processorInput = NULL;
+ }
+ if (scaleProc->picsys.processorOutput)
+ {
+ scaleProc->picsys.processorOutput->Release();
+ scaleProc->picsys.processorOutput = NULL;
+ }
+ scaleProc->picsys.texture[0] = out;
+ scaleProc->picsys.formatTexture = inputDesc.Format;
+
amfOutput->Release();
return VLC_SUCCESS;
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/d587ae967ad6fc5a93c127b7263c179224e75cdc...4071ece4bbfc860ea0793aed8589db6bb1329f32
--
This project does not include diff previews in email notifications.
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/d587ae967ad6fc5a93c127b7263c179224e75cdc...4071ece4bbfc860ea0793aed8589db6bb1329f32
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