cpml: add support for custom offset algorithm