The Mali G31 GPU used with S905Y2 has excellent support in the upstream kernel, but that has nothing to do with H264/HEVC/VP9/etc. as Mali is purely a 2D (GUI) accelerator, it doesn’t process video.
There is reasonable upstream support for 8-bit/1080p H264/HEVC/VP9 if you use the right kernel and ffmpeg sources, and S905Y2 will happily software decode those and all legacy formats to the same specs. Decoding 10-bit and 4K is not possible right now due to unresolved bugs. Fixing issues in the current upstream (and submitted) code will be considerably quicker then attempting to port the vendor code (which is written around Amlogics homebrew DRM frameworks).
There is no support for Anlogic V4L2 encoding in the upstream kernel, but Amlogic’s encoders aren’t that good so it’s not a big loss. You will get better results software encoding with ffmpeg or gstreamer.