summaryrefslogtreecommitdiff
path: root/libavcodec/vp9.c
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2017-10-26 00:18:40 +0100
committerMark Thompson <sw@jkqxz.net>2017-11-26 21:35:53 +0000
commit758fbc54fef2f31957b5c5f22e05e5fd9b04f631 (patch)
tree45b66ac7797cec7968add561498acf75cc4871c2 /libavcodec/vp9.c
parent24cc0a53e99e281b0ff502e82e7cf857111eca3f (diff)
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/vp9.c')
-rw-r--r--libavcodec/vp9.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index 6ce9be61bb..1ea2869c4c 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -23,6 +23,7 @@
#include "avcodec.h"
#include "get_bits.h"
+#include "hwaccel.h"
#include "internal.h"
#include "profiles.h"
#include "thread.h"
@@ -1794,4 +1795,22 @@ AVCodec ff_vp9_decoder = {
.init_thread_copy = ONLY_IF_THREADS_ENABLED(vp9_decode_init_thread_copy),
.update_thread_context = ONLY_IF_THREADS_ENABLED(vp9_decode_update_thread_context),
.profiles = NULL_IF_CONFIG_SMALL(ff_vp9_profiles),
+ .hw_configs = (const AVCodecHWConfigInternal*[]) {
+#if CONFIG_VP9_DXVA2_HWACCEL
+ HWACCEL_DXVA2(vp9),
+#endif
+#if CONFIG_VP9_D3D11VA_HWACCEL
+ HWACCEL_D3D11VA(vp9),
+#endif
+#if CONFIG_VP9_D3D11VA2_HWACCEL
+ HWACCEL_D3D11VA2(vp9),
+#endif
+#if CONFIG_VP9_NVDEC_HWACCEL
+ HWACCEL_NVDEC(vp9),
+#endif
+#if CONFIG_VP9_VAAPI_HWACCEL
+ HWACCEL_VAAPI(vp9),
+#endif
+ NULL
+ },
};