All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomasz Figa <tfiga-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
To: Ezequiel Garcia <ezequiel-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
Cc: "Mark Rutland" <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	"Nicolas Dufresne"
	<nicolas.dufresne-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>,
	"Heiko Stübner" <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>,
	"Paul Kocialkowski"
	<paul.kocialkowski-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org>,
	"open list:ARM/Rockchip SoC..."
	<linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	"Rob Herring" <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	"Hans Verkuil"
	<hans.verkuil-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>,
	myy-tmjzNUIc0P1+EYZtW95mkQ@public.gmane.org,
	kernel-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org,
	"Shunqian Zheng"
	<zhengsq-TNX95d0MmH7DzftRWevZcw@public.gmane.org>,
	"Linux Media Mailing List"
	<linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH v3 6/7] media: Add controls for JPEG quantization tables
Date: Wed, 29 Aug 2018 12:00:18 +0900	[thread overview]
Message-ID: <CAAFQd5Dx87Mmx4kpUGeK1E=FZ4B5OgpVvadAFYOM+D-8-ACXKQ@mail.gmail.com> (raw)
In-Reply-To: <d55bf57ed63ba82524af1dcae3201a513cec9f48.camel-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>

On Wed, Aug 29, 2018 at 11:50 AM Ezequiel Garcia <ezequiel-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org> wrote:
>
> On Mon, 2018-08-27 at 09:47 +0200, Paul Kocialkowski wrote:
> > Hi,
> >
> > On Wed, 2018-08-22 at 13:59 -0300, Ezequiel Garcia wrote:
> > > From: Shunqian Zheng <zhengsq-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
> > >
> > > Add V4L2_CID_JPEG_LUMA/CHROMA_QUANTIZATION controls to allow userspace
> > > configure the JPEG quantization tables.
> >
> > How about having a single control for quantization?
> >
> > In MPEG-2/H.264/H.265, we have a single control exposed as a structure,
> > which contains the tables for both luma and chroma. In the case of JPEG,
> > it's not that big a deal, but for advanced video formats, it would be
> > too much hassle to have one control per table.
> >
> > In order to keep the interface consistent, I think it'd be best to merge
> > both matrices into a single control.
> >
> > What do you think?
> >
>
> I think it makes a lot of sense. I don't see the benefit in having luma
> and chroma separated, and consistency is good.
>
> I guess the more consistent solution would be to expose a compound
> control, similar to the video quantization one.
>
> struct v4l2_ctrl_jpeg_quantization {
>        __u8    luma_quantization_matrix[64];
>        __u8    chroma_quantization_matrix[64];
> };

Makes sense indeed. It also lets us avoid the hassle of setting
.min/.max/.dims and other array control stuff, since everything is
already defined by the C struct itself.

Best regards,
Tomasz

WARNING: multiple messages have this Message-ID (diff)
From: Tomasz Figa <tfiga@chromium.org>
To: Ezequiel Garcia <ezequiel@collabora.com>
Cc: "Paul Kocialkowski" <paul.kocialkowski@bootlin.com>,
	"Linux Media Mailing List" <linux-media@vger.kernel.org>,
	devicetree@vger.kernel.org,
	"open list:ARM/Rockchip SoC..."
	<linux-rockchip@lists.infradead.org>,
	"Hans Verkuil" <hans.verkuil@cisco.com>,
	kernel@collabora.com,
	"Nicolas Dufresne" <nicolas.dufresne@collabora.com>,
	"Heiko Stübner" <heiko@sntech.de>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Mark Rutland" <mark.rutland@arm.com>,
	myy@miouyouyou.fr, "Shunqian Zheng" <zhengsq@rock-chips.com>
Subject: Re: [PATCH v3 6/7] media: Add controls for JPEG quantization tables
Date: Wed, 29 Aug 2018 12:00:18 +0900	[thread overview]
Message-ID: <CAAFQd5Dx87Mmx4kpUGeK1E=FZ4B5OgpVvadAFYOM+D-8-ACXKQ@mail.gmail.com> (raw)
In-Reply-To: <d55bf57ed63ba82524af1dcae3201a513cec9f48.camel@collabora.com>

