private bool prepare_for_huff_opt_pass()
{
/* Do Huffman optimization for a scan after the first one. */
select_scan_parameters();
per_scan_setup();
if (m_cinfo.m_Ss != 0 || m_cinfo.m_Ah == 0)
{
m_cinfo.m_entropy.start_pass(true);
m_cinfo.m_coef.start_pass(J_BUF_MODE.JBUF_CRANK_DEST);
m_call_pass_startup = false;
return false;
}
/* Special case: Huffman DC refinement scans need no Huffman table
* and therefore we can skip the optimization pass for them.
*/
m_pass_type = c_pass_type.output_pass;
m_pass_number++;
return true;
}