All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@iki.fi>
To: Zhaoxuan Zhai <zhai.zhaoxuan@canonical.com>
Cc: linux-media@vger.kernel.org,
	Ethan Hsieh <ethan.hsieh@canonical.com>,
	jianhui.lee@canonical.com, guoqing.jiang@canonical.com,
	hverkuil@xs4all.nl
Subject: Re: Questions about image size listed in VIDIOC_ENUM_FMT
Date: Fri, 14 Feb 2025 07:08:31 +0000	[thread overview]
Message-ID: <Z67r76Fg-SOEbOJf@valkosipuli.retiisi.eu> (raw)
In-Reply-To: <3bd7482f-e41d-41df-9d25-08cb62d5d0db@canonical.com>

Hi Zhaoxuan,

On Fri, Feb 14, 2025 at 12:19:23PM +0800, Zhaoxuan Zhai wrote:
> Hi all,
> 
> Sorry I made a mistake. It should be VIDIOC_ENUM_FRAMESIZES instead of
> VIDIOC_ENUM_FMT. I'm sorry for the mistake.
> 
> 在 2025/2/14 12:08, Zhaoxuan Zhai 写道:
> > Hi all,
> > 
> > We are working on a camera driver. We plan to use v4l2 interface to send
> > image data to users. We have a question we'd like to ask.
> > 
> > The situation we are facing is as follows.
> > 
> > We have an image processing unit that can process raw data collected by
> > the sensor into the V4L2_PIX_FMT_NV12M format and send it to the user.
> > 
> > However, due to the requirements of the V4L2_PIX_FMT_NV12M format, the
> > width and height of the image must be divisible by 16.
> > 
> > For example, when the sensor provides an image size of 2104x1560, after
> > NV12M encoding, it should be pading to  2112x1566. But the additional 8
> > rows and 8 columns are padded with 0s and contain no actual content.
> > 
> > So, we would like to ask, in this case, what size should we list in
> > VIDIOC_ENUM_FMT? Should it be the actual image size with content,
> > 2104x1560, or the padded size, 2112x1566?"

I'd say the actual image size (i.e. where you have pixel data). The
sizeimage field needs to reflect the padding and the user needs to be aware
how the data is laid out in memory.

Also cc Hans.

-- 
Regards,

Sakari Ailus

  reply	other threads:[~2025-02-14  7:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-14  4:08 Questions about image size listed in VIDIOC_ENUM_FMT Zhaoxuan Zhai
2025-02-14  4:19 ` Zhaoxuan Zhai
2025-02-14  7:08   ` Sakari Ailus [this message]
2025-02-14 14:57     ` Nicolas Dufresne
2025-02-14 16:40       ` Laurent Pinchart
2025-02-17 19:05         ` Nicolas Dufresne
2025-02-14 16:37     ` Laurent Pinchart
  -- strict thread matches above, loose matches on Subject: below --
2025-02-14  4:07 Zhaoxuan Zhai

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=Z67r76Fg-SOEbOJf@valkosipuli.retiisi.eu \
    --to=sakari.ailus@iki.fi \
    --cc=ethan.hsieh@canonical.com \
    --cc=guoqing.jiang@canonical.com \
    --cc=hverkuil@xs4all.nl \
    --cc=jianhui.lee@canonical.com \
    --cc=linux-media@vger.kernel.org \
    --cc=zhai.zhaoxuan@canonical.com \
    /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.