Linux Media Controller development
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Scott Jiang <scott.jiang.linux@gmail.com>,
	laurent.pinchart@ideasonboard.com, hverkuil@xs4all.nl,
	linux-media@vger.kernel.org
Subject: Re: v4l2_mbus_framefmt and v4l2_pix_format
Date: Wed, 25 May 2011 13:49:49 +0200	[thread overview]
Message-ID: <4DDCECDD.2030304@samsung.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1105251202530.13724@axis700.grange>

Hi Guennadi,

On 05/25/2011 12:11 PM, Guennadi Liakhovetski wrote:
> Hi Scott
> 
> On Wed, 25 May 2011, Scott Jiang wrote:
> 
>> Hi Hans and Laurent,
>>
>> I got fmt info from a video data source subdev, I thought there should
>> be a helper function to convert these two format enums.
>> However, v4l2_fill_pix_format didn't do this, why? Should I do this in
>> bridge driver one by one?
> 
> Because various camera hosts (bridges) can produce different pixel formats 
> in memory from the same mediabus code. However, there is a very common way 
> to handle such video data in the bridge: store it in RAM in a "natural" 
> way. This mode is called in soc-camera the pass-through mode and there is 
> an API to handle this mode in drivers/media/video/soc_mediabus.c. If this 

Sorry about getting off the topic a bit.

As some media bus formats require different conversion process in the bridge
to obtain specific format in memory (fourcc) I was wondering whether it would
be reasonable to indicate the "natural" fourccs for the applications when
enumerating formats supported by the bridge/DMA with VIDIOC_ENUM_FMT?
So applications are aware what are the "natural" formats and which require
lossy conversion. And in this way could choose formats that yield better
quality. 

Now there are following flags available for struct v4l2_fmtdesc::flags

V4L2_FMT_FLAG_COMPRESSED
V4L2_FMT_FLAG_EMULATED

I thought about something like V4L2_FMT_HW_EMULATED or V4L2_FMT_FLAG_LOW_QUALITY.

I not happy with those exact names but I hope that gives a basic idea what
I am talking about.  
Possibly I am missing other ways to achieve the same.

Regards,
-- 
Sylwester Nawrocki
Samsung Poland R&D Center

  reply	other threads:[~2011-05-25 11:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-25  9:56 v4l2_mbus_framefmt and v4l2_pix_format Scott Jiang
2011-05-25 10:10 ` Hans Verkuil
2011-05-25 10:11 ` Guennadi Liakhovetski
2011-05-25 11:49   ` Sylwester Nawrocki [this message]
2011-05-25 12:11     ` Guennadi Liakhovetski

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=4DDCECDD.2030304@samsung.com \
    --to=s.nawrocki@samsung.com \
    --cc=g.liakhovetski@gmx.de \
    --cc=hverkuil@xs4all.nl \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=scott.jiang.linux@gmail.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