[FFmpeg-devel] [PATCH] dxva2: add AV1 decode support

Hendrik Leppkes h.leppkes at gmail.com
Fri Nov 6 10:39:09 EET 2020


On Fri, Nov 6, 2020 at 2:29 AM Mark Thompson <sw at jkqxz.net> wrote:
>
> On 05/11/2020 15:53, Hendrik Leppkes wrote:
> > ---
> >   Changelog              |   1 +
> >   configure              |   7 +
> >   libavcodec/Makefile    |   2 +
> >   libavcodec/av1dec.c    |  25 +-
> >   libavcodec/dxva2.c     |  10 +-
> >   libavcodec/dxva2_av1.c | 504 +++++++++++++++++++++++++++++++++++++++++
> >   libavcodec/hwaccels.h  |   3 +
> >   libavcodec/version.h   |   2 +-
> >   8 files changed, 550 insertions(+), 4 deletions(-)
> >   create mode 100644 libavcodec/dxva2_av1.c
> >
> > ...
> > diff --git a/libavcodec/dxva2_av1.c b/libavcodec/dxva2_av1.c
> > new file mode 100644
> > index 0000000000..d04c96becf
> > --- /dev/null
> > +++ b/libavcodec/dxva2_av1.c
> > @@ -0,0 +1,504 @@
> > ...
> > +    // XXX: setting the StatusReportFeedbackNumber breaks decoding on some drivers
> > +    // we never use the status reporting functionality, so just skip on that
> > +    //pp->StatusReportFeedbackNumber = 1 + DXVA_CONTEXT_REPORT_ID(avctx, ctx)++;
>
> If it's worth mentioning this at all then it would probably help to note exactly what drivers are breaking.

The status report functionality is a bit arcane and I have never seen
a proper use of it yet, but historically we have always set those
numbers just in case someone wants to use it, and I chased weird
breakage for a day until I found the reason, so the comment is more to
the benefit for anyone ever being in the same situation.
I could document which exact driver this was with, but on the other
hand it is unlikely to ever get enabled because it is just not used.

>
> > +    return 0;
> > +}
> > +
>
> Is there is an Intel implementation of this yet?  Maybe poke one of the Intel people to try it if possible.
>

I'm currently in contact with someone from Intel to test the patch on
their Gen12 GPUs.

- Hendrik


More information about the ffmpeg-devel mailing list