diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-08-01 19:44:22 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-08-07 09:50:29 +0200 |
commit | e35dfe864d8fb1ee9e28684a5a93e4b75d0d8092 (patch) | |
tree | bbf1004fe094653f8dc00048137f17cc4cb06ab6 /libavcodec/dxva2_hevc.c | |
parent | c48cc9c6e90bc8ca0304bd57cb77f7a689f83391 (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_hevc.c')
-rw-r--r-- | libavcodec/dxva2_hevc.c | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/libavcodec/dxva2_hevc.c b/libavcodec/dxva2_hevc.c index 6b239d9917..b6c08943f0 100644 --- a/libavcodec/dxva2_hevc.c +++ b/libavcodec/dxva2_hevc.c @@ -27,6 +27,7 @@ #include "dxva2_internal.h" #include "hevc_data.h" #include "hevcdec.h" +#include "hwaccel_internal.h" #define MAX_SLICES 256 @@ -420,11 +421,11 @@ static int dxva2_hevc_end_frame(AVCodecContext *avctx) } #if CONFIG_HEVC_DXVA2_HWACCEL -const AVHWAccel ff_hevc_dxva2_hwaccel = { - .name = "hevc_dxva2", - .type = AVMEDIA_TYPE_VIDEO, - .id = AV_CODEC_ID_HEVC, - .pix_fmt = AV_PIX_FMT_DXVA2_VLD, +const FFHWAccel ff_hevc_dxva2_hwaccel = { + .p.name = "hevc_dxva2", + .p.type = AVMEDIA_TYPE_VIDEO, + .p.id = AV_CODEC_ID_HEVC, + .p.pix_fmt = AV_PIX_FMT_DXVA2_VLD, .init = ff_dxva2_decode_init, .uninit = ff_dxva2_decode_uninit, .start_frame = dxva2_hevc_start_frame, @@ -437,11 +438,11 @@ const AVHWAccel ff_hevc_dxva2_hwaccel = { #endif #if CONFIG_HEVC_D3D11VA_HWACCEL -const AVHWAccel ff_hevc_d3d11va_hwaccel = { - .name = "hevc_d3d11va", - .type = AVMEDIA_TYPE_VIDEO, - .id = AV_CODEC_ID_HEVC, - .pix_fmt = AV_PIX_FMT_D3D11VA_VLD, +const FFHWAccel ff_hevc_d3d11va_hwaccel = { + .p.name = "hevc_d3d11va", + .p.type = AVMEDIA_TYPE_VIDEO, + .p.id = AV_CODEC_ID_HEVC, + .p.pix_fmt = AV_PIX_FMT_D3D11VA_VLD, .init = ff_dxva2_decode_init, .uninit = ff_dxva2_decode_uninit, .start_frame = dxva2_hevc_start_frame, @@ -454,11 +455,11 @@ const AVHWAccel ff_hevc_d3d11va_hwaccel = { #endif #if CONFIG_HEVC_D3D11VA2_HWACCEL -const AVHWAccel ff_hevc_d3d11va2_hwaccel = { - .name = "hevc_d3d11va2", - .type = AVMEDIA_TYPE_VIDEO, - .id = AV_CODEC_ID_HEVC, - .pix_fmt = AV_PIX_FMT_D3D11, +const FFHWAccel ff_hevc_d3d11va2_hwaccel = { + .p.name = "hevc_d3d11va2", + .p.type = AVMEDIA_TYPE_VIDEO, + .p.id = AV_CODEC_ID_HEVC, + .p.pix_fmt = AV_PIX_FMT_D3D11, .init = ff_dxva2_decode_init, .uninit = ff_dxva2_decode_uninit, .start_frame = dxva2_hevc_start_frame, |