encoding: Factor out encode_rbb to help testing
2 files changed