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 passt

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

2009-03-09 Thread Robert Jarzmik
Guennadi Liakhovetski writes: >> diff --git a/drivers/media/video/pxa_camera.c >> b/drivers/media/video/pxa_camera.c >> index e3e6b29..54df071 100644 >> --- a/drivers/media/video/pxa_camera.c >> +++ b/drivers/media/video/pxa_camera.c >> @@ -242,14 +242,13 @@ static int pxa_videobuf_setup(struct

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

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

2009-03-06 Thread Robert Jarzmik
Trent Piepho 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

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

2009-03-06 Thread Robert Jarzmik
Guennadi Liakhovetski writes: >> 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 meaning the lowest multiple of 4 below or >> equal to width) >>

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

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

2009-03-06 Thread Guennadi Liakhovetski
"Trent Piepho" > Cc: "Robert Jarzmik" , m...@compulab.co.il, "Linux > Media Mailing List" > 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 f

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

2009-03-06 Thread robert . jarzmik
- Mail Original - De: "Trent Piepho" À: "robert jarzmik" Cc: "Guennadi Liakhovetski" , m...@compulab.co.il, "Linux Media Mailing List" Envoyé: Vendredi 6 Mars 2009 10h56:39 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne Objet

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

2009-03-06 Thread Trent Piepho
9 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

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 writes: > > > > This is not a review yet - just an explanation why I was suggesting to > > > > adjust height and width - you say your

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

2009-03-06 Thread robert . jarzmik
- Mail Original - De: "Guennadi Liakhovetski" À: "Trent Piepho" Cc: "Robert Jarzmik" , m...@compulab.co.il, "Linux Media Mailing List" 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 formats hole

2009-03-05 Thread Guennadi Liakhovetski
On Thu, 5 Mar 2009, Trent Piepho wrote: > On Thu, 5 Mar 2009, Robert Jarzmik wrote: > > Guennadi Liakhovetski 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 mea

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 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 f

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

2009-03-05 Thread Robert Jarzmik
Guennadi Liakhovetski 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 have to align them

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

2009-03-05 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

[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