private void transencode_master_selection(jvirt_array<JBLOCK>[] coef_arrays)
{
/* Initialize master control (includes parameter checking/processing) */
jinit_c_master_control(true /* transcode only */);
/* Entropy encoding: only Huffman or arithmetic coding. */
if (arith_code)
m_entropy = new arith_entropy_encoder(this);
else
m_entropy = new huff_entropy_encoder(this);
/* We need a special coefficient buffer controller. */
m_coef = new my_trans_c_coef_controller(this, coef_arrays);
m_marker = new jpeg_marker_writer(this);
/* Write the datastream header (SOI, JFIF) immediately.
* Frame and scan headers are postponed till later.
* This lets application insert special markers after the SOI.
*/
m_marker.write_file_header();
}