public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <snjw23@gmail.com>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>,
	linux-media@vger.kernel.org, g.liakhovetski@gmx.de,
	laurent.pinchart@ideasonboard.com, m.szyprowski@samsung.com,
	riverful.kim@samsung.com, sw0312.kim@samsung.com,
	Kyungmin Park <kyungmin.park@samsung.com>
Subject: Re: [RFC/PATCH 1/6] V4L: Add V4L2_MBUS_FMT_VYUY_JPEG_I1_1X8 media bus format
Date: Mon, 27 Feb 2012 22:25:21 +0100	[thread overview]
Message-ID: <4F4BF4C1.2050803@gmail.com> (raw)
In-Reply-To: <4F4AB167.7020906@iki.fi>

Hi Sakari,

On 02/26/2012 11:25 PM, Sakari Ailus wrote:
>>> I think we could use the framesize control to tell the size of the frame, or
>>> however it is done for jpeg blobs.
>>
>> Yes, we could add a standard framesize control to the Image Source class but it
>> will solve only part of the problem. Nevertheless it might be worth to have it.
>> It could be used by applications to configure subdevs directly, while the host
>> drivers could use e.g. s/g_frame_config op for that.
> 
> (I think we could continue this discussion in the context of the RFC.)

Sure, let's continue in your RFC thread.

>>> The issue I see in the pass-through mode is that the user would have no
>>> information whatsoever what he's getting. This would be perhaps fixed by
>>> adding the frame format descriptor: it could contain information how to
>>> handle the data. (Just thinking out loud. :))
>>
>> Do you mean a user space application by "user" ?
> 
> Yeah.
> 
>> I'd like to clearly separate blob media bus pixel codes and hardware-specific
>> blob fourccs. If we don't want to change fundamental assumptions of V4L2
>> we likely need separate fourccs for each weird format.
>>
>> I can imagine "pass-through" media bus pixel code but a transparent fourcc
>> sounds like a higher abstraction. :)
> 
> I agree... how about this:
> 
> We currently provide the information on the media bus pixel code to the
> CSI-2 receivers but most of the time it's not necessary for them to know
> what the pixel code exactly is: it doesn't do anything with the data but
> writes it to memory. Bits uncompressed, compressed and the compression
> method are enough --- if uncompression is desired. Even pixel order
> isn't always needed.

I don't think so. For all image formats defined by MIPI-CSI2 standard a pixel 
code is necessary. Sample compression or bit expansion is most of the time 
related to a specific image format. A MIPI-CSI2 receiver must know an exact 
image format, otherwise it won't be able to decode data from the low level 
protocol.

> What might make sense is to provide generic table with pixel code
> related information, such as bits compressed and uncompressed, pixel
> order, compression method and default 4CC.

This doesn't look like an improvement to me, most of these information we 
now have in single 4-byte media bus pixel code. Do you want the drivers 
to search such tables by comparing all those parameters ?

> Custom formats would only be present in this table without individual
> CSI-2 receiver drivers having to know about them. Same goes with 4CC's.

Media bus/fourcc translation tables will always be driver-specific. There 
have already been discussions about centralizing such tables IIRC. All you
can have is probably just some default ("statistical") fourcc, which is really
useful for nothing. 

Having a bunch of parameters for each custom format could be useful probably
only if we've dropped an assumption that each hardware specific data format 
gets it's own fourcc, and have exposed those parameters to the user space.

The multi-planar formats complicate things further. Now the fourcc determines
whether a v4l2 buffer is has more than one data plane.

--

Regards,
Sylwester

  reply	other threads:[~2012-02-27 21:25 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-16 18:23 [RFC/PATCH 0/6] Interleaved image data on media bus Sylwester Nawrocki
2012-02-16 18:23 ` [RFC/PATCH 1/6] V4L: Add V4L2_MBUS_FMT_VYUY_JPEG_I1_1X8 media bus format Sylwester Nawrocki
2012-02-16 19:46   ` Sakari Ailus
2012-02-17 14:26     ` Sylwester Nawrocki
2012-02-17 18:15       ` Sakari Ailus
2012-02-18 15:51         ` Sylwester Nawrocki
2012-02-26 22:25           ` Sakari Ailus
2012-02-27 21:25             ` Sylwester Nawrocki [this message]
2012-02-17 23:22       ` Laurent Pinchart
2012-02-16 18:23 ` [RFC/PATCH 2/6] V4L: Add V4L2_PIX_FMT_JPG_YUV_S5C fourcc definition Sylwester Nawrocki
2012-02-16 18:23 ` [RFC/PATCH 3/6] V4L: Add g_embedded_data subdev callback Sylwester Nawrocki
2012-02-17 23:23   ` Laurent Pinchart
2012-02-17 23:33     ` Sylwester Nawrocki
2012-02-18  1:43       ` Laurent Pinchart
2012-02-18  2:20         ` Sakari Ailus
2012-02-18 15:18         ` Sylwester Nawrocki
2012-02-16 18:23 ` [RFC/PATCH 4/6] V4L: Add get/set_frame_config subdev callbacks Sylwester Nawrocki
2012-02-16 22:44   ` Sakari Ailus
2012-02-17 10:48     ` Sylwester Nawrocki
2012-02-16 18:23 ` [RFC/PATCH 5/6] s5p-fimc: Add support for V4L2_PIX_FMT_JPG_YUYV_S5C fourcc Sylwester Nawrocki
2012-02-16 18:23 ` [RFC/PATCH 6/6] s5p-csis: Add support for non-image data packets capture 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=4F4BF4C1.2050803@gmail.com \
    --to=snjw23@gmail.com \
    --cc=g.liakhovetski@gmx.de \
    --cc=kyungmin.park@samsung.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=riverful.kim@samsung.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox