aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/hevcdec.c
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2017-10-26 00:18:40 +0100
committerMark Thompson <sw@jkqxz.net>2017-12-19 23:21:59 +0000
commit2fcb0090115f7fc7648ad241a5903f866760d4b6 (patch)
tree720375d0c7be01d847b47ad58c254363c281af74 /libavcodec/hevcdec.c
parent720cf4e6e7dcaa4032b9448cb6b6cc4671a6f108 (diff)
downloadffmpeg-2fcb0090115f7fc7648ad241a5903f866760d4b6.tar.gz
lavc: Add hardware config metadata for decoders supporting hardware output
This includes a pointer to the associated hwaccel for decoders using hwaccels - these will be used later to implement the hwaccel setup without needing a global list. Also added is a new file listing all hwaccels as external declarations - this will be used later to generate the hwaccel list at configure time.
Diffstat (limited to 'libavcodec/hevcdec.c')
-rw-r--r--libavcodec/hevcdec.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
index f1d1c77497..130b99f77e 100644
--- a/libavcodec/hevcdec.c
+++ b/libavcodec/hevcdec.c
@@ -39,6 +39,7 @@
#include "hevc.h"
#include "hevc_data.h"
#include "hevcdec.h"
+#include "hwaccel.h"
#include "profiles.h"
const uint8_t ff_hevc_qpel_extra_before[4] = { 0, 3, 3, 3 };
@@ -3120,4 +3121,25 @@ AVCodec ff_hevc_decoder = {
AV_CODEC_CAP_FRAME_THREADS,
.profiles = NULL_IF_CONFIG_SMALL(ff_hevc_profiles),
.caps_internal = FF_CODEC_CAP_EXPORTS_CROPPING | FF_CODEC_CAP_INIT_THREADSAFE,
+ .hw_configs = (const AVCodecHWConfigInternal*[]) {
+#if CONFIG_HEVC_CUVID_HWACCEL
+ HWACCEL_CUVID(hevc),
+#endif
+#if CONFIG_HEVC_DXVA2_HWACCEL
+ HWACCEL_DXVA2(hevc),
+#endif
+#if CONFIG_HEVC_D3D11VA_HWACCEL
+ HWACCEL_D3D11VA(hevc),
+#endif
+#if CONFIG_HEVC_D3D11VA2_HWACCEL
+ HWACCEL_D3D11VA2(hevc),
+#endif
+#if CONFIG_HEVC_VAAPI_HWACCEL
+ HWACCEL_VAAPI(hevc),
+#endif
+#if CONFIG_HEVC_VDPAU_HWACCEL
+ HWACCEL_VDPAU(hevc),
+#endif
+ NULL
+ },
};