All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanimir Varbanov <stanimir.varbanov@linaro.org>
To: Hans Verkuil <hverkuil@xs4all.nl>,
	Stanimir Varbanov <stanimir.varbanov@linaro.org>,
	linux-media@vger.kernel.org
Cc: Tomasz Figa <tfiga@chromium.org>,
	Alexandre Courbot <acourbot@chromium.org>,
	Nicolas Dufresne <nicolas@ndufresne.ca>
Subject: Re: [RFC] docs: dev-decoder: Add two more reasons for dynamic change
Date: Tue, 9 Jun 2020 12:44:00 +0300	[thread overview]
Message-ID: <dab8ac0c-3d9b-dc31-5880-8eacce948a0b@linaro.org> (raw)
In-Reply-To: <3052f24c-18ee-1c7d-111b-ffe15ca71fcb@xs4all.nl>

Hi Hans,

On 5/26/20 1:26 PM, Hans Verkuil wrote:
> On 30/04/2020 13:38, Stanimir Varbanov wrote:
>> Here we add two more reasons for dynamic-resolution-change state
>> (I think the name is misleading espesially "resolution" word, maybe
> 
> espesially -> especially
> 
>> dynamic-bitstream-change is better to describe).
>>
>> The first one which could change in the middle of the stream is the
>> bit-depth. For worst example the stream is 8bit at the begging but
>> later in the bitstream it changes to 10bit. That change should be
>> propagated to the client so that it can take appropriate  action. In
>> this case most probably it has to stop the streaming on the capture
>> queue and re-negotiate the pixel format and start the streaming
>> again.
>>
>> The second new reason is colorspace change. I'm not sure what action
>> client should take but at least it should be notified for such change.
>> One possible action is to notify the display entity that the colorspace
>> and its parameters (y'cbcr encoding and so on) has been changed.
>>
>> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
>> ---
>>  Documentation/userspace-api/media/v4l/dev-decoder.rst | 6 +++++-
>>  1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/userspace-api/media/v4l/dev-decoder.rst b/Documentation/userspace-api/media/v4l/dev-decoder.rst
>> index 606b54947e10..bf10eda6125c 100644
>> --- a/Documentation/userspace-api/media/v4l/dev-decoder.rst
>> +++ b/Documentation/userspace-api/media/v4l/dev-decoder.rst
>> @@ -906,7 +906,11 @@ reflected by corresponding queries):
>>  
>>  * visible resolution (selection rectangles),
>>  
>> -* the minimum number of buffers needed for decoding.
>> +* the minimum number of buffers needed for decoding,
>> +
>> +* bit-depth of the bitstream has been changed,
>> +
>> +* colorspace (and its properties) has been changed.
> 
> For this I want to have a new source change flag:
> 
> V4L2_EVENT_SRC_CH_COLORIMETRY
> 
> Changing colorimetry without changing resolution/bit depth does not
> require buffers to be re-allocated, it just changes how the pixel
> data is interpreted w.r.t. color. And that is important to know.

I'm going to create a patch for this event, but I started to wonder do
we need new buffer flag for this?

Something like below sequence:

 - client receive SRC_CH_COLORIMETRY event
 - client issue G_FMT(CAPTURE queue)
 - at that point the client has to know the last buffer with previous
colorimetry and thus the buffer with new colorimetry

How the client will know the buffer with new colorimetry?

-- 
regards,
Stan

  parent reply	other threads:[~2020-06-09  9:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-30 11:38 [RFC] docs: dev-decoder: Add two more reasons for dynamic change Stanimir Varbanov
2020-05-01 14:19 ` Nicolas Dufresne
2020-05-01 14:32   ` Tomasz Figa
2020-05-02  9:33   ` Stanimir Varbanov
2020-05-04 17:43     ` Nicolas Dufresne
2020-05-26 10:26 ` Hans Verkuil
2020-05-26 15:53   ` Tomasz Figa
2020-06-04 14:46   ` Stanimir Varbanov
2020-06-04 14:53     ` Hans Verkuil
2020-06-09  9:44   ` Stanimir Varbanov [this message]
2020-06-09 11:59     ` Hans Verkuil

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=dab8ac0c-3d9b-dc31-5880-8eacce948a0b@linaro.org \
    --to=stanimir.varbanov@linaro.org \
    --cc=acourbot@chromium.org \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=nicolas@ndufresne.ca \
    --cc=tfiga@chromium.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.