On Sat, 30 May 2009, Trent Piepho wrote: > Mauro, > > Please pull from http://linuxtv.org/hg/~tap/v4l-dvb > > This series adds a function for bounding and alignment image sizes and > modifies a number of drivers to use it. It came up when the pxa patches to > deal with the alignment issues for that driver were posted. I haven't > tested these patches for pxa. > > for the following 14 changesets: > > 01/14: compat: handle __fls > http://linuxtv.org/hg/~tap/v4l-dvb?cmd=changeset;node=c4b55ce6c273 > > 02/14: v4l2: Create helper function for bounding and aligning images > http://linuxtv.org/hg/~tap/v4l-dvb?cmd=changeset;node=b4d3ec8d363d I am sorry, I will not bother with saving, reformatting, pasting... Just wanted to ask about this place: + if (walign + halign < salign) { + /* Max walign where there is still a valid width */ + unsigned int wmaxa = __fls(wmax ^ (wmin - 1)); I cannot follow correctness of the above, sorry. Take a simple example: wmax=0x7f, wmin=7, wmaxa = __fls(0x7f ^ 6) = __fls(0x79) = 0. And the comment says it's the "maximum walign where there is still a valid width." What am I missing? + + /* up the smaller alignment until we have enough */ + do { + if (walign <= halign && walign < wmaxa) { > > 03/14: pxa-camera: Use v4l bounding/alignment function > http://linuxtv.org/hg/~tap/v4l-dvb?cmd=changeset;node=cb48209c1841 And this one uses the salign functionality of v4l_bound_align_image(), so... > > 04/14: sh_mobile_ceu_camera: Use v4l bounding/alignment function > http://linuxtv.org/hg/~tap/v4l-dvb?cmd=changeset;node=08dc3db16e9a > > 05/14: zoran: Use v4l bounding/alignment functiob > http://linuxtv.org/hg/~tap/v4l-dvb?cmd=changeset;node=d65d274ca9da > > 06/14: vivi: Use v4l bounding/alignment function > http://linuxtv.org/hg/~tap/v4l-dvb?cmd=changeset;node=67a3342606c2 > > 07/14: saa7134: Use v4l bounding/alignment function > http://linuxtv.org/hg/~tap/v4l-dvb?cmd=changeset;node=8e79122888da > > 08/14: cx88: Use v4l bounding/alignment function > http://linuxtv.org/hg/~tap/v4l-dvb?cmd=changeset;node=7dc2db9c0b34 > > 09/14: w8968cf: Use v4l bounding/alignment function > http://linuxtv.org/hg/~tap/v4l-dvb?cmd=changeset;node=1733bbc12c3a > > 10/14: cx23885: Use v4l bounding/alignment function > http://linuxtv.org/hg/~tap/v4l-dvb?cmd=changeset;node=605ec680bd75 > > 11/14: mt9: Use v4l bounding/alignment function > http://linuxtv.org/hg/~tap/v4l-dvb?cmd=changeset;node=d92d47e0d76f > > 12/14: cx231xx: Use v4l bounding/alignment function > http://linuxtv.org/hg/~tap/v4l-dvb?cmd=changeset;node=3da0c824a487 > > 13/14: em28xx: Use v4l bounding/alignment function > http://linuxtv.org/hg/~tap/v4l-dvb?cmd=changeset;node=42b042c376ec > > 14/14: cx231xx: TRY_FMT should not actually set anything > http://linuxtv.org/hg/~tap/v4l-dvb?cmd=changeset;node=81ca6b823ec4 Thanks for making this easy Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html