Trent Piepho <xyzzy@xxxxxxxxxxxxx> writes: > I like the algorithm I posted, after another small improvement, better. So push it toward v4l2, to have wider audience. If I were you, I'd have a peek at include/linux/kernel.h, which brings you beautiful functions like ALIGN(), IS_ALIGNED(), and so on ... That could make your next review easier. > For instance, if width is aligned by 8 and height by 2, then you have > already have 16 byte alignment and there is no need to align height by 4. > E.g., 168x202 will be kept as 168x202 with my method but the rounding down > method changes it to 168x200. In the algorithm I posted, I keep 168x202 as well. > Another example, take 159x243. My algorithm produces 160x243, which seems > much better than 156x240, what one gets by rounding each dimention down to > a multiple of four. By better you mean "nearer" ? Well, why not. If your patch mades it through v4l2 stack, I'll push an update to use it, deal ? -- Robert -- 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