mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-20 15:15:46 +00:00
Enable FFmpeg GPU decoding for NVIDIA and AMD graphic cards (#139)
This enables the DXVA2, D3D11VA, D3D11VA2 and NVENC decoders for GPU decoding of H264 and VP9 formats on Windows. Co-authored-by: MaranBr <maranbr@outlook.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/139
This commit is contained in:
parent
7f16f12202
commit
621d1c3d8a
2 changed files with 2 additions and 4 deletions
|
@ -37,7 +37,6 @@ constexpr std::array PreferredGpuDecoders = {
|
|||
AV_HWDEVICE_TYPE_VAAPI,
|
||||
AV_HWDEVICE_TYPE_VDPAU,
|
||||
#endif
|
||||
// last resort for Linux Flatpak (w/ NVIDIA)
|
||||
AV_HWDEVICE_TYPE_VULKAN,
|
||||
};
|
||||
|
||||
|
@ -108,8 +107,7 @@ bool Decoder::SupportsDecodingOnDevice(AVPixelFormat* out_pix_fmt, AVHWDeviceTyp
|
|||
av_hwdevice_get_type_name(type));
|
||||
break;
|
||||
}
|
||||
if ((config->methods & AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX) != 0 &&
|
||||
config->device_type == type) {
|
||||
if (config->methods & AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX && config->device_type == type) {
|
||||
LOG_INFO(HW_GPU, "Using {} GPU decoder", av_hwdevice_get_type_name(type));
|
||||
*out_pix_fmt = config->pix_fmt;
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue