summaryrefslogtreecommitdiff
path: root/libavcodec/dxva2_vc1.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-08-01 19:44:22 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-08-07 09:50:29 +0200
commite35dfe864d8fb1ee9e28684a5a93e4b75d0d8092 (patch)
treebbf1004fe094653f8dc00048137f17cc4cb06ab6 /libavcodec/dxva2_vc1.c
parentc48cc9c6e90bc8ca0304bd57cb77f7a689f83391 (diff)
avcodec/avcodec: Add FFHWAccel, hide internals of AVHWAccel
This commit is the AVHWAccel analogue of commit 20f972701806be20a77f808db332d9489343bb78: It moves the private fields of AVHWAccel to a new struct FFHWAccel extending AVHWAccel in an internal header (namely hwaccel_internal.h). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/dxva2_vc1.c')
-rw-r--r--libavcodec/dxva2_vc1.c61
1 files changed, 31 insertions, 30 deletions
diff --git a/libavcodec/dxva2_vc1.c b/libavcodec/dxva2_vc1.c
index 12e3de59ec..b35fb115f7 100644
--- a/libavcodec/dxva2_vc1.c
+++ b/libavcodec/dxva2_vc1.c
@@ -23,6 +23,7 @@
#include "config_components.h"
#include "dxva2_internal.h"
+#include "hwaccel_internal.h"
#include "mpegutils.h"
#include "mpegvideodec.h"
#include "vc1.h"
@@ -376,11 +377,11 @@ static int dxva2_vc1_end_frame(AVCodecContext *avctx)
}
#if CONFIG_WMV3_DXVA2_HWACCEL
-const AVHWAccel ff_wmv3_dxva2_hwaccel = {
- .name = "wmv3_dxva2",
- .type = AVMEDIA_TYPE_VIDEO,
- .id = AV_CODEC_ID_WMV3,
- .pix_fmt = AV_PIX_FMT_DXVA2_VLD,
+const FFHWAccel ff_wmv3_dxva2_hwaccel = {
+ .p.name = "wmv3_dxva2",
+ .p.type = AVMEDIA_TYPE_VIDEO,
+ .p.id = AV_CODEC_ID_WMV3,
+ .p.pix_fmt = AV_PIX_FMT_DXVA2_VLD,
.init = ff_dxva2_decode_init,
.uninit = ff_dxva2_decode_uninit,
.start_frame = dxva2_vc1_start_frame,
@@ -393,11 +394,11 @@ const AVHWAccel ff_wmv3_dxva2_hwaccel = {
#endif
#if CONFIG_VC1_DXVA2_HWACCEL
-const AVHWAccel ff_vc1_dxva2_hwaccel = {
- .name = "vc1_dxva2",
- .type = AVMEDIA_TYPE_VIDEO,
- .id = AV_CODEC_ID_VC1,
- .pix_fmt = AV_PIX_FMT_DXVA2_VLD,
+const FFHWAccel ff_vc1_dxva2_hwaccel = {
+ .p.name = "vc1_dxva2",
+ .p.type = AVMEDIA_TYPE_VIDEO,
+ .p.id = AV_CODEC_ID_VC1,
+ .p.pix_fmt = AV_PIX_FMT_DXVA2_VLD,
.init = ff_dxva2_decode_init,
.uninit = ff_dxva2_decode_uninit,
.start_frame = dxva2_vc1_start_frame,
@@ -410,11 +411,11 @@ const AVHWAccel ff_vc1_dxva2_hwaccel = {
#endif
#if CONFIG_WMV3_D3D11VA_HWACCEL
-const AVHWAccel ff_wmv3_d3d11va_hwaccel = {
- .name = "wmv3_d3d11va",
- .type = AVMEDIA_TYPE_VIDEO,
- .id = AV_CODEC_ID_WMV3,
- .pix_fmt = AV_PIX_FMT_D3D11VA_VLD,
+const FFHWAccel ff_wmv3_d3d11va_hwaccel = {
+ .p.name = "wmv3_d3d11va",
+ .p.type = AVMEDIA_TYPE_VIDEO,
+ .p.id = AV_CODEC_ID_WMV3,
+ .p.pix_fmt = AV_PIX_FMT_D3D11VA_VLD,
.init = ff_dxva2_decode_init,
.uninit = ff_dxva2_decode_uninit,
.start_frame = dxva2_vc1_start_frame,
@@ -427,11 +428,11 @@ const AVHWAccel ff_wmv3_d3d11va_hwaccel = {
#endif
#if CONFIG_WMV3_D3D11VA2_HWACCEL
-const AVHWAccel ff_wmv3_d3d11va2_hwaccel = {
- .name = "wmv3_d3d11va2",
- .type = AVMEDIA_TYPE_VIDEO,
- .id = AV_CODEC_ID_WMV3,
- .pix_fmt = AV_PIX_FMT_D3D11,
+const FFHWAccel ff_wmv3_d3d11va2_hwaccel = {
+ .p.name = "wmv3_d3d11va2",
+ .p.type = AVMEDIA_TYPE_VIDEO,
+ .p.id = AV_CODEC_ID_WMV3,
+ .p.pix_fmt = AV_PIX_FMT_D3D11,
.init = ff_dxva2_decode_init,
.uninit = ff_dxva2_decode_uninit,
.start_frame = dxva2_vc1_start_frame,
@@ -444,11 +445,11 @@ const AVHWAccel ff_wmv3_d3d11va2_hwaccel = {
#endif
#if CONFIG_VC1_D3D11VA_HWACCEL
-const AVHWAccel ff_vc1_d3d11va_hwaccel = {
- .name = "vc1_d3d11va",
- .type = AVMEDIA_TYPE_VIDEO,
- .id = AV_CODEC_ID_VC1,
- .pix_fmt = AV_PIX_FMT_D3D11VA_VLD,
+const FFHWAccel ff_vc1_d3d11va_hwaccel = {
+ .p.name = "vc1_d3d11va",
+ .p.type = AVMEDIA_TYPE_VIDEO,
+ .p.id = AV_CODEC_ID_VC1,
+ .p.pix_fmt = AV_PIX_FMT_D3D11VA_VLD,
.init = ff_dxva2_decode_init,
.uninit = ff_dxva2_decode_uninit,
.start_frame = dxva2_vc1_start_frame,
@@ -461,11 +462,11 @@ const AVHWAccel ff_vc1_d3d11va_hwaccel = {
#endif
#if CONFIG_VC1_D3D11VA2_HWACCEL
-const AVHWAccel ff_vc1_d3d11va2_hwaccel = {
- .name = "vc1_d3d11va2",
- .type = AVMEDIA_TYPE_VIDEO,
- .id = AV_CODEC_ID_VC1,
- .pix_fmt = AV_PIX_FMT_D3D11,
+const FFHWAccel ff_vc1_d3d11va2_hwaccel = {
+ .p.name = "vc1_d3d11va2",
+ .p.type = AVMEDIA_TYPE_VIDEO,
+ .p.id = AV_CODEC_ID_VC1,
+ .p.pix_fmt = AV_PIX_FMT_D3D11,
.init = ff_dxva2_decode_init,
.uninit = ff_dxva2_decode_uninit,
.start_frame = dxva2_vc1_start_frame,