Linux Media Controller development
 help / color / mirror / Atom feed
From: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
To: Tomasz Figa <tfiga@chromium.org>
Cc: linux-media@vger.kernel.org, laurent.pinchart@ideasonboard.com,
	helen.koike@collabora.com, ezequiel@collabora.com,
	hverkuil@xs4all.nl, kernel@collabora.com, dafna3@gmail.com,
	sakari.ailus@linux.intel.com, linux-rockchip@lists.infradead.org,
	mchehab@kernel.org
Subject: Re: [PATCH v5 4/7] v4l2: extend the CSC API to subdevice.
Date: Mon, 17 Aug 2020 12:24:48 +0200	[thread overview]
Message-ID: <8cc4f3a2-d116-ec0a-a838-b35859cdc34e@collabora.com> (raw)
In-Reply-To: <20200722125328.GA1828171@chromium.org>



Am 22.07.20 um 14:53 schrieb Tomasz Figa:
> Hi Dafna,
> 
> On Fri, Jul 03, 2020 at 07:10:16PM +0200, Dafna Hirschfeld wrote:
>> This patch extends the CSC API in video devices to be supported
>> also on sub-devices. The flag V4L2_MBUS_FRAMEFMT_SET_CSC set by
>> the application when calling VIDIOC_SUBDEV_S_FMT ioctl.
>> The flags:
>>
>> V4L2_SUBDEV_MBUS_CODE_CSC_COLORSPACE, V4L2_SUBDEV_MBUS_CODE_CSC_YCBCR_ENC,
>> V4L2_SUBDEV_MBUS_CODE_CSC_QUANTIZATION V4L2_SUBDEV_MBUS_CODE_CSC_XFER_FUNC,
>>
>> are set by the driver in the VIDIOC_SUBDEV_ENUM_MBUS_CODE ioctl.
>>
>> New 'flags' fields were added to the structs
>> v4l2_subdev_mbus_code_enum, v4l2_mbus_framefmt which are borrowed
>> from the 'reserved' field
>>
>> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
>> ---
>>   .../media/v4l/subdev-formats.rst              | 78 +++++++++++++++++--
>>   .../v4l/vidioc-subdev-enum-mbus-code.rst      | 44 ++++++++++-
>>   include/uapi/linux/v4l2-mediabus.h            |  9 ++-
>>   include/uapi/linux/v4l2-subdev.h              |  8 +-
>>   4 files changed, 129 insertions(+), 10 deletions(-)
>>
> 
> Thank you for the patch. Please see my comments inline.
> 
>> diff --git a/Documentation/userspace-api/media/v4l/subdev-formats.rst b/Documentation/userspace-api/media/v4l/subdev-formats.rst
>> index 9a4d61b0d76f..7362ee0b1e96 100644
>> --- a/Documentation/userspace-api/media/v4l/subdev-formats.rst
>> +++ b/Documentation/userspace-api/media/v4l/subdev-formats.rst
>> @@ -41,32 +41,96 @@ Media Bus Formats
>>   	:ref:`field-order` for details.
>>       * - __u32
>>         - ``colorspace``
>> -      - Image colorspace, from enum
>> -	:c:type:`v4l2_colorspace`. See
>> -	:ref:`colorspaces` for details.
>> +      - Image colorspace, from enum :c:type:`v4l2_colorspace`.
>> +        Must be set by the driver for capture streams and by the application
>> +	for output streams, see :ref:`colorspaces`. If the application sets the
>> +	flag ``V4L2_MBUS_FRAMEFMT_SET_CSC`` then the application can set
>> +	this field for a capture stream to request a specific colorspace
> 
> What is a "capture stream" in terms of the subdev API? Should this
> perhaps refer to "source pads" instead?

Hi, yes, I should change it to 'source pad'. I see that for the other colorimetry fields,
the docs for v4l2_mbus_framefmt already writes
"This information supplements the colorspace and must be set by the driver for capture streams and by the application for output streams,"
I guess this should also change,

Thanks,
Dafna

> 
> [snip]
>> +.. _v4l2-mbus-framefmt-flags:
>> +
>> +.. flat-table:: v4l2_mbus_framefmt Flags
>> +    :header-rows:  0
>> +    :stub-columns: 0
>> +    :widths:       3 1 4
>> +
>> +    * .. _`mbus-framefmt-set-csc`:
>> +
>> +      - ``V4L2_MBUS_FRAMEFMT_SET_CSC``
>> +      - 0x00000001
>> +      - Set by the application. It is only used for capture and is
>> +	ignored for output streams. If set, then request the subdevice to do
> 
> Ditto.
> 
>> +	colorspace conversion from the received colorspace to the requested
>> +	colorspace values. If colorimetry field (``colorspace``, ``ycbcr_enc``,
> 
> nit: a colorimetry field
> 
>> +	``quantization`` or ``xfer_func``) is set to 0, then that colorimetry
> 
> Is it okay to explicitly mention 0 here, rather than the defined
> "_DEFAULT" values?
> 
> Best regards,
> Tomasz
> 

  reply	other threads:[~2020-08-17 10:24 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-03 17:10 [PATCH v5 0/7] v4l2: add support for colorspace conversion API (CSC) for video capture and subdevices Dafna Hirschfeld
2020-07-03 17:10 ` [PATCH v5 1/7] media: Documentation: v4l: move table of v4l2_pix_format(_mplane) flags to pixfmt-v4l2.rst Dafna Hirschfeld
2020-07-03 17:10 ` [PATCH v5 2/7] v4l2: add support for colorspace conversion API (CSC) for video capture Dafna Hirschfeld
2020-07-21 13:47   ` Hans Verkuil
2020-07-03 17:10 ` [PATCH v5 3/7] media: vivid: Add support to the CSC API Dafna Hirschfeld
2020-07-21 13:50   ` Hans Verkuil
2020-07-03 17:10 ` [PATCH v5 4/7] v4l2: extend the CSC API to subdevice Dafna Hirschfeld
2020-07-21 13:52   ` Hans Verkuil
2020-07-22 12:53   ` Tomasz Figa
2020-08-17 10:24     ` Dafna Hirschfeld [this message]
2020-08-17 11:50       ` Tomasz Figa
2020-07-03 17:10 ` [PATCH v5 5/7] media: v4l2: add support for the subdev CSC API for hsv_enc on mediabus Dafna Hirschfeld
2020-07-21 13:54   ` Hans Verkuil
2020-07-03 17:10 ` [PATCH v5 6/7] media: staging: rkisp1: allow quantization setting by userspace on the isp source pad Dafna Hirschfeld
2020-07-03 19:13   ` kernel test robot
2020-07-03 20:00   ` Helen Koike
2020-07-03 21:21     ` Tomasz Figa
2020-07-22 13:12     ` Tomasz Figa
2020-07-22 17:13       ` Helen Koike
2020-07-22 17:20         ` Tomasz Figa
2020-07-03 22:35   ` kernel test robot
2020-07-21 14:02   ` Hans Verkuil
2020-07-22 16:45   ` Laurent Pinchart
2020-07-03 17:10 ` [PATCH v5 7/7] media: staging: rkisp1: rsz: set flags to 0 in enum_mbus_code cb Dafna Hirschfeld

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=8cc4f3a2-d116-ec0a-a838-b35859cdc34e@collabora.com \
    --to=dafna.hirschfeld@collabora.com \
    --cc=dafna3@gmail.com \
    --cc=ezequiel@collabora.com \
    --cc=helen.koike@collabora.com \
    --cc=hverkuil@xs4all.nl \
    --cc=kernel@collabora.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox