All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Dufresne <nicolas@ndufresne.ca>
To: John Cox <jc@kynesim.co.uk>
Cc: linux-media@vger.kernel.org, hverkuil-cisco@xs4all.nl
Subject: Re: [PATCH 2/2] media: v4l: Add documentation for Broadcom sand formats
Date: Fri, 10 Feb 2023 09:50:00 -0500	[thread overview]
Message-ID: <bcafab6e774a745576ea4be06481f1f76cbb76c5.camel@ndufresne.ca> (raw)
In-Reply-To: <0oeauhhaqbbmn1l9ea2dlk62bvbli5i325@4ax.com>

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

  parent reply	other threads:[~2023-02-10 14:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-27 15:34 [PATCH 0/2] media: v4l: Add Broadcom sand format to the list of V4L formats John Cox
2023-01-27 15:34 ` [PATCH 1/2] media: v4l: Add Broadcom sand formats to videodev2.h John Cox
2023-02-09 18:20   ` Nicolas Dufresne
2023-02-09 19:06     ` John Cox
2023-02-10 16:17       ` Nicolas Dufresne
2023-02-12 18:49         ` John Cox
2023-02-13 16:25           ` Nicolas Dufresne
2023-01-27 15:34 ` [PATCH 2/2] media: v4l: Add documentation for Broadcom sand formats John Cox
2023-02-09 18:21   ` Nicolas Dufresne
2023-02-09 18:54     ` John Cox
2023-02-09 19:22       ` Dave Stevenson
2023-02-10 14:50       ` Nicolas Dufresne [this message]
2023-02-09 17:56 ` [PATCH 0/2] media: v4l: Add Broadcom sand format to the list of V4L formats Nicolas Dufresne
2023-02-09 18:21   ` John Cox
2023-02-10 14:42     ` Nicolas Dufresne
2023-02-10 15:10       ` John Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bcafab6e774a745576ea4be06481f1f76cbb76c5.camel@ndufresne.ca \
    --to=nicolas@ndufresne.ca \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=jc@kynesim.co.uk \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.