ratecontrol: avoid reads past the end of chroma buffers
Merge with stable