Initialize encode structure