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

Hendrik Leppkes h.leppkes at gmail.com
Thu Nov 5 20:29:39 EET 2020


On Thu, Nov 5, 2020 at 7:12 PM James Almer <jamrial at gmail.com> wrote:
> >
> > That depends on the behavior of av1dec. Are all tile groups guaranteed
> > to be available at the same time, so that I can simply save pointers
> > to them, and copy them into the final buffer later?
>
> Not currently, in theory, but can be easily done by storing a reference
> to the AVBufferRef in each TileGroupInfo.
>
> That being said, i don't know if the decoder can handle split/incomplete
> Temporal Units as is. Guess it's a matter of injecting the
> av1_frame_split bsf and see how badly it explodes.
> If we enforce Temporal Units to be fully contained in a packet (As they
> are muxed into ivf, mp4, webm, annexb, etc), or at least individual
> Frames (Header + Tile Group/s combinations), we could also avoid the
> memcpy in dxva2_av1_decode_slice().

One memcpy will always have to remain, from the packet to the hardware
buffer. If we can guarantee that all tile groups are present at the
same time, then I could copy them straight to the hardware buffer
during end_frame, instead of buffering them.
But then tile groups are not that common, so I wouldn't see this as a
big blocker and we can clean that up when av1dec can ensure the
presence of the data.

- Hendrik


More information about the ffmpeg-devel mailing list