vaapi: fixes and optimizations

see title