encoding/mtf optimizations