Re: [PATCH 1/4] pxa_camera: Remove YUV planar formats hole

2009-03-10 Thread Trent Piepho
On Mon, 9 Mar 2009, Robert Jarzmik wrote: Ok, this one will change I presume - new alignment calculations and line-breaking. In fact, if you adjust width and height earlier in set_fmt, maybe you'll just remove any rounding here completely. Helas, not fully. The problem is with passthrough

Re: [PATCH 1/4] pxa_camera: Remove YUV planar formats hole

2009-03-09 Thread Guennadi Liakhovetski
On Thu, 5 Mar 2009, Robert Jarzmik wrote: All planes were PAGE aligned (ie. 4096 bytes aligned). This is not consistent with YUV422 format, which requires Y, U and V planes glued together. The new implementation forces the alignement on 8 bytes (DMA requirement), which is almost always the

Re: [PATCH 1/4] pxa_camera: Remove YUV planar formats hole

2009-03-06 Thread robert . jarzmik
/ Berne / Rome / Stockholm / Vienne Objet: Re: [PATCH 1/4] pxa_camera: Remove YUV planar formats hole Yes, adjusting both is also what I was suggesting in my original review. How about aligning the bigger of the two to 4 bytes and the smaller to 2? Yes, sounds good. I remade my calculations

Re: [PATCH 1/4] pxa_camera: Remove YUV planar formats hole

2009-03-06 Thread Trent Piepho
On Thu, 5 Mar 2009, Guennadi Liakhovetski wrote: On Thu, 5 Mar 2009, Trent Piepho wrote: On Thu, 5 Mar 2009, Robert Jarzmik wrote: Guennadi Liakhovetski g.liakhovet...@gmx.de writes: This is not a review yet - just an explanation why I was suggesting to adjust height and width - you

Re: [PATCH 1/4] pxa_camera: Remove YUV planar formats hole

2009-03-06 Thread Trent Piepho
5 Mars 2009 23h15:03 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne Objet: Re: [PATCH 1/4] pxa_camera: Remove YUV planar formats hole Yes, adjusting both is also what I was suggesting in my original review. How about aligning the bigger of the two to 4 bytes

Re: [PATCH 1/4] pxa_camera: Remove YUV planar formats hole

2009-03-06 Thread robert . jarzmik
/ Berne / Rome / Stockholm / Vienne Objet: Re: [PATCH 1/4] pxa_camera: Remove YUV planar formats hole I remade my calculations : - if (width x height % 8 == 0) : = frame size = width x height x 2 = U plane size = frame size / 4 = width x height /2 = U plane size is a multiple of 4

Re: [PATCH 1/4] pxa_camera: Remove YUV planar formats hole

2009-03-06 Thread Guennadi Liakhovetski
...@speakeasy.org Cc: Robert Jarzmik robert.jarz...@free.fr, m...@compulab.co.il, Linux Media Mailing List linux-media@vger.kernel.org Envoyé: Jeudi 5 Mars 2009 23h15:03 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne Objet: Re: [PATCH 1/4] pxa_camera: Remove YUV planar

Re: [PATCH 1/4] pxa_camera: Remove YUV planar formats hole

2009-03-06 Thread Trent Piepho
On Fri, 6 Mar 2009, Guennadi Liakhovetski wrote: On Fri, 6 Mar 2009, robert.jarz...@free.fr wrote: This implies that even if DMA is 8 bytes aligned, width x height should be a multiple of 16, not 8 as I stated in the first git comment. So that would align : - width on 4 bytes (aligning

Re: [PATCH 1/4] pxa_camera: Remove YUV planar formats hole

2009-03-06 Thread Robert Jarzmik
Trent Piepho xy...@speakeasy.org 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

[PATCH 1/4] pxa_camera: Remove YUV planar formats hole

2009-03-05 Thread Robert Jarzmik
All planes were PAGE aligned (ie. 4096 bytes aligned). This is not consistent with YUV422 format, which requires Y, U and V planes glued together. The new implementation forces the alignement on 8 bytes (DMA requirement), which is almost always the case (granted by width x height being a multiple

Re: [PATCH 1/4] pxa_camera: Remove YUV planar formats hole

2009-03-05 Thread Robert Jarzmik
Guennadi Liakhovetski g.liakhovet...@gmx.de writes: This is not a review yet - just an explanation why I was suggesting to adjust height and width - you say yourself, that YUV422P (I think, this is wat you meant, not just YUV422) requires planes to immediately follow one another. But you

Re: [PATCH 1/4] pxa_camera: Remove YUV planar formats hole

2009-03-05 Thread Trent Piepho
On Thu, 5 Mar 2009, Robert Jarzmik wrote: Guennadi Liakhovetski g.liakhovet...@gmx.de writes: This is not a review yet - just an explanation why I was suggesting to adjust height and width - you say yourself, that YUV422P (I think, this is wat you meant, not just YUV422) requires planes to