linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
To: Nicolas Dufresne <nicolas@ndufresne.ca>, linux-media@vger.kernel.org
Cc: Tomasz Figa <tfiga@chromium.org>,
	linux-kernel@vger.kernel.org,
	Alexandre Courbot <acourbot@chromium.org>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Stanimir Varbanov <stanimir.varbanov@linaro.org>,
	Andrew-CT Chen <andrew-ct.chen@mediatek.com>,
	Tiffany Lin <tiffany.lin@mediatek.com>,
	Pawel Osciak <posciak@chromium.org>,
	Maxime Jourdan <mjourdan@baylibre.com>
Subject: Re: [PATCHv4 1/2] media: docs-rst: Document memory-to-memory video decoder interface
Date: Wed, 12 Jun 2019 09:02:00 +0200	[thread overview]
Message-ID: <1e2f5724-7ca6-2521-206a-c8edccda74f6@xs4all.nl> (raw)
In-Reply-To: <f016182a-e7b8-2dc9-edde-e62e8aacc63b@xs4all.nl>

On 6/12/19 8:49 AM, Hans Verkuil wrote:
> On 6/12/19 2:25 AM, Nicolas Dufresne wrote:
>> Le mardi 11 juin 2019 à 10:29 +0200, Hans Verkuil a écrit :
>>> On 6/10/19 9:54 PM, Nicolas Dufresne wrote:
>>>> Hi Hans,
>>>>
>>>> I went through it, and I think we are close to ready. Unfortunately, I
>>>> believe the SOURCE_CHANGE event is still under specified. There was a
>>>> post recently to try and add a new flag for changes in color space
>>>> which is not included here. We are also missing a workflow for changes
>>>> that don't affect the allocation but will affect the rendering on a
>>>> display (like colorimetry). Userspace needs to know at which frames
>>>> these parameter changes in order to signal that to the following
>>>> processing block. I think we must have a plane for this.
>>>
>>> Yes, we need a new flag for the SOURCE_CHANGE event to indicate colorimetry
>>> changes. That's actually useful for e.g. HDMI receivers as well.
>>>
>>> But I don't see why that should make much of a change to the spec: you still
>>> have to drain the capture queue, the only difference is that you don't need
>>> to reallocate buffers, you can just restart the decoder.
>>
>> I don't think you need to drain the queue if the change is just
>> metadata that have no impact on the buffers allocation or layout. I
>> think we should have a way to communicate these changed while
>> streaming. Basically, something like the event, but serialized.
> 
> I guess we can extend the struct v4l2_event_src_change and add a buffer
> index field to indicate at which capture buffer index the colorimetry
> change takes effect. Then there is no need for draining.

Just wanted to add something here: for now drivers can just use SOURCE_CHANGE
+ drain if they detect a colorimetry change. It's not as efficient as it can
be, but it will work. Applications can easily check that they don't need to
reallocate since the reported sizeimage will be the same for the old and new
formats.

> In the future when we create replacement streaming ioctls and have a
> new, larger struct v4l2_buffer, then we can add the colorimetry information
> there as well.

When this is in place, then it would make sense to add a V4L2_EVENT_SRC_CH_COLORIMETRY
flag that just indicates that something changed w.r.t. colorimetry.

We DO need this flag for HDMI receivers in any case.

Regards,

	Hans

  reply	other threads:[~2019-06-12  7:02 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-03 11:28 [PATCHv4 0/2] Document memory-to-memory video codec interfaces Hans Verkuil
2019-06-03 11:28 ` [PATCHv4 1/2] media: docs-rst: Document memory-to-memory video decoder interface Hans Verkuil
2019-06-10 19:54   ` Nicolas Dufresne
2019-06-11  8:29     ` Hans Verkuil
2019-06-12  0:25       ` Nicolas Dufresne
2019-06-12  6:49         ` Hans Verkuil
2019-06-12  7:02           ` Hans Verkuil [this message]
2019-07-15 12:12       ` Maxime Jourdan
2019-07-16 12:23         ` Nicolas Dufresne
2019-07-03  4:58   ` Tomasz Figa
2019-07-10  8:09     ` Hans Verkuil
2019-07-10  8:23       ` Tomasz Figa
2019-07-10 10:00         ` Hans Verkuil
2019-07-17 12:18   ` Nicolas Dufresne
2019-07-19  5:45     ` Tomasz Figa
2019-07-20  3:08       ` Nicolas Dufresne
2019-06-03 11:28 ` [PATCHv4 2/2] media: docs-rst: Document memory-to-memory video encoder interface Hans Verkuil
2019-06-03 14:02 ` [PATCHv4 0/2] Document memory-to-memory video codec interfaces Hans Verkuil
2019-06-04 15:19 ` Nicolas Dufresne
2019-07-03  9:04   ` Tomasz Figa
2019-07-03 17:07     ` Nicolas Dufresne
2019-06-10 15:57 ` Nicolas Dufresne
2019-06-11  8:35   ` Hans Verkuil
2019-06-12  0:33     ` Nicolas Dufresne
2019-06-13  6:48 ` Hans Verkuil
2019-06-14  1:09   ` Nicolas Dufresne
2019-06-15  8:08     ` Hans Verkuil
2019-06-16  0:17       ` Nicolas Dufresne

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=1e2f5724-7ca6-2521-206a-c8edccda74f6@xs4all.nl \
    --to=hverkuil-cisco@xs4all.nl \
    --cc=acourbot@chromium.org \
    --cc=andrew-ct.chen@mediatek.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mjourdan@baylibre.com \
    --cc=nicolas@ndufresne.ca \
    --cc=p.zabel@pengutronix.de \
    --cc=posciak@chromium.org \
    --cc=stanimir.varbanov@linaro.org \
    --cc=tfiga@chromium.org \
    --cc=tiffany.lin@mediatek.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;
as well as URLs for NNTP newsgroup(s).