h264: miscellaneous micro-optimisations