aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/host1x/ffmpeg/ffmpeg.cpp
diff options
context:
space:
mode:
authorMaranBr <maranbr@noreply.localhost>2025-05-29 21:20:13 +0000
committerMaranBr <maranbr@noreply.localhost>2025-05-29 21:20:13 +0000
commit621d1c3d8a56b2612b13dac6682f5600112d588c (patch)
tree8c2d899c78998189fc3105ff712f0de701a3f7b0 /src/video_core/host1x/ffmpeg/ffmpeg.cpp
parent7f16f122026a950bcd23236efc4766194e393501 (diff)
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
Diffstat (limited to 'src/video_core/host1x/ffmpeg/ffmpeg.cpp')
-rw-r--r--src/video_core/host1x/ffmpeg/ffmpeg.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/video_core/host1x/ffmpeg/ffmpeg.cpp b/src/video_core/host1x/ffmpeg/ffmpeg.cpp
index fe85efaab3..95394b5d2f 100644
--- a/src/video_core/host1x/ffmpeg/ffmpeg.cpp
+++ b/src/video_core/host1x/ffmpeg/ffmpeg.cpp
@@ -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;