simplify encoder interface and remove EncoderFrame2