From: "Ming Qian(OSS)" <ming.qian@oss.nxp.com>
To: Hans Verkuil <hverkuil-cisco@xs4all.nl>,
Ming Qian <ming.qian@nxp.com>,
mchehab@kernel.org
Cc: yunkec@google.com, nicolas@ndufresne.ca, s.hauer@pengutronix.de,
kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com,
xiahong.bao@nxp.com, ming.zhou@nxp.com, eagle.zhou@nxp.com,
tao.jiang_2@nxp.com, imx@lists.linux.dev,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC v3 0/4] Add video encoder ROI ctrls
Date: Tue, 29 Oct 2024 10:21:28 +0800 [thread overview]
Message-ID: <61ee3f1a-640f-45e6-8c38-197d2234d7cb@oss.nxp.com> (raw)
In-Reply-To: <6b8004e2-57df-4760-a59d-77a712e9ca4d@xs4all.nl>
Hi Hans,
On 2024/10/28 15:57, Hans Verkuil wrote:
> On 22/10/2024 10:40, Ming Qian wrote:
>> Hi,
>>
>> This patch set implements region of interest (ROI) ctrls for video
>> encoder.
>>
>> One video encoder IP may support the following two ROI configurations or
>> one of them:
>> 1. configure ROI as a rectangular region, and set a delta QP parameter.
>> 2. configure ROI as a rectangular region, and set a priority parameter.
>> 3. configure ROI as a QP map as an array. Each value represents the delta QP
>> of a block in raster scan order. The block size is determined by
>> the specific IP.
>> 4. configure ROI as a QP map as an array. Each value represents the absolute QP
>> of a block in raster scan order. The block size is determined by
>> the specific IP.
>>
>> To achieve this, I made the following change:
>> 1. I reuse the type V4L2_CTRL_TYPE_RECT that is defined in the UVC ROI patchset
>> 2. Define a ctrl V4L2_CID_MPEG_VIDEO_ROI_MODE to choose ROI configuration
>> 3. Define some ctrl to configure ROI
>> 4. Define a ctrl V4L2_CID_MPEG_VIDEO_ROI_BLOCK_SIZE to query block size
>>
>> I referred the patchset "Implement UVC v1.5 ROI" (https://lwn.net/Articles/953532/)
>> and pick some patches from it.
>
> Please note that since this introduces the new TYPE_RECT and WHICH_MIN/MAX flags,
> you also need to update v4l-utils.
>
> This was done last year:
>
> https://lore.kernel.org/linux-media/20230817072537.2837504-1-yunkec@google.com/
>
> Can you pick this up and post a v2 for these v4l-utils changes? Note that I had some
> comments at the time, so please fix those before posting v2.
I'll check the patch first, and pick it.
>
> Regards,
>
> Hans
>
>>
>> changelog:
>>
>> v3
>> - Drop the type V4L2_CTRL_TYPE_REGION
>> - Split the compound control into 2 ctrls
>> - Define 4 ROI mode
>>
>> v2
>> - export symbol of v4l2_ctrl_type_op_minimum
>> - export symbol of v4l2_ctrl_type_op_maximum
>>
>> Hans Verkuil (1):
>> media: v4l2-ctrls: add support for V4L2_CTRL_WHICH_MIN/MAX_VAL
>>
>> Ming Qian (1):
>> media: v4l2-ctrls: Add video encoder ROI ctrls
>>
>> Yunke Cao (2):
>> media: v4l2_ctrl: Add V4L2_CTRL_TYPE_RECT
>> media: vivid: Add an rectangle control
>>
>> .../media/v4l/ext-ctrls-codec.rst | 95 ++++++++++
>> .../media/v4l/vidioc-g-ext-ctrls.rst | 26 ++-
>> .../media/v4l/vidioc-queryctrl.rst | 14 ++
>> .../media/videodev2.h.rst.exceptions | 4 +
>> drivers/media/i2c/imx214.c | 4 +-
>> .../media/platform/qcom/venus/venc_ctrls.c | 9 +-
>> .../media/test-drivers/vivid/vivid-ctrls.c | 34 ++++
>> drivers/media/v4l2-core/v4l2-ctrls-api.c | 54 ++++--
>> drivers/media/v4l2-core/v4l2-ctrls-core.c | 169 +++++++++++++++---
>> drivers/media/v4l2-core/v4l2-ctrls-defs.c | 46 +++++
>> drivers/media/v4l2-core/v4l2-ioctl.c | 4 +-
>> include/media/v4l2-ctrls.h | 62 ++++++-
>> include/uapi/linux/v4l2-controls.h | 16 ++
>> include/uapi/linux/videodev2.h | 5 +
>> 14 files changed, 493 insertions(+), 49 deletions(-)
>>
>
prev parent reply other threads:[~2024-10-29 2:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-22 8:40 Ming Qian
2024-10-22 8:40 ` [RFC v3 1/4] media: v4l2_ctrl: Add V4L2_CTRL_TYPE_RECT Ming Qian
2024-10-22 8:40 ` [RFC v3 2/4] media: vivid: Add an rectangle control Ming Qian
2024-10-28 7:33 ` Hans Verkuil
2024-10-22 8:40 ` [RFC v3 3/4] media: v4l2-ctrls: add support for V4L2_CTRL_WHICH_MIN/MAX_VAL Ming Qian
2024-10-22 8:40 ` [RFC v3 4/4] media: v4l2-ctrls: Add video encoder ROI ctrls Ming Qian
2024-10-28 7:55 ` Hans Verkuil
2024-10-28 7:57 ` [RFC v3 0/4] " Hans Verkuil
2024-10-29 2:21 ` Ming Qian(OSS) [this message]
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=61ee3f1a-640f-45e6-8c38-197d2234d7cb@oss.nxp.com \
--to=ming.qian@oss.nxp.com \
--cc=eagle.zhou@nxp.com \
--cc=festevam@gmail.com \
--cc=hverkuil-cisco@xs4all.nl \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=ming.qian@nxp.com \
--cc=ming.zhou@nxp.com \
--cc=nicolas@ndufresne.ca \
--cc=s.hauer@pengutronix.de \
--cc=tao.jiang_2@nxp.com \
--cc=xiahong.bao@nxp.com \
--cc=yunkec@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®