linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] v4l: doc: Clarify v4l2_mbus_fmt height definition
@ 2018-01-08 17:55 Kieran Bingham
  2018-01-08 21:13 ` Sakari Ailus
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Kieran Bingham @ 2018-01-08 17:55 UTC (permalink / raw)
  To: linux-media
  Cc: linux-renesas-soc, niklas.soderlund, sakari.ailus, Hans Verkuil,
	Kieran Bingham, Kieran Bingham, Mauro Carvalho Chehab,
	Jonathan Corbet, Archit Taneja, Neil Armstrong, open list

The v4l2_mbus_fmt width and height corresponds directly with the
v4l2_pix_format definitions, yet the differences in documentation make
it ambiguous what to do in the event of field heights.

Clarify this using the same text as is provided for the v4l2_pix_format
which is explicit on the matter, and by matching the terminology of
'image height' rather than the misleading 'frame height'.

Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
---
v2:
 - Duplicated explicit text from v4l2_pix_format rather than
   referencing it.

 Documentation/media/uapi/v4l/subdev-formats.rst | 8 ++++++--
 include/uapi/linux/v4l2-mediabus.h              | 4 ++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/Documentation/media/uapi/v4l/subdev-formats.rst b/Documentation/media/uapi/v4l/subdev-formats.rst
index b1eea44550e1..9fcabe7f9367 100644
--- a/Documentation/media/uapi/v4l/subdev-formats.rst
+++ b/Documentation/media/uapi/v4l/subdev-formats.rst
@@ -16,10 +16,14 @@ Media Bus Formats
 
     * - __u32
       - ``width``
-      - Image width, in pixels.
+      - Image width in pixels.
     * - __u32
       - ``height``
-      - Image height, in pixels.
+      - Image height in pixels. If ``field`` is one of ``V4L2_FIELD_TOP``,
+	``V4L2_FIELD_BOTTOM`` or ``V4L2_FIELD_ALTERNATE`` then height
+	refers to the number of lines in the field, otherwise it refers to
+	the number of lines in the frame (which is twice the field height
+	for interlaced formats).
     * - __u32
       - ``code``
       - Format code, from enum
diff --git a/include/uapi/linux/v4l2-mediabus.h b/include/uapi/linux/v4l2-mediabus.h
index 6e20de63ec59..123a231001a8 100644
--- a/include/uapi/linux/v4l2-mediabus.h
+++ b/include/uapi/linux/v4l2-mediabus.h
@@ -18,8 +18,8 @@
 
 /**
  * struct v4l2_mbus_framefmt - frame format on the media bus
- * @width:	frame width
- * @height:	frame height
+ * @width:	image width
+ * @height:	image height
  * @code:	data format code (from enum v4l2_mbus_pixelcode)
  * @field:	used interlacing type (from enum v4l2_field)
  * @colorspace:	colorspace of the data (from enum v4l2_colorspace)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] v4l: doc: Clarify v4l2_mbus_fmt height definition
  2018-01-08 17:55 [PATCH v2] v4l: doc: Clarify v4l2_mbus_fmt height definition Kieran Bingham
@ 2018-01-08 21:13 ` Sakari Ailus
  2018-01-08 22:38 ` Niklas Söderlund
  2018-01-09  7:29 ` Hans Verkuil
  2 siblings, 0 replies; 4+ messages in thread
From: Sakari Ailus @ 2018-01-08 21:13 UTC (permalink / raw)
  To: Kieran Bingham
  Cc: linux-media, linux-renesas-soc, niklas.soderlund, Hans Verkuil,
	Kieran Bingham, Mauro Carvalho Chehab, Jonathan Corbet,
	Archit Taneja, Neil Armstrong, open list

Hi Kieran,

Thanks for the update.

On Mon, Jan 08, 2018 at 05:55:24PM +0000, Kieran Bingham wrote:
> The v4l2_mbus_fmt width and height corresponds directly with the
> v4l2_pix_format definitions, yet the differences in documentation make
> it ambiguous what to do in the event of field heights.
> 
> Clarify this using the same text as is provided for the v4l2_pix_format
> which is explicit on the matter, and by matching the terminology of
> 'image height' rather than the misleading 'frame height'.
> 
> Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>

-- 
Sakari Ailus
e-mail: sakari.ailus@iki.fi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] v4l: doc: Clarify v4l2_mbus_fmt height definition
  2018-01-08 17:55 [PATCH v2] v4l: doc: Clarify v4l2_mbus_fmt height definition Kieran Bingham
  2018-01-08 21:13 ` Sakari Ailus
@ 2018-01-08 22:38 ` Niklas Söderlund
  2018-01-09  7:29 ` Hans Verkuil
  2 siblings, 0 replies; 4+ messages in thread
From: Niklas Söderlund @ 2018-01-08 22:38 UTC (permalink / raw)
  To: Kieran Bingham
  Cc: linux-media, linux-renesas-soc, sakari.ailus, Hans Verkuil,
	Kieran Bingham, Mauro Carvalho Chehab, Jonathan Corbet,
	Archit Taneja, Neil Armstrong, open list

Hi Kieran,

Thanks for your patch.

On 2018-01-08 17:55:24 +0000, Kieran Bingham wrote:
> The v4l2_mbus_fmt width and height corresponds directly with the
> v4l2_pix_format definitions, yet the differences in documentation make
> it ambiguous what to do in the event of field heights.
> 
> Clarify this using the same text as is provided for the v4l2_pix_format
> which is explicit on the matter, and by matching the terminology of
> 'image height' rather than the misleading 'frame height'.
> 
> Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

> ---
> v2:
>  - Duplicated explicit text from v4l2_pix_format rather than
>    referencing it.
> 
>  Documentation/media/uapi/v4l/subdev-formats.rst | 8 ++++++--
>  include/uapi/linux/v4l2-mediabus.h              | 4 ++--
>  2 files changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/media/uapi/v4l/subdev-formats.rst b/Documentation/media/uapi/v4l/subdev-formats.rst
> index b1eea44550e1..9fcabe7f9367 100644
> --- a/Documentation/media/uapi/v4l/subdev-formats.rst
> +++ b/Documentation/media/uapi/v4l/subdev-formats.rst
> @@ -16,10 +16,14 @@ Media Bus Formats
>  
>      * - __u32
>        - ``width``
> -      - Image width, in pixels.
> +      - Image width in pixels.
>      * - __u32
>        - ``height``
> -      - Image height, in pixels.
> +      - Image height in pixels. If ``field`` is one of ``V4L2_FIELD_TOP``,
> +	``V4L2_FIELD_BOTTOM`` or ``V4L2_FIELD_ALTERNATE`` then height
> +	refers to the number of lines in the field, otherwise it refers to
> +	the number of lines in the frame (which is twice the field height
> +	for interlaced formats).
>      * - __u32
>        - ``code``
>        - Format code, from enum
> diff --git a/include/uapi/linux/v4l2-mediabus.h b/include/uapi/linux/v4l2-mediabus.h
> index 6e20de63ec59..123a231001a8 100644
> --- a/include/uapi/linux/v4l2-mediabus.h
> +++ b/include/uapi/linux/v4l2-mediabus.h
> @@ -18,8 +18,8 @@
>  
>  /**
>   * struct v4l2_mbus_framefmt - frame format on the media bus
> - * @width:	frame width
> - * @height:	frame height
> + * @width:	image width
> + * @height:	image height
>   * @code:	data format code (from enum v4l2_mbus_pixelcode)
>   * @field:	used interlacing type (from enum v4l2_field)
>   * @colorspace:	colorspace of the data (from enum v4l2_colorspace)
> -- 
> 2.7.4
> 

-- 
Regards,
Niklas Söderlund

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] v4l: doc: Clarify v4l2_mbus_fmt height definition
  2018-01-08 17:55 [PATCH v2] v4l: doc: Clarify v4l2_mbus_fmt height definition Kieran Bingham
  2018-01-08 21:13 ` Sakari Ailus
  2018-01-08 22:38 ` Niklas Söderlund
@ 2018-01-09  7:29 ` Hans Verkuil
  2 siblings, 0 replies; 4+ messages in thread
From: Hans Verkuil @ 2018-01-09  7:29 UTC (permalink / raw)
  To: Kieran Bingham, linux-media
  Cc: linux-renesas-soc, niklas.soderlund, sakari.ailus,
	Kieran Bingham, Mauro Carvalho Chehab, Jonathan Corbet,
	Archit Taneja, Neil Armstrong, open list

On 01/08/2018 06:55 PM, Kieran Bingham wrote:
> The v4l2_mbus_fmt width and height corresponds directly with the
> v4l2_pix_format definitions, yet the differences in documentation make
> it ambiguous what to do in the event of field heights.
> 
> Clarify this using the same text as is provided for the v4l2_pix_format
> which is explicit on the matter, and by matching the terminology of
> 'image height' rather than the misleading 'frame height'.
> 
> Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>

Regards,

	Hans

> ---
> v2:
>  - Duplicated explicit text from v4l2_pix_format rather than
>    referencing it.
> 
>  Documentation/media/uapi/v4l/subdev-formats.rst | 8 ++++++--
>  include/uapi/linux/v4l2-mediabus.h              | 4 ++--
>  2 files changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/media/uapi/v4l/subdev-formats.rst b/Documentation/media/uapi/v4l/subdev-formats.rst
> index b1eea44550e1..9fcabe7f9367 100644
> --- a/Documentation/media/uapi/v4l/subdev-formats.rst
> +++ b/Documentation/media/uapi/v4l/subdev-formats.rst
> @@ -16,10 +16,14 @@ Media Bus Formats
>  
>      * - __u32
>        - ``width``
> -      - Image width, in pixels.
> +      - Image width in pixels.
>      * - __u32
>        - ``height``
> -      - Image height, in pixels.
> +      - Image height in pixels. If ``field`` is one of ``V4L2_FIELD_TOP``,
> +	``V4L2_FIELD_BOTTOM`` or ``V4L2_FIELD_ALTERNATE`` then height
> +	refers to the number of lines in the field, otherwise it refers to
> +	the number of lines in the frame (which is twice the field height
> +	for interlaced formats).
>      * - __u32
>        - ``code``
>        - Format code, from enum
> diff --git a/include/uapi/linux/v4l2-mediabus.h b/include/uapi/linux/v4l2-mediabus.h
> index 6e20de63ec59..123a231001a8 100644
> --- a/include/uapi/linux/v4l2-mediabus.h
> +++ b/include/uapi/linux/v4l2-mediabus.h
> @@ -18,8 +18,8 @@
>  
>  /**
>   * struct v4l2_mbus_framefmt - frame format on the media bus
> - * @width:	frame width
> - * @height:	frame height
> + * @width:	image width
> + * @height:	image height
>   * @code:	data format code (from enum v4l2_mbus_pixelcode)
>   * @field:	used interlacing type (from enum v4l2_field)
>   * @colorspace:	colorspace of the data (from enum v4l2_colorspace)
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-01-09  7:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-08 17:55 [PATCH v2] v4l: doc: Clarify v4l2_mbus_fmt height definition Kieran Bingham
2018-01-08 21:13 ` Sakari Ailus
2018-01-08 22:38 ` Niklas Söderlund
2018-01-09  7:29 ` Hans Verkuil

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).