/* Each passed coefficient array must be the right size for that coefficient: width_in_blocks wide and height_in_blocks high, with unitheight at least v_samp_factor.  */
transencode_coef_controller(j_compress_ptr cinfo, jvirt_barray_ptr *coef_arrays)
/* Each passed coefficient array must be the right size for that coefficient: width_in_blocks wide and height_in_blocks high, with unitheight at least v_samp_factor.  */
transencode_coef_controller(j_compress_ptr cinfo, jvirt_barray_ptr *coef_arrays)
{
  my_coef_ptr coef;
  JBLOCKROW buffer;
  int i;
  coef = (my_coef_ptr)
    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
				SIZEOF(my_coef_controller));
  cinfo->coef = &coef->pub;
  coef->pub.start_pass = start_pass_coef;
  coef->pub.compress_data = compress_output;
  coef->whole_image = coef_arrays;
  buffer = (JBLOCKROW)
    (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE,
				C_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK));
  FMEMZERO((void FAR *) buffer, C_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK));
  for (i = 0; i < C_MAX_BLOCKS_IN_MCU; i++) {
    coef->dummy_buffer[i] = buffer + i;
  }
}