ratecontrol: Move mpegenc-only function where it is used