On Wed, Aug 29, 2018 at 11:50 AM Ezequiel Garcia <ezequiel@collabora.com> wrote:
>
> On Mon, 2018-08-27 at 09:47 +0200, Paul Kocialkowski wrote:
> > Hi,
> >
> > On Wed, 2018-08-22 at 13:59 -0300, Ezequiel Garcia wrote:
> > > From: Shunqian Zheng <zhengsq@rock-chips.com>
> > >
> > > Add V4L2_CID_JPEG_LUMA/CHROMA_QUANTIZATION controls to allow userspace
> > > configure the JPEG quantization tables.
> >
> > How about having a single control for quantization?
> >
> > In MPEG-2/H.264/H.265, we have a single control exposed as a structure,
> > which contains the tables for both luma and chroma. In the case of JPEG,
> > it's not that big a deal, but for advanced video formats, it would be
> > too much hassle to have one control per table.
> >
> > In order to keep the interface consistent, I think it'd be best to merge
> > both matrices into a single control.
> >
> > What do you think?
> >
>
> I think it makes a lot of sense. I don't see the benefit in having luma
> and chroma separated, and consistency is good.
>
> I guess the more consistent solution would be to expose a compound
> control, similar to the video quantization one.
>
> struct v4l2_ctrl_jpeg_quantization {
>        __u8    luma_quantization_matrix[64];
>        __u8    chroma_quantization_matrix[64];
> };

Makes sense indeed. It also lets us avoid the hassle of setting
.min/.max/.dims and other array control stuff, since everything is
already defined by the C struct itself.

Best regards,
Tomasz

  parent reply	other threads:[~2018-08-29  3:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-22 16:59 [PATCH v3 0/7] Add Rockchip VPU JPEG encoder Ezequiel Garcia
2018-08-22 16:59 ` Ezequiel Garcia
     [not found] ` <20180822165937.8700-1-ezequiel-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2018-08-22 16:59   ` [PATCH v3 1/7] dt-bindings: Document the Rockchip VPU bindings Ezequiel Garcia
2018-08-22 16:59     ` Ezequiel Garcia
2018-08-22 16:59   ` [PATCH v3 2/7] ARM: dts: rockchip: add VPU device node for RK3288 Ezequiel Garcia
2018-08-22 16:59     ` Ezequiel Garcia
2018-08-22 16:59   ` [PATCH v3 3/7] arm64: dts: rockchip: add VPU device node for RK3399 Ezequiel Garcia
2018-08-22 16:59     ` Ezequiel Garcia
2018-08-22 16:59   ` [PATCH v3 4/7] v4l2-ctrls: Support dimensions override for standard controls Ezequiel Garcia
2018-08-22 16:59     ` Ezequiel Garcia
2018-08-22 16:59   ` [PATCH v3 5/7] media: Add JPEG_RAW format Ezequiel Garcia
2018-08-22 16:59     ` Ezequiel Garcia
2018-08-22 16:59   ` [PATCH v3 6/7] media: Add controls for JPEG quantization tables Ezequiel Garcia
2018-08-22 16:59     ` Ezequiel Garcia
     [not found]     ` <20180822165937.8700-7-ezequiel-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2018-08-27  7:47       ` Paul Kocialkowski
2018-08-27  7:47         ` Paul Kocialkowski
     [not found]         ` <3a92082b201776bfed0f68facc30577cb7d2a5c1.camel-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org>
2018-08-29  2:50           ` Ezequiel Garcia
2018-08-29  2:50             ` Ezequiel Garcia
     [not found]             ` <d55bf57ed63ba82524af1dcae3201a513cec9f48.camel-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2018-08-29  3:00               ` Tomasz Figa [this message]
2018-08-29  3:00                 ` Tomasz Figa
2018-08-22 16:59   ` [PATCH v3 7/7] media: add Rockchip VPU JPEG encoder driver Ezequiel Garcia
2018-08-22 16:59     ` Ezequiel Garcia

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='CAAFQd5Dx87Mmx4kpUGeK1E=FZ4B5OgpVvadAFYOM+D-8-ACXKQ@mail.gmail.com' \
    --to=tfiga-f7+t8e8rja9g9huczpvpmw@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=ezequiel-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org \
    --cc=hans.verkuil-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org \
    --cc=heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org \
    --cc=kernel-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org \
    --cc=linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=myy-tmjzNUIc0P1+EYZtW95mkQ@public.gmane.org \
    --cc=nicolas.dufresne-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org \
    --cc=paul.kocialkowski-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=zhengsq-TNX95d0MmH7DzftRWevZcw@public.gmane.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.