[PATCH 02/23] drm: omapdrm: fb: Don't store format BPP for each plane

Laurent Pinchart laurent.pinchart at ideasonboard.com
Mon May 9 20:55:12 UTC 2016


Hi Tomi,

On Monday 02 May 2016 18:43:15 Tomi Valkeinen wrote:
> Hi Laurent,
> 
> On 26/04/16 23:35, Laurent Pinchart wrote:
> > The number of bits per pixel is identical for all planes, don't store
> > multiple copies.
> 
> That's not true, as with NV12, Y has 8 bits per pixel and UV has 16 bits
> per pixel. But as the subsampling is precalculated into the stride_bpp
> (is it bytes or bits? bpp always confuses me =), the 'stride_bpp' ends
> up being same for both planes.

It's true if you average it over a full line. I can clarify this in the commit 
message.

> To be honest, I'd rather go into more complex struct than simpler one.
> The current one is already confusing, I think, and your version is too.
> The main issue is that the sub_x is encoded into the stride_bpp. In
> kmsxx I used this format:
> 
> { PixelFormat::NV12, { 2, { { 8, 1, 1, }, { 8, 2, 2 } }, } },
> 
> The first number is the number of planes, and for each plane, bitspp,
> xsub and ysub. It's more verbose, but (I think) easier to understand.

I'm fine with that assuming we'd have a use for it :-) Shouldn't we aim for a 
simpler structure to save memory by only storing the information we need, 
compared to a more verbose structure that duplicates information or stores 
data that we don't need ?

-- 
Regards,

Laurent Pinchart



More information about the dri-devel mailing list