Encoder: directly use the surface object of the input surface