[3.0] add a hardware-only AV1 decoder via libavcodec
This is a backport of !2459 (merged) adapted to 3.0, starting with some AV1 packetizer backports.
- opens the decoder normally and then creates the VA with the proper
AVCodecContext
fields - the VA is not allowed to change after that (this is the case for AV1)
- there is a flag to tell the decoder is hardware only to forbid fallback to software decoding (we want to use dav1d in this case)
AV1 either has a sequence header in files that cannot change during the whole file, or the packetizer detects sequence header changes and restart the decoder accordingly (OBU files concatenated).
This is a more stable alternative to !1705 (closed) which relies on an unmerged dav1d patch and should work for VAAPI and VDPAU as well.