Em Tue, 16 Jun 2009 17:57:20 +0200 (CEST) Guennadi Liakhovetski <g.liakhovetski@xxxxxx> escreveu: > 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) { > As I'm still cooking the patches, I prefer to postpone the align ones until we are comfortable with them. Trent, Could you please take a look on the above comments Cheers, Mauro -- 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