All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: linux-media@vger.kernel.org, a.hajda@samsung.com,
	sakari.ailus@iki.fi, hverkuil@xs4all.nl,
	kyungmin.park@samsung.com, sw0312.kim@samsung.com
Subject: Re: [PATCH RFC v3 2/5] V4L: Add V4L2_PIX_FMT_S5C_UYVY_JPG fourcc definition
Date: Thu, 27 Sep 2012 13:10:06 +0200	[thread overview]
Message-ID: <1883596.GzBn8PVzcb@avalon> (raw)
In-Reply-To: <1348674853-24596-3-git-send-email-s.nawrocki@samsung.com>

Hi Sylwester,

Thank you for the patch.

On Wednesday 26 September 2012 17:54:10 Sylwester Nawrocki wrote:
> This patch adds definition of the Samsung S5C73M3 camera specific
> image format. V4L2_PIX_FMT_S5C_UYVY_JPG is a two-planar format,
> the  first plane contains interleaved UYVY and JPEG data followed
> by meta-data. The second plane contains additional meta-data needed
> for extracting JPEG and UYVY data stream from the first plane.
> 
> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
>  Documentation/DocBook/media/v4l/pixfmt.xml | 28 +++++++++++++++++++++++++++
>  include/linux/videodev2.h                  |  1 +
>  2 files changed, 29 insertions(+)
> 
> diff --git a/Documentation/DocBook/media/v4l/pixfmt.xml
> b/Documentation/DocBook/media/v4l/pixfmt.xml index 1ddbfab..21284ba 100644
> --- a/Documentation/DocBook/media/v4l/pixfmt.xml
> +++ b/Documentation/DocBook/media/v4l/pixfmt.xml
> @@ -996,6 +996,34 @@ the other bits are set to 0.</entry>
>  	    <entry>Old 6-bit greyscale format. Only the most significant 6 bits 
of
> each byte are used, the other bits are set to 0.</entry>
>  	  </row>
> +	  <row id="V4L2-PIX-FMT-S5C-UYVY-JPG">
> +	    <entry><constant>V4L2_PIX_FMT_S5C_UYVY_JPG</constant></entry>
> +	    <entry>'S5CI'</entry>
> +	    <entry>Two-planar format used by Samsung S5C73MX cameras. The
> +first plane contains interleaved JPEG and UYVY image data, followed by meta
> data in form of an array of offsets to the UYVY data blocks. The actual
> pointer array follows immediately the interleaved JPEG/UYVY data, the number
> of entries in this array equals the height of the UYVY image. Each entry is
> a 4-byte unsigned integer in big endian order and it's an offset to a single
> pixel line of the UYVY image. The first plane can start either with JPEG or
> UYVY data chunk. The size of a single UYVY block equals the UYVY image's
> width multiplied by 2. The size of a JPEG chunk depends on the image and can
> vary with each line.
> +<para>The second plane, at an offset of 4084 bytes, contains a 4-byte
> offset to the pointer array in the first plane. This offset is followed by a
> 4-byte value indicating size of the pointer array. All numbers in the second
> plane are also in big endian order. Remaining data in the first plane is
> undefined.

Do you mean "remaining data in the second plane is undefined." ?

Can it still be useful for some applications, or is it complete garbage ?

> The information in the second plane allows to easily find location of the
> pointer array, which can be different for each frame. The size of the
> pointer array is +constant for given UYVY image height.</para>
> +<para>In order to extract UYVY and JPEG frames an application can initially
> set a data pointer to the start of first plane and then add an offset from
> the first entry of the pointers table. Such a pointer indicates start of an
> UYVY image pixel line. Whole UYVY line can be copied to a separate buffer.
> These steps should be repeated for each line, i.e. the number of entries in
> the pointer array. Anything what's in between the UYVY lines is JPEG data
> and should be concatenated to form the JPEG stream. </para>
> +</entry>
> +	  </row>
>  	</tbody>
>        </tgroup>
>      </table>
> diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
> index 8d29bb2..6c82ff5 100644
> --- a/include/linux/videodev2.h
> +++ b/include/linux/videodev2.h
> @@ -436,6 +436,7 @@ struct v4l2_pix_format {
>  #define V4L2_PIX_FMT_KONICA420  v4l2_fourcc('K', 'O', 'N', 'I') /* YUV420
> planar in blocks of 256 pixels */ #define
> V4L2_PIX_FMT_JPGL	v4l2_fourcc('J', 'P', 'G', 'L') /* JPEG-Lite */ #define
> V4L2_PIX_FMT_SE401      v4l2_fourcc('S', '4', '0', '1') /* se401 janggu
> compressed rgb */ +#define V4L2_PIX_FMT_S5C_UYVY_JPG v4l2_fourcc('S', '5',
> 'C', 'J') /* S5C73M3 interleaved UYVY/JPEG */
> 
>  /*
>   *	F O R M A T   E N U M E R A T I O N
-- 
Regards,

Laurent Pinchart


  reply	other threads:[~2012-09-27 11:09 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-26 15:54 [PATCH RFC v3 0/5] s5p-fimc: Add interleaved image data capture support Sylwester Nawrocki
2012-09-26 15:54 ` [PATCH RFC v3 1/5] V4L: Add V4L2_MBUS_FMT_S5C_UYVY_JPEG_1X8 media bus format Sylwester Nawrocki
2012-09-26 15:54 ` [PATCH RFC v3 2/5] V4L: Add V4L2_PIX_FMT_S5C_UYVY_JPG fourcc definition Sylwester Nawrocki
2012-09-27 11:10   ` Laurent Pinchart [this message]
     [not found]     ` <50648A55.9020100@gmail.com>
2012-09-27 23:22       ` Laurent Pinchart
2012-09-26 15:54 ` [PATCH RFC v3 3/5] s5p-csis: Add support for non-image data packets capture Sylwester Nawrocki
2012-09-26 15:54 ` [PATCH RFC v3 4/5] s5p-fimc: Add support for V4L2_PIX_FMT_S5C_UYVY_JPG fourcc Sylwester Nawrocki
2012-09-26 15:54 ` [PATCH RFC v3 5/5] m5mols: Implement .get_frame_desc subdev callback Sylwester Nawrocki
2012-10-06 15:24   ` Media_build broken by " Jan Hoogenraad
2012-10-06 18:23     ` Sylwester Nawrocki
2012-10-06 18:43       ` Jan Hoogenraad
2012-10-06 21:34         ` Sylwester Nawrocki
2012-10-07  1:19           ` Michael West
2012-10-07  9:55             ` Hans Verkuil
2012-10-07 11:13             ` Sylwester Nawrocki
2012-10-08 13:03               ` Hans Verkuil
2012-10-10  1:05                 ` Mauro Carvalho Chehab
2012-10-10  6:27                   ` Hans Verkuil
2012-10-10  9:34                     ` Sylwester Nawrocki
2012-10-10 10:39                     ` Mauro Carvalho Chehab
2012-10-10 10:52                       ` Hans Verkuil
2012-10-10 10:57                         ` Mauro Carvalho Chehab
2012-10-08 20:42     ` Laurent Pinchart
2012-10-09 11:38       ` Sylwester Nawrocki

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=1883596.GzBn8PVzcb@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=a.hajda@samsung.com \
    --cc=hverkuil@xs4all.nl \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-media@vger.kernel.org \
    --cc=s.nawrocki@samsung.com \
    --cc=sakari.ailus@iki.fi \
    --cc=sw0312.kim@samsung.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.