lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <liyk6fjkiko3x2e5kts7cj2hvhqsyjyfypwwiixqv4ew24hoqx@5iit3xqa3y2j>
Date: Thu, 15 Jan 2026 21:47:56 +0200
From: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
To: Deepa Guthyappa Madivalara <deepa.madivalara@....qualcomm.com>
Cc: Nicolas Dufresne <nicolas@...fresne.ca>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Vikash Garodia <vikash.garodia@....qualcomm.com>,
        Dikshita Agarwal <dikshita.agarwal@....qualcomm.com>,
        Abhinav Kumar <abhinav.kumar@...ux.dev>,
        Bryan O'Donoghue <bod@...nel.org>, linux-media@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org
Subject: Re: [RFC PATCH 1/3] media: uapi: Introduce new control for video
 encoder ROI

On Wed, Jan 14, 2026 at 04:20:52PM -0800, Deepa Guthyappa Madivalara wrote:
> 
> On 1/14/2026 8:14 AM, Nicolas Dufresne wrote:
> > Hi,
> > 
> > Le mardi 13 janvier 2026 à 12:33 -0800, Deepa Guthyappa Madivalara a écrit :
> > > Add compound control, V4L2_CID_MPEG_VIDEO_ENC_ROI, for
> > > video encoder Region of Interest to allow applications to specify
> > > different quality levels for specific regions in video frames. Define
> > > struct v4l2_ctrl_enc_roi_params to hold up to 10 rectangular ROI,
> > > regions and their corresponding delta_qp value (v4l2_roi_param)
> > > that adjust quantization relative to the frame's base value.
> > > 
> > > This enables use cases like prioritizing quality for faces in video
> > > conferencing or important objects in surveillance footage while reducing
> > > bitrate for less critical areas.
> > > 
> > > Signed-off-by: Deepa Guthyappa Madivalara <deepa.madivalara@....qualcomm.com>
> > > ---
> > >   .../userspace-api/media/v4l/ext-ctrls-codec.rst         |  7 +++++++
> > >   include/media/v4l2-ctrls.h                              |  1 +
> > >   include/uapi/linux/v4l2-controls.h                      |  1 +
> > >   include/uapi/linux/videodev2.h                          | 17 +++++++++++++++++
> > >   4 files changed, 26 insertions(+)
> > > 
> > > diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst
> > > index c8890cb5e00ac05649e6c344c2a6b938b2ec1b24..0eecb46bb356c01411dfc313b92376593bcd86f6 100644
> > > --- a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst
> > > +++ b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst
> > > @@ -1668,6 +1668,13 @@ enum v4l2_mpeg_video_h264_hierarchical_coding_type -
> > >       Codecs need to always use the specified range, rather then a HW custom range.
> > >       Applicable to encoders
> > > +``V4L2_CID_MPEG_VIDEO_ENC_ROI (struct)``
> > > +    Defines the control id to configure specific delta QP for one or more
> > > +    rectangular regions of interest. The struct v4l2_ctrl_enc_roi_params
> > > +    is defined to hold up to 10 v4l2_rect regions and their corresponding
> > > +    delta_qp with a range of -31 to 30.
> > > +    Applicable to encoders
> > Any justification for this range ? Also, I believe I've seen hardware support
> > both delta and absolute values. Since it meant to be generic, some research is
> > needed. If we delibaritly ignore absolute, perhaps the CID should be named
> > accordingly ? Something like V4L2_CID_MPEG_VIDEO_ENC__DELTAQP_ROI ?
> 
> As per Android ROI API - MediaCodec API QP from the app is an offset QP,
> meaning userspace will received offset Qp and it converts it to deltaQp
> before passing onto the driver in Android HAL. I have used the same idea.
> Delta MbQP = frame QP + Offset Qp. This is clamped to -31 to 30 currently
> and set to driver as delta QP, hence I have it as -31 to 30.

Please reference Vulkan Video instead, if possible.

-- 
With best wishes
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