Disclaimer: I'm not a pro coder and my "investigation" of the issue might be wrong.
These are 2 different bugs in mesa 20.x.
First
https://gitlab.freedesktop.org/mesa/mesa/issues/2454 -
https://gitlab.freedesktop.org/mesa/mesa...6cc0a4dcbb
The commit above is totally wrong:
1)
https://gitlab.freedesktop.org/mesa/mesa...26_277_301 it deletes the original surface thus invalidating VASurfaceID hence "invalid VASurfaceID" errors in the log.
Edit: and looks totlaly wrong to me - why deinterlace NV12 in vlVaDeriveImage() ?
Why deinterlace is forced when no one "asked" for the surface to be deinterlaced ?
They "fixed" a VLC related bug, but broke others ...
2) It somehow enables software postprocessing in Kodi (like with Intel driver) - options "Deintelace" and "Bob" shouldn't be available on amd, because amd driver does not implement/allow copying frames back to memory and Kodi crashes in copy_frame() function.
I have a ryzen 2400g with kernel 5.5.x and mesa 20.
Reverting the aforementioned commit removes sofware Deinterlace,Bob and there no longer any "invalid VASurfaceID" errors in the log
Vaapi-madi works fine for me.
Vaapi-bob is exacty as originally described - halfscreen video with the lower half being a corrupted mess.
So it is broken in more places than one.
So far I wasn't able to find the origin of vaapi-bob issues, but I'm convinced that it's mesa problem and not Kodi.
Rant:
Amd (re)learned how to make great hardware but their drivers (both windows and linux) are written by monkeys.