public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Eino-Ville Talvala <talvala@stanford.edu>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-media@vger.kernel.org,
	Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Subject: Re: [RFC] Cropping and scaling with subdev pad-level operations
Date: Tue, 11 Jan 2011 11:06:52 -0800	[thread overview]
Message-ID: <4D2CAA4C.7060803@stanford.edu> (raw)
In-Reply-To: <201101061633.30029.laurent.pinchart@ideasonboard.com>

On 1/6/2011 7:33 AM, Laurent Pinchart wrote:
> Hi everybody,
...
> The OMAP3 ISP resizer currently implements the second option, and I'll modify
> it to implement the first option. The drawback is that some crop/output
> combinations will require an extra step to be achieved. I'd like your opinion
> on this issue. Is the behaviour described in option one acceptable ? Should
> the API be extended/modified to make it simpler for applications to configure
> the various sizes in the image pipeline ? Are we all doomed and will we have
> to use a crop/scale API that nobody will ever understand ? :-)
>
I'm personally a big fan of having some way to atomically set multiple 
settings at once, exactly to avoid these sorts of problems. The 
fundamental problem here is that the interface implicitly assumes that 
every intermediate state has to be a valid one, when during device 
configuration most states are transitory because the application hasn't 
finished configuring the pipeline/sensor/etc, and the state shouldn't 
get vetted and adjusted until the configuration is complete.  The 
VIDOC_S_EXT_CTRLS seems like a reasonable solution - can't something 
like that apply to the subdev interfaces? (Or am I missing something 
beyond that?)

Similar issues have cropped up for us with other interdependent settings 
like exposure time/frame duration, or the cropping/scaling options found 
directly on the mt9p031 sensor, which are quite analogous to your issue 
- there's 1-4x scaling and a selectable ROI, which interact, especially 
during streaming when a constant output size has to be maintained.  What 
I ended up doing was effectively hacking in an atomic control update 
procedure for the old v4l2_int_device stuff (very hacky), but then I 
didn't have to worry about it any more.

In general, I'd be worried if executing the same stream of control 
updates in a different order gave a different final result.  With atomic 
updates, you'd still have to decide how to round to the closest valid 
state, but at least it'd be consistent.

Regards,

Eino-Ville Talvala
Stanford University

  parent reply	other threads:[~2011-01-11 19:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-06 15:33 [RFC] Cropping and scaling with subdev pad-level operations Laurent Pinchart
2011-01-06 18:28 ` Andy Walls
2011-01-07 14:16   ` Laurent Pinchart
2011-01-11 19:06 ` Eino-Ville Talvala [this message]
2011-01-12  9:01   ` Laurent Pinchart
2011-01-11 23:31 ` Sylwester Nawrocki
2011-01-12  9:06   ` Laurent Pinchart
2011-01-14 16:02     ` Hans Verkuil
2011-01-19 17:19       ` Sakari Ailus

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=4D2CAA4C.7060803@stanford.edu \
    --to=talvala@stanford.edu \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=sakari.ailus@maxwell.research.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