rc_encode: Drop unneeded casts.