so I played around with vp9 enciding a bit more.
apoarently there is vp9 lossless mode, and additionally libvpx can support
high bit depth if configured so.
I also tried to remove (currently unused?) libavdevice build from ffmpeg,
and fix termux breakage (libandroid-shmem lib was missing)
try attached patches and check if vdpau/vaapi still works?