This improves behaviour with drivers which do not support packed headers, such as AMD VCE on mesa/gallium.
This allows better checking of capabilities and will make it easier to add more functionality later. It also commonises some duplicated code around rate control setup and adds more comments explaining the internals.
Signed-off-by: Anton Khirnov <anton@khirnov.net>