All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ezequiel Garcia <ezequiel@collabora.com>
To: Nicolas Dufresne <nicolas.dufresne@collabora.com>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: kernel@collabora.com, Jonas Karlman <jonas@kwiboo.se>,
	Hans Verkuil <hverkuil@xs4all.nl>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Maxime Ripard <mripard@kernel.org>,
	Paul Kocialkowski <paul.kocialkowski@bootlin.com>,
	Jernej Skrabec <jernej.skrabec@siol.net>,
	Daniel Almeida <daniel.almeida@collabora.com>
Subject: Re: [PATCH v4 1/9] media: uapi: mpeg2: Rework quantization matrices semantics
Date: Sat, 03 Apr 2021 14:17:49 -0300	[thread overview]
Message-ID: <59328f10f03f9bf20ba0d1fbc2b4e7657e782c92.camel@collabora.com> (raw)
In-Reply-To: <6488f83a1a46c43991d239137c26c40817b3e459.camel@collabora.com>

Hi Nicolas,

On Mon, 2021-03-29 at 16:53 -0400, Nicolas Dufresne wrote:
> Le lundi 29 mars 2021 à 15:13 -0300, Ezequiel Garcia a écrit :
> > As stated in the MPEG-2 specification, section 6.3.7 "Quant matrix
> > extension":
> > 
> >   Each quantisation matrix has a default set of values. When a
> >   sequence_header_code is decoded all matrices shall be reset to
> >   their default values. User defined matrices may be downloaded
> >   and this can occur in a sequence_header() or in a
> >   quant_matrix_extension().
> > 
> > The load_intra_quantiser_matrix syntax elements are transmitted
> > in the bistream headers, signalling that a quantization matrix
>                                              quantisation
> 
> Not really a typo, just a suggestion to follow the specification spelling. I
> would like to see concistant spelling the API. My rational is that you can copy
> and paste the strings when searching inside the specification PDF, and you don't
> mix both in the API like we do now.
> 

Absolutely. Thanks for spotting this.

> > needs to be loaded and used for pictures transmitted afterwards
> > (until the matrices are reset).
> > 
> > These "load" semantics are implemented in the V4L2 interface
> > without the need of any "load" flags: passing the control
> > is effectively a load.
> > 
> > Therefore, rework the V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION
>                                                         S
> 
> > semantics to match the MPEG-2 semantics. Quantization matrices
>                                                  s
> 
> etc.
> 
> > values are now initialized by the V4L2 control core to their
> > reset default value, and applications are expected to reset
> > their values as specified.
> > 
> > The quantization control is therefore optional, and used to
> > load bitstream-defined values in the quantization matrices.
> 
> Perhaps:
> 
> "The quantisation controls is therefore optional for decoding streams that uses
> the default matrices."
> 
> A stack that would not handle the default, would have to read the control at
> least once in order to avoid overriding valid values with 0s, not sure if that
> is worth mentioning ?
> 

Hm, not entirely sure. If application calls S_EXT_CTRL with 0s,
then that's what will happen.

Thanks,
Ezequiel


  reply	other threads:[~2021-04-03 17:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-29 18:13 [PATCH v4 0/9] MPEG-2 stateless API cleanup and destaging Ezequiel Garcia
2021-03-29 18:13 ` [PATCH v4 1/9] media: uapi: mpeg2: Rework quantization matrices semantics Ezequiel Garcia
2021-03-29 20:53   ` Nicolas Dufresne
2021-04-03 17:17     ` Ezequiel Garcia [this message]
2021-03-29 18:13 ` [PATCH v4 2/9] media: uapi: mpeg2: Cleanup flags Ezequiel Garcia
2021-03-29 18:13 ` [PATCH v4 3/9] media: uapi: mpeg2: Split sequence and picture parameters Ezequiel Garcia
2021-03-29 18:13 ` [PATCH v4 4/9] media: uapi: mpeg2: Move reference buffer fields Ezequiel Garcia
2021-03-29 18:13 ` [PATCH v4 5/9] media: hantro/cedrus: Remove unneeded slice size and slice offset Ezequiel Garcia
2021-03-29 18:13 ` [PATCH v4 6/9] media: uapi: mpeg2: Remove V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS Ezequiel Garcia
2021-03-29 18:13 ` [PATCH v4 7/9] media: controls: Log MPEG-2 stateless control in .std_log Ezequiel Garcia
2021-03-29 18:13 ` [PATCH v4 8/9] media: uapi: Move the MPEG-2 stateless control type out of staging Ezequiel Garcia
2021-03-29 18:13 ` [PATCH v4 9/9] media: uapi: Move MPEG-2 stateless controls " 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=59328f10f03f9bf20ba0d1fbc2b4e7657e782c92.camel@collabora.com \
    --to=ezequiel@collabora.com \
    --cc=daniel.almeida@collabora.com \
    --cc=hverkuil@xs4all.nl \
    --cc=jernej.skrabec@siol.net \
    --cc=jonas@kwiboo.se \
    --cc=kernel@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mripard@kernel.org \
    --cc=nicolas.dufresne@collabora.com \
    --cc=p.zabel@pengutronix.de \
    --cc=paul.kocialkowski@bootlin.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.