vaapi_encode: Refactor initialisation