[FFmpeg-devel] [PATCH v2] avcodec: add D3D12VA hardware accelerated H264, HEVC, VP9, and AV1 decoding

Hendrik Leppkes h.leppkes at gmail.com
Tue Apr 11 20:28:01 EEST 2023


On Tue, Apr 11, 2023 at 6:41 PM Wu Jianhua <toqsxw at outlook.com> wrote:
>
> > From: Hendrik Leppkes<mailto:h.leppkes at gmail.com>
> > Sent: 2023年3月1日 23:55
> > To: FFmpeg development discussions and patches<mailto:ffmpeg-devel at ffmpeg.org>
> > Subject: Re: [FFmpeg-devel] [PATCH v2] avcodec: add D3D12VA hardware accelerated H264, HEVC, VP9, and AV1 decoding
> >
> > On Fri, Dec 23, 2022 at 7:01 PM Wu Jianhua <toqsxw at outlook.com> wrote:
> >>
> >> [PATCH v2] avcodec: add D3D12VA hardware accelerated H264, HEVC, VP9, and AV1 decoding
> >>
> >> Patches attached.
> >>
> >
> > The naming scheme on this seems to be rather inconsistent. Both
> > "d3d12dec" and "d3d12va" seem to be used in different places - please
> > standardize it all on "d3d12va", it matches d3d11va and remains
> > consistent with itself.
>
> Hi Hendrik,
>
> The d3d12 supports video encoding that d3d11 does not, so I cannot use
> d3d12va_h264 just like d3d11va_h264. I think to reserve d3d12enc_h264/hevc/vp9/av1
> for d3d12 video encoding and use d3d12dec_h264/hevc/vp9/av1 for d3d12 video
> decoding now. If we want to use the d3d12va naming scheme, we might have
> to use some name like d3d12va_dec_h264 to distinguish decoder and encoder.
> What do you think?
>

Why do you need codec specific files for decoding?
I would assume the actual information structures remain the same, and
dxva2_<codec>.c can be used, just as its used for both dxva2 and
d3d11va now.
There should be no code duplication here, as that will make it very
easy to add new codecs in the future, one addition rather then
multiple.

This would then easily allow you to have "d3d12va" as the general
module and hwaccel name, and have a singular "d3d12vadec.c" for the
decoder, with any extra encoding files as needed.

- Hendrik


More information about the ffmpeg-devel mailing list