* Re: [PATCH] mt9m111: mt9m111_get_global_gain() - unsigned <= 0 is always true [not found] <49311628.7090308@gmail.com> @ 2008-11-29 12:28 ` Robert Jarzmik [not found] ` <49313E77.3090209@gmail.com> 0 siblings, 1 reply; 2+ messages in thread From: Robert Jarzmik @ 2008-11-29 12:28 UTC (permalink / raw) To: roel kluin; +Cc: video4linux-list, Guennadi Liakhovetski, mchehab roel kluin <roel.kluin@gmail.com> writes: > unsigned <= 0 is always true > > Signed-off-by: Roel Kluin <roel.kluin@gmail.com> You're right, your patch is good, but ... there is another mistake I made which should be also fixed. The real formula is : gain = (data & 0x2f) * (1 << ((data >> 10) & 1)) * (1 << ((data >> 9) & 1)); That is bits 9 and 10 give a 2x gain factor. Would you please amend your patch to fix the formula please ? -- Robert -- video4linux-list mailing list Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe https://www.redhat.com/mailman/listinfo/video4linux-list ^ permalink raw reply [flat|nested] 2+ messages in thread
[parent not found: <49313E77.3090209@gmail.com>]
* Re: [PATCH v2] mt9m111: mt9m111_get_global_gain() - unsigned <= 0 is always true [not found] ` <49313E77.3090209@gmail.com> @ 2008-11-29 14:23 ` Robert Jarzmik 0 siblings, 0 replies; 2+ messages in thread From: Robert Jarzmik @ 2008-11-29 14:23 UTC (permalink / raw) To: roel kluin; +Cc: video4linux-list, Guennadi Liakhovetski, mchehab roel kluin <roel.kluin@gmail.com> writes: >> You're right, your patch is good, but ... there is another mistake I made which >> should be also fixed. >> >> The real formula is : >> gain = (data & 0x2f) * (1 << ((data >> 10) & 1)) * (1 << ((data >> 9) & 1)); >> >> That is bits 9 and 10 give a 2x gain factor. > > unsigned <= 0 is always true and fix formula > > Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Cheers. -- Robert -- video4linux-list mailing list Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe https://www.redhat.com/mailman/listinfo/video4linux-list ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-11-29 14:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <49311628.7090308@gmail.com>
2008-11-29 12:28 ` [PATCH] mt9m111: mt9m111_get_global_gain() - unsigned <= 0 is always true Robert Jarzmik
[not found] ` <49313E77.3090209@gmail.com>
2008-11-29 14:23 ` [PATCH v2] " Robert Jarzmik
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox