mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-20 12:55:45 +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
2
externals/ffmpeg/CMakeLists.txt
vendored
2
externals/ffmpeg/CMakeLists.txt
vendored
|
@ -254,7 +254,7 @@ elseif(ANDROID)
|
||||||
set(FFmpeg_INCLUDE_DIR "${FFmpeg_INCLUDE_DIR}" PARENT_SCOPE)
|
set(FFmpeg_INCLUDE_DIR "${FFmpeg_INCLUDE_DIR}" PARENT_SCOPE)
|
||||||
elseif(WIN32)
|
elseif(WIN32)
|
||||||
# Use yuzu FFmpeg binaries
|
# Use yuzu FFmpeg binaries
|
||||||
set(FFmpeg_EXT_NAME "ffmpeg-7.0.3")
|
set(FFmpeg_EXT_NAME "ffmpeg-6.0.2")
|
||||||
set(FFmpeg_PATH "${CMAKE_BINARY_DIR}/externals/${FFmpeg_EXT_NAME}")
|
set(FFmpeg_PATH "${CMAKE_BINARY_DIR}/externals/${FFmpeg_EXT_NAME}")
|
||||||
download_bundled_external("ffmpeg/" ${FFmpeg_EXT_NAME} "")
|
download_bundled_external("ffmpeg/" ${FFmpeg_EXT_NAME} "")
|
||||||
set(FFmpeg_FOUND YES)
|
set(FFmpeg_FOUND YES)
|
||||||
|
|
|
@ -37,7 +37,6 @@ constexpr std::array PreferredGpuDecoders = {
|
||||||
AV_HWDEVICE_TYPE_VAAPI,
|
AV_HWDEVICE_TYPE_VAAPI,
|
||||||
AV_HWDEVICE_TYPE_VDPAU,
|
AV_HWDEVICE_TYPE_VDPAU,
|
||||||
#endif
|
#endif
|
||||||
// last resort for Linux Flatpak (w/ NVIDIA)
|
|
||||||
AV_HWDEVICE_TYPE_VULKAN,
|
AV_HWDEVICE_TYPE_VULKAN,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -108,8 +107,7 @@ bool Decoder::SupportsDecodingOnDevice(AVPixelFormat* out_pix_fmt, AVHWDeviceTyp
|
||||||
av_hwdevice_get_type_name(type));
|
av_hwdevice_get_type_name(type));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ((config->methods & AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX) != 0 &&
|
if (config->methods & AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX && config->device_type == type) {
|
||||||
config->device_type == type) {
|
|
||||||
LOG_INFO(HW_GPU, "Using {} GPU decoder", av_hwdevice_get_type_name(type));
|
LOG_INFO(HW_GPU, "Using {} GPU decoder", av_hwdevice_get_type_name(type));
|
||||||
*out_pix_fmt = config->pix_fmt;
|
*out_pix_fmt = config->pix_fmt;
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue