aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/dxva2_h264.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_h264.c
parentc48cc9c6e90bc8ca0304bd57cb77f7a689f83391 (diff)
downloadffmpeg-e35dfe864d8fb1ee9e28684a5a93e4b75d0d8092.tar.gz
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_h264.c')
-rw-r--r--libavcodec/dxva2_h264.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/libavcodec/dxva2_h264.c b/libavcodec/dxva2_h264.c
index 6300b1418d..20e64f848d 100644
--- a/libavcodec/dxva2_h264.c
+++ b/libavcodec/dxva2_h264.c
@@ -28,6 +28,7 @@
#include "h264dec.h"
#include "h264data.h"
#include "h264_ps.h"
+#include "hwaccel_internal.h"
#include "mpegutils.h"
struct dxva2_picture_context {
@@ -516,11 +517,11 @@ static int dxva2_h264_end_frame(AVCodecContext *avctx)
}
#if CONFIG_H264_DXVA2_HWACCEL
-const AVHWAccel ff_h264_dxva2_hwaccel = {
- .name = "h264_dxva2",
- .type = AVMEDIA_TYPE_VIDEO,
- .id = AV_CODEC_ID_H264,
- .pix_fmt = AV_PIX_FMT_DXVA2_VLD,
+const FFHWAccel ff_h264_dxva2_hwaccel = {
+ .p.name = "h264_dxva2",
+ .p.type = AVMEDIA_TYPE_VIDEO,
+ .p.id = AV_CODEC_ID_H264,
+ .p.pix_fmt = AV_PIX_FMT_DXVA2_VLD,
.init = ff_dxva2_decode_init,
.uninit = ff_dxva2_decode_uninit,
.start_frame = dxva2_h264_start_frame,
@@ -533,11 +534,11 @@ const AVHWAccel ff_h264_dxva2_hwaccel = {
#endif
#if CONFIG_H264_D3D11VA_HWACCEL
-const AVHWAccel ff_h264_d3d11va_hwaccel = {
- .name = "h264_d3d11va",
- .type = AVMEDIA_TYPE_VIDEO,
- .id = AV_CODEC_ID_H264,
- .pix_fmt = AV_PIX_FMT_D3D11VA_VLD,
+const FFHWAccel ff_h264_d3d11va_hwaccel = {
+ .p.name = "h264_d3d11va",
+ .p.type = AVMEDIA_TYPE_VIDEO,
+ .p.id = AV_CODEC_ID_H264,
+ .p.pix_fmt = AV_PIX_FMT_D3D11VA_VLD,
.init = ff_dxva2_decode_init,
.uninit = ff_dxva2_decode_uninit,
.start_frame = dxva2_h264_start_frame,
@@ -550,11 +551,11 @@ const AVHWAccel ff_h264_d3d11va_hwaccel = {
#endif
#if CONFIG_H264_D3D11VA2_HWACCEL
-const AVHWAccel ff_h264_d3d11va2_hwaccel = {
- .name = "h264_d3d11va2",
- .type = AVMEDIA_TYPE_VIDEO,
- .id = AV_CODEC_ID_H264,
- .pix_fmt = AV_PIX_FMT_D3D11,
+const FFHWAccel ff_h264_d3d11va2_hwaccel = {
+ .p.name = "h264_d3d11va2",
+ .p.type = AVMEDIA_TYPE_VIDEO,
+ .p.id = AV_CODEC_ID_H264,
+ .p.pix_fmt = AV_PIX_FMT_D3D11,
.init = ff_dxva2_decode_init,
.uninit = ff_dxva2_decode_uninit,
.start_frame = dxva2_h264_start_frame,