[sane-devel] mp780 working, but very slowly

Gernot Hassenpflug aikishugyo at gmail.com
Wed Dec 22 13:10:19 UTC 2010


On Wed, Dec 22, 2010 at 6:15 PM, Tomáš Pospíšek <tpo_deb at sourcepole.ch> wrote:
> Hello List, Nicolas, Gernot,
>
> this is a report from peter pilsl about whether current sane with Nicolas
> suggested patch here:
>
>  http://lists.alioth.debian.org/pipermail/sane-devel/2010-November/027736.html
>
> works with mp780.

I am not sure how changes to pixma_mp150.c can affect the code in
pixma_mp750.c which is what the MP780 uses.
Maybe one needs to have some other code there instead of fixed at "4",
but I found a problem with segmentation fault (maybe similar to the
issue I found in pixma_mp150.c at the time). Nicolas, does this make
any sense?

 raw_width = ALIGN_SUP (sp->w, 4);
 sp->line_size = raw_width * sp->channels * (sp->depth / 8);

in pixma_mp750.c  the CVS currently has what is commented out in
function mp750_check_param:


mp750_check_param (pixma_t * s, pixma_scan_param_t * sp)
{
  unsigned raw_width;

  UNUSED (s);

  sp->depth = 8;		/* FIXME: Does MP750 supports other depth? */

  /* original implementation */
  /*  if (sp->channels == 1)
    raw_width = ALIGN_SUP (sp->w, 12);
  else
  raw_width = ALIGN_SUP (sp->w, 4);*/

  /* GH: my initial implementation */
  /*   if ((sp->channels == 3) || (is_ccd_grayscale (s)))
    raw_width = ALIGN_SUP (sp->w, 4);
  else
  raw_width = ALIGN_SUP (sp->w, 12);*/

  /* the above code gives segmentation fault?!? why... it seems to
work in the mp750_scan function */
/* so my final version here */
  raw_width = ALIGN_SUP (sp->w, 4);

  /*sp->line_size = raw_width * sp->channels;*/
  sp->line_size = raw_width * sp->channels * (sp->depth / 8);  /* no
cropping? */
  return 0;
}


Regards,
Gernot



More information about the sane-devel mailing list