finish encoding determination