Re: [New Driver]: usbvideo2 webcam core + pac207 driver using it.

Hans de Goede <[email protected]>
Newsgroups gmane.linux.drivers.spca50x.devel,gmane.linux.redhat.fedora.kernel,gmane.comp.video.video4linux
Message-ID <[email protected]>
Pete Zaitcev wrote:
>>> #define CLIP(color) (unsigned char)(((color)>0xFF)?0xff:(((color)<0)?0:(color)))
>> Add a comment about what this is doing?  Could you just do it as a
>> static function instead?
> 
> The macro itself is too trivial to be commented, IMHO, but I have
> to ask just what it is doing there. It is only applied to
> precomputed values from pac207_decompress_table, as far as I see.
> So, they cannot be out of range. Or can they?
> 

Its being applied to the addition of a value read from the sensor and a 
precomputed value from the pac207_decompress_table, and the total of these can 
be out of range.

Regards,

Hans

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Register now and save $200. Hurry, offer ends at 11:59 p.m., 
Monday, April 7! Use priority code J8TLD2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.