Re: [PATCH 2/2] media: v4l: Add documentation for Broadcom sand formats

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

 



Le jeudi 09 février 2023 à 18:54 +0000, John Cox a écrit :
> > Maybe insert a phrase related to the use of the same columns pattern as
> > NV12_C128 ? Then from there, its easier to understand why this bytesperline
> > formula. I'm guessing that 96 is the number of pixels that fits 1 row of 128
> > bytes (128 / 4 * 3). I could not guess why you need 128 times that size
> > though ?
> > Maybe I'm missing something ?
> 
> 96 is indeed the number of pixels that fits in one 128 byte column.
> 
> (width+95)/96 is the number of columns required, mutiplying it by 128
> gets you a "pitch" that when mutiplied by height gives you the number of
> bytes occupied by the luma plane. This is mostly to keep software that
> expects width <= bytesperline happy.

Thanks, now that you say it, its kind of obvious, its pixel to byte conversion.
And I agree this is probably the best emulation we can do, and documenting it is
important. Notion of stride is also a bit fuzzy with other tile formats. And I
suspect this convention is also that one use on DRM side ?

Nicolas




[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