summaryrefslogtreecommitdiff
path: root/libavcodec/vc1dec.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/vc1dec.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/vc1dec.c')
-rw-r--r--libavcodec/vc1dec.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 96b8bb5364..ac4cfed2c8 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -29,6 +29,7 @@
#include "avcodec.h"
#include "blockdsp.h"
#include "get_bits.h"
+#include "hwaccel.h"
#include "internal.h"
#include "mpeg_er.h"
#include "mpegvideo.h"
@@ -1144,6 +1145,27 @@ AVCodec ff_vc1_decoder = {
.flush = ff_mpeg_flush,
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
.pix_fmts = vc1_hwaccel_pixfmt_list_420,
+ .hw_configs = (const AVCodecHWConfigInternal*[]) {
+#if CONFIG_WMV3_DXVA2_HWACCEL
+ HWACCEL_DXVA2(wmv3),
+#endif
+#if CONFIG_WMV3_D3D11VA_HWACCEL
+ HWACCEL_D3D11VA(wmv3),
+#endif
+#if CONFIG_WMV3_D3D11VA2_HWACCEL
+ HWACCEL_D3D11VA2(wmv3),
+#endif
+#if CONFIG_WMV3_NVDEC_HWACCEL
+ HWACCEL_NVDEC(wmv3),
+#endif
+#if CONFIG_WMV3_VAAPI_HWACCEL
+ HWACCEL_VAAPI(wmv3),
+#endif
+#if CONFIG_WMV3_VDPAU_HWACCEL
+ HWACCEL_VDPAU(wmv3),
+#endif
+ NULL
+ },
.profiles = NULL_IF_CONFIG_SMALL(ff_vc1_profiles)
};
@@ -1160,6 +1182,27 @@ AVCodec ff_wmv3_decoder = {
.flush = ff_mpeg_flush,
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
.pix_fmts = vc1_hwaccel_pixfmt_list_420,
+ .hw_configs = (const AVCodecHWConfigInternal*[]) {
+#if CONFIG_VC1_DXVA2_HWACCEL
+ HWACCEL_DXVA2(wmv3),
+#endif
+#if CONFIG_VC1_D3D11VA_HWACCEL
+ HWACCEL_D3D11VA(wmv3),
+#endif
+#if CONFIG_VC1_D3D11VA2_HWACCEL
+ HWACCEL_D3D11VA2(wmv3),
+#endif
+#if CONFIG_VC1_NVDEC_HWACCEL
+ HWACCEL_NVDEC(wmv3),
+#endif
+#if CONFIG_VC1_VAAPI_HWACCEL
+ HWACCEL_VAAPI(wmv3),
+#endif
+#if CONFIG_VC1_VDPAU_HWACCEL
+ HWACCEL_VDPAU(wmv3),
+#endif
+ NULL
+ },
.profiles = NULL_IF_CONFIG_SMALL(ff_vc1_profiles)
};
#endif