Merge "twopass_encoder: Separate functions for first and second pass."