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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



----- Mail Original -----
De: "Trent Piepho" <xyzzy@xxxxxxxxxxxxx>
À: "robert jarzmik" <robert.jarzmik@xxxxxxx>
Cc: "Guennadi Liakhovetski" <g.liakhovetski@xxxxxx>, mike@xxxxxxxxxxxxxx, "Linux Media Mailing List" <linux-media@xxxxxxxxxxxxxxx>
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

> 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
>       As the last DMA load from QIF fifo will return 8 bytes (and not 4 as
>       we would expect, cf. PXA Developer's Manual, 27.4.4.1), this is not
>       good.

So it's only a requirement that the total size of all three planes put
together is a multiple of 8?  Or is it a requirement that each plane is a
multiple of 8?  And are you using 4:2:2 or 4:2:0?

The requirement is for each plane, as each plane has a QIF fifo associated. If the requirement is granted for plane U, then it is for plane V (same size), and plane Y as well (twice the size of plane U).

And the file format is planar 4:2:2 YCbCr, which gives (assuming 32 bit wide representation, with most significant bit on the left of the schema and least on the right) for example :

 31      23     15     7     0
 +------+------+------+------+
 | Yn+3 | Yn+2 | Yn+1 | Yn   |
 | ..........................|
 + YN   | YN-1 | YN-1 | 0    |
 +------+------+------+------+
 | Cr+3 | Cr+2 | Cr+1 | Cr   |
 | ..........................|
 | CrN  | CrN-1|  0   |  0   |
 +------+------+------+------+
 | Cr+3 | Cr+2 | Cr+1 | Cr   |
 | ..........................|
 | CrN  | CrN-1|  0   |  0   |
 +------+------+------+------+

Everywhere where I put a "0", de QIF interface sends a 0 byte even if it doesn't represent a pixel (padding by 0s).
The same is true for RGB formats, but instead of 0, it is 0 or "transparency bit".

For the height/width calculation, I didn't find your function in kernel tree. As it is very generic, I have no way to put it into pxa_camera, it should go ... elsewhere. So I think I'll use a dumb "ALIGN(x, 8)" ...

Cheers.

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

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux