Steve Lhomme
dc7f5a2e32
d3d11: lookup d3d_format_t with or without an alpha texture
3 years ago
Steve Lhomme
8e8cb9daba
d3d11: allow picking a DXGI format that requires alpha channels
3 years ago
Steve Lhomme
d14eadc247
direct3d11: use the picture format of SPU when dealing with colorimetry and buffers
We map the picture to a texture that is rendered with the appropriate colorimetry.
The other format is mostly used for positioning.
2 years ago
Steve Lhomme
6d9b2a0929
vlc_list: split reading from a const list a non-const list
Items read from a const list should also be const.
The start of the listing needs a matching const/non-const pointer.
2 years ago
Steve Lhomme
473a66cb48
vout: read SPU regions as const
2 years ago
Steve Lhomme
2d53d9ca27
vout: pass the SPU regions to render as const
The display module should not need to modify them.
2 years ago
Steve Lhomme
f599d4c4f8
subpicture: use a separate type to pass a list of SPU regions to render
It contains only the useful fields from subpicture_t.
A display module should not need to know about channels, order, ephemer, fade,
etc.
2 years ago
Steve Lhomme
d6ffd5bc35
subpicture: use helper functions for vlc_spu_regions
2 years ago
Steve Lhomme
3d610be9f0
subpicture: use vlc_list for regions
This separates the region type from its container.
The drawback is that it makes the structure bigger. But we get plenty
of helpers. There might be other containers suitable but we use a mix of
append and prepend.
3 years ago
Steve Lhomme
466c59f3a8
direct3d11: simplify indentation
3 years ago
Steve Lhomme
522ffc41da
direct3d11: simplify test for unknown/opaque chroma descriptions
3 years ago
Steve Lhomme
be4da675fe
direct3d11: use NVDECToVlcChroma() to the the CPU equivalent of NVDEC chromas
3 years ago
Steve Lhomme
1289d68824
direct3d11: use the CPU chroma description from D3D11 opaque
3 years ago
Steve Lhomme
72e4e5376a
direct3d11: remove dead code
We cannot get NV21 or I420 as sub pictures as we only accept RGBA.
3 years ago
Steve Lhomme
154df46cee
copy: handle the NV21 UV swapping issue outside of picture_UpdatePlanes()
3 years ago
Steve Lhomme
a3333ea644
copy: move the I420 UV swapping code outside of picture_UpdatePlanes()
This is specific to windows mix with I420/YV12. It should not be in generic
code.
3 years ago
Steve Lhomme
e7af761f99
direct3d11: use auto for long structure name
3 years ago
Steve Lhomme
79f26ed281
direct3d11: only set the chroma if it might be used
3 years ago
Steve Lhomme
47af51ec58
vlc_es: remove always 0 video_format_t RGB mask
3 years ago
Steve Lhomme
584bc555a3
direct3d11: reset the mask after we set the chroma
We don't use a mask anymore.
3 years ago
Steve Lhomme
bdb93210f8
direct3d11: use more generic vlc_fourcc_GetFallback()
3 years ago
Steve Lhomme
459280cdc6
direct3d11: set the format mask after setting the chroma
3 years ago
Steve Lhomme
765c9d3030
configure: don't check the presence of D3D11/D3D9 structures
Either D3D11/D3D9 is usable and the structures are there, or they are not.
We don't support old mingw-w64 versions without these headers.
* D3D11 is not enabled if libavcodec/d3d11.h is not usable
* DXVA2 is not enabled if libavcodec/dxva2.h is not usable
* direct3d9_filters is enabled if d3d9.h is usable (ie not UWP builds)
3 years ago
Steve Lhomme
48a4c682c2
direct3d11: use accurate logging of Scaler mode
If we fallback to linear the log was wrong.
3 years ago
Steve Lhomme
894142a0cb
direct3d11: get the d3d_format from the d3d11_scaler
It could select a different format than the one the decoder sends.
3 years ago
Steve Lhomme
ae5bae4fa0
direct3d11: use WINAPI_FAMILY to assume d3d11d is forces in UWP
3 years ago
Steve Lhomme
9e5bcf98fc
d3d11: use WINAPI_FAMILY to disable internal swapchain
3 years ago
Steve Lhomme
f71d15f9bb
win32/common: handle the sensor init/close in the HWND handler
When we create the window we know if it's for a projection or not.
That's all we need to initialize the sensors.
The code is disabled for display module not using the sensor (no projection).
The code is in C++ so we don't want to pull it when we don't need to.
3 years ago
Steve Lhomme
57ab5ee14c
win32/common: pass the vout_display_owner_t to the sensor code
No need to pass a whole vout_display_t.
3 years ago
Steve Lhomme
0a8633aa35
win32/common: move the Sensor hook declaration in a header
3 years ago
Chilledheart
beac9098db
direct3d11: use NVIDIA super-resolution upscaler
Co-authored-by: Steve Lhomme <robux4@ycbcr.xyz>
3 years ago
Steve Lhomme
1f7f849ce1
direct3d11: add video processor based scaler
The VideoProcessor may use some special scaling in hardware that might do a
better job than the linear sampler in the shader.
Co-authored-by: Chilledheart <hukeyue@hotmail.com>
3 years ago
Steve Lhomme
d4374090ee
vout/win32: allow forcing the source size
3 years ago
Steve Lhomme
794d897d07
direct3d11: keep the format used with the pic_quad
3 years ago
Steve Lhomme
b86a57876f
direct3d11: add an option to select the upscaling quality
D3D11_FILTER_MIN_MAG_LINEAR_MIP_POINT is smoother but a bit slower.
Users may prefer sharper/blockier outputs.
3 years ago
Steve Lhomme
e13d4e5355
direct3d11: don't build d3d11_swapchain in UWP
We can't create a swapchain from DirectCompose or a HWND.
Maybe one day we will support CreateSwapChainForCoreWindow(). It can be
in its own file.
3 years ago
Steve Lhomme
1ac410b6f0
direct3d11: don't compile D3D11_CreateLocalSwapchainHandleHwnd in UWP
HWND is not available in UWP apps, so we should never allow any code to use it.
3 years ago
Steve Lhomme
1a0dbb0c1b
win32/common: move the opaque event_thread_t in the area structure
We don't need to have them separated, they are closely tied.
3 years ago
Steve Lhomme
59c9fdd398
win32/common: remove vout_display_sys_win32_t indirection
We can just fill an opaque event_thread_t pointer.
3 years ago
Steve Lhomme
124be999cd
win32/common: make the video HWND private to event_thread_t
3 years ago
Steve Lhomme
e4ba931b3d
direct3d11: get source D3D11_TEXTURE2D_DESC early
3 years ago
Steve Lhomme
1b02bcdade
d3d11: use D3D11_RenderFormat to get render d3d_formats
3 years ago
Steve Lhomme
d65736cd20
d3d11: use a specific object to handle the rendering fence
3 years ago
Steve Lhomme
f248026546
direct3d11: simplify decoder_format usage
No need to use the textureFormat when we know it's nullptr.
3 years ago
Steve Lhomme
b1bc1224fc
direct3d11: fix fallback output when best selection fails
Passing false (0) would result in no format being ever selected.
3 years ago
Steve Lhomme
954b60ff45
direct3d11: remove the legacy (UWP) way of passing the swapchain/d3dcontext
4 years ago
Steve Lhomme
7696d31366
vout: win32: do not return errors when CommonControl fails
We do not handle the reset_pictures callback so we can't return an error
here. We never returned one anyway.
4 years ago
Rémi Denis-Courmont
84c253cdd1
window: rename vout_window* to vlc_window*
The baseline windowing code has not been specific to the video output
for a while.
4 years ago
Steve Lhomme
f7803af508
d3d11: pass a vlc_logger to D3D11_AllocateResourceView()
No need to force the caller to know about its object.
4 years ago
Steve Lhomme
90ac4d167c
d3d11_fmt: allow creating pictures with shared texture
This is useful when textures come from a different Adapter/GPU or the bogus
access with GPU output.
4 years ago