public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
To: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Hans Verkuil <hverkuil@xs4all.nl>,
	"Hiremath, Vaibhav" <hvaibhav@ti.com>,
	Devin Heitmueller <dheitmueller@kernellabs.com>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	Cohen David Abraham <david.cohen@nokia.com>,
	"Koskipaa Antti (Nokia-D/Helsinki)" <antti.koskipaa@nokia.com>,
	Zutshi Vimarsh <vimarsh.zutshi@nokia.com>
Subject: Re: RFCv2: Media controller proposal
Date: Mon, 21 Sep 2009 20:22:54 +0300	[thread overview]
Message-ID: <4AB7B66E.6080308@maxwell.research.nokia.com> (raw)
In-Reply-To: <20090911183758.31184072@caramujo.chehab.org>

Mauro Carvalho Chehab wrote:
> Em Fri, 11 Sep 2009 22:15:15 +0200
> Hans Verkuil <hverkuil@xs4all.nl> escreveu:
> 
>> On Friday 11 September 2009 21:59:37 Mauro Carvalho Chehab wrote:
>>> Em Fri, 11 Sep 2009 21:23:44 +0200
>>> Hans Verkuil <hverkuil@xs4all.nl> escreveu:
>>>> The second problem is that this will pollute the 'namespace' of a v4l device
>>>> node. Device drivers need to pass all those private ioctls to the right
>>>> sub-device. But they shouldn't have to care about that. If someone wants to
>>>> tweak the resizer (e.g. scaling coefficients), then pass it straight to the
>>>> resizer component.
>>> Sorry, I missed your point here
>> Example: a sub-device can produce certain statistics. You want to have an
>> ioctl to obtain those statistics. If you call that through /dev/videoX, then
>> that main driver has to handle that ioctl in vidioc_default and pass it on
>> to the right subdev. So you have to write that vidioc_default handler,
>> know about the sub-devices that you have and which sub-device is linked to
>> the device node. You really don't want to have to do that. Especially not
>> when you are dealing with i2c devices that are loaded from platform code.
>> If a video encoder supports private ioctls, then an omap3 driver doesn't
>> want to know about that. Oh, and before you ask: just broadcasting that
>> ioctl is not a solution if you have multiple identical video encoders.
> 
> This can be as easy as reading from /sys/class/media/dsp:stat0/stats

In general, the H3A block producing the statistics is configured first,
after which it starts producing statistics. Statistics buffers are
usually smallish, the maximum size is half MiB or so. For such a buffer
you'd have to ask the data for a number of times since the sysfs show() 
limit is one page (4 kiB usually).

Statistics are also often available before the actual frame since the
whole frame is not used to compute them. The statistics are used by e.g.
the AEWB algorithm which then comes up with the new exposure and gain
values. Applying them to the sensor in time is important since the
sensor may start exposing a new frame already before the last one has ended.

This requires event delivery to userspace (Laurent has written about it
under subject "[RFC] Video events").

-- 
Sakari Ailus
sakari.ailus@maxwell.research.nokia.com




  parent reply	other threads:[~2009-09-22 18:25 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-10  7:13 RFCv2: Media controller proposal Hans Verkuil
2009-09-10 13:01 ` Patrick Boettcher
2009-09-10 13:50   ` Hans Verkuil
2009-09-10 14:24     ` Patrick Boettcher
2009-09-10 15:00       ` Hans Verkuil
2009-09-10 19:19         ` Karicheri, Muralidharan
2009-09-10 20:27           ` Hans Verkuil
2009-09-10 23:08             ` Karicheri, Muralidharan
2009-09-11  6:20               ` Hans Verkuil
2009-09-11  6:29                 ` Hiremath, Vaibhav
2009-09-11  6:26             ` Hiremath, Vaibhav
2009-09-15 11:36         ` Laurent Pinchart
2009-09-10 20:20 ` Mauro Carvalho Chehab
2009-09-10 20:27   ` Devin Heitmueller
2009-09-11 12:59     ` Mauro Carvalho Chehab
2009-09-10 21:35   ` Hans Verkuil
2009-09-11 15:13     ` Mauro Carvalho Chehab
2009-09-11 15:46       ` Devin Heitmueller
2009-09-11 15:53         ` Hiremath, Vaibhav
2009-09-11 17:03           ` Mauro Carvalho Chehab
2009-09-11 17:34             ` Hiremath, Vaibhav
2009-09-11 18:52               ` Mauro Carvalho Chehab
2009-09-11 19:23                 ` Hans Verkuil
2009-09-11 19:59                   ` Mauro Carvalho Chehab
2009-09-11 20:15                     ` Hans Verkuil
2009-09-11 21:37                       ` Mauro Carvalho Chehab
2009-09-11 22:25                         ` Hans Verkuil
2009-09-21 17:22                         ` Sakari Ailus [this message]
2009-10-27  8:04                           ` Guennadi Liakhovetski
2009-10-27 13:56                             ` Devin Heitmueller
2009-11-05 14:22                               ` Hans Verkuil
2009-11-05 16:02                                 ` Devin Heitmueller
2009-11-05 16:23                                 ` Mauro Carvalho Chehab
2009-09-11 19:08       ` Hans Verkuil
2009-09-11 19:54         ` Mauro Carvalho Chehab
2009-09-11 20:29           ` Hans Verkuil
2009-09-11 21:28             ` Mauro Carvalho Chehab
2009-09-11 22:39               ` Hans Verkuil
2009-09-16 18:15                 ` Mauro Carvalho Chehab
2009-09-16 19:21                   ` Hans Verkuil
2009-09-16 20:38                     ` Guennadi Liakhovetski
2009-09-16 20:50                     ` Mauro Carvalho Chehab
2009-09-16 21:34                       ` Hans Verkuil
2009-09-16 22:15                         ` Andy Walls
2009-09-17  6:35                           ` Hans Verkuil
2009-09-17 11:59                             ` Mauro Carvalho Chehab
2009-09-17 12:44                         ` Mauro Carvalho Chehab
2009-09-16 22:28                       ` Karicheri, Muralidharan
2009-09-17  6:34                         ` Hans Verkuil
2009-09-17 12:11                           ` Mauro Carvalho Chehab
2009-09-17 12:53                             ` Nova S2 HD scanning problems Claes Lindblom
2009-09-18  6:42                               ` Claes Lindblom
2009-09-10 21:28 ` RFCv2: Media controller proposal Guennadi Liakhovetski
2009-09-10 21:59   ` Hans Verkuil
2009-09-15 12:28     ` Laurent Pinchart
2009-09-11  6:16 ` Hiremath, Vaibhav
2009-09-11  6:35   ` Hans Verkuil

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=4AB7B66E.6080308@maxwell.research.nokia.com \
    --to=sakari.ailus@maxwell.research.nokia.com \
    --cc=antti.koskipaa@nokia.com \
    --cc=david.cohen@nokia.com \
    --cc=dheitmueller@kernellabs.com \
    --cc=hvaibhav@ti.com \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=vimarsh.zutshi@nokia.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