initEncode

Initializes the encoding process. Call before any calls to encode.