I\'ve seen various examples of using libavcodec with vaapi to accelerated decoding, but how do you use it to accelerate encoding?
FFMPEG does not currently (as of 10-01-2014) support encoding with the VAAPI. It currently only supports decoding with VAAPI.
Update 2020: FFMPEG now supports fully supports VAAPI.