More AVhwaccel hunks from Gwenole Beauchesne.