[sane-devel] [PATCH] epkowa: 16-bit on Epson 4490

Carl Troein carl.troein at ed.ac.uk
Sat May 24 11:05:37 UTC 2008

Hi all,
A while back I got an Epson Perfection 4490 Photo and found out that the
16-bit scanning didn't work, so I made a patch for the epkowa driver to
fix the problem. I posted it on the avasys message board, but evidently
didn't do enough research to find out that I could've posted it here.
Now Johannes Meixner has alerted me to the fact that Olaf Meeuwissen is
active on this list and the epkowa driver is indeed on-topic.

My patch has been mentioned on this list before:
but now I've split it into the actual 16-bit fix and some entirely
optional code cosmetics.

The reason that 16-bit scanning didn't work is that the 4490 is a 'D'
level scanner, which means that it doesn't do colour correction. Instead,
the driver does this (which means that 16-bit raw data from the scanner
is all the more important to reduce discretization) but the driver
assumes that the data is 8-bit RGB. So the first patch merely adds a
16-bit version of color_correct and a check for the depth. The modified
code path is only reachable for D-level scanners and should change
nothing for the 8-bit case.

The second and third patch are just minor cleanup that should have no
noticable effects except on code size. The first-middle-last cases of
the data download are rolled into a smaller (and IMHO more readable)
loop, and a redundant memset is removed.


   Carl Troein - carl.troein at ed.ac.uk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: level_D_16_bit.patch
Type: text/x-patch
Size: 3435 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20080524/3aededc8/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main_loop_deunroll.patch
Type: text/x-patch
Size: 4847 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20080524/3aededc8/attachment-0001.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: minor_cleanup.patch
Type: text/x-patch
Size: 555 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20080524/3aededc8/attachment-0002.bin 

More information about the sane-devel mailing list