/* Special start-of-pass hook. This is called by jpeg_write_scanlines if call_pass_startup is TRUE. In single-pass processing, we need this hook because we don't want to write frame/scan headers during jpeg_start_compress; we want to let the application write COM markers etc. between jpeg_start_compress and the jpeg_write_scanlines loop. In multi-pass processing, this routine is not used.  */
pass_startup(j_compress_ptr cinfo)
/* Special start-of-pass hook. This is called by jpeg_write_scanlines if call_pass_startup is TRUE. In single-pass processing, we need this hook because we don't want to write frame/scan headers during jpeg_start_compress; we want to let the application write COM markers etc. between jpeg_start_compress and the jpeg_write_scanlines loop. In multi-pass processing, this routine is not used.  */
pass_startup(j_compress_ptr cinfo)
{
    cinfo->master->call_pass_startup = FALSE;
    (*cinfo->marker->write_frame_header) (cinfo);
    (*cinfo->marker->write_scan_header) (cinfo);
}