All of lore.kernel.org
 help / color / mirror / Atom feed
* Multiple Rectangle cropping
@ 2012-10-11 10:40 Ricardo Ribalda Delgado
  2012-10-11 22:32 ` Sakari Ailus
  0 siblings, 1 reply; 6+ messages in thread
From: Ricardo Ribalda Delgado @ 2012-10-11 10:40 UTC (permalink / raw)
  To: linux-media

Hello List

I want to port an old driver for an fpga based camera to the new media
infrastructure.

By reading the doc. I think it has almost all the capabilities needed.
The only one I am missing is the habilty to select multiple rectangles
from the sensor. ie: I have a 100x50 sensor and I want a 100x20 image
with the pixels from 0,0->100,10 and then 0,40->100,50

Any suggestion about how to implement this with the media api?

Regards.

-- 
Ricardo Ribalda

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Multiple Rectangle cropping
  2012-10-11 10:40 Multiple Rectangle cropping Ricardo Ribalda Delgado
@ 2012-10-11 22:32 ` Sakari Ailus
  2012-10-12  7:18   ` Ricardo Ribalda Delgado
  0 siblings, 1 reply; 6+ messages in thread
From: Sakari Ailus @ 2012-10-11 22:32 UTC (permalink / raw)
  To: Ricardo Ribalda Delgado; +Cc: linux-media

Hi Ricardo,

On Thu, Oct 11, 2012 at 12:40:03PM +0200, Ricardo Ribalda Delgado wrote:
> I want to port an old driver for an fpga based camera to the new media
> infrastructure.
> 
> By reading the doc. I think it has almost all the capabilities needed.
> The only one I am missing is the habilty to select multiple rectangles
> from the sensor. ie: I have a 100x50 sensor and I want a 100x20 image
> with the pixels from 0,0->100,10 and then 0,40->100,50
> 
> Any suggestion about how to implement this with the media api?

I suppose your FPGA does the cropping. You can use the V4L2 subdev selection
interface and crop on the source pads. Each will then have a link to a
capture video device.

<URL:http://hverkuil.home.xs4all.nl/spec/media.html#subdev>

Kind regards,

-- 
Sakari Ailus
e-mail: sakari.ailus@iki.fi	XMPP: sailus@retiisi.org.uk

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Multiple Rectangle cropping
  2012-10-11 22:32 ` Sakari Ailus
@ 2012-10-12  7:18   ` Ricardo Ribalda Delgado
  2012-10-12 10:19     ` Laurent Pinchart
  2012-10-15 20:50     ` Sakari Ailus
  0 siblings, 2 replies; 6+ messages in thread
From: Ricardo Ribalda Delgado @ 2012-10-12  7:18 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: linux-media

Hello

In fact, is the sensor, the one that supports multiple Areas of
Interest. Unfortunatelly the userland v4l2 api only supports one area
of interest for doing croping (or that is what I believe).

Is there any plan to support multiple AOI? or I have to make my own ioctl?


Regards

On Fri, Oct 12, 2012 at 12:32 AM, Sakari Ailus <sakari.ailus@iki.fi> wrote:
> Hi Ricardo,
>
> On Thu, Oct 11, 2012 at 12:40:03PM +0200, Ricardo Ribalda Delgado wrote:
>> I want to port an old driver for an fpga based camera to the new media
>> infrastructure.
>>
>> By reading the doc. I think it has almost all the capabilities needed.
>> The only one I am missing is the habilty to select multiple rectangles
>> from the sensor. ie: I have a 100x50 sensor and I want a 100x20 image
>> with the pixels from 0,0->100,10 and then 0,40->100,50
>>
>> Any suggestion about how to implement this with the media api?
>
> I suppose your FPGA does the cropping. You can use the V4L2 subdev selection
> interface and crop on the source pads. Each will then have a link to a
> capture video device.
>
> <URL:http://hverkuil.home.xs4all.nl/spec/media.html#subdev>
>
> Kind regards,
>
> --
> Sakari Ailus
> e-mail: sakari.ailus@iki.fi     XMPP: sailus@retiisi.org.uk



-- 
Ricardo Ribalda

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Multiple Rectangle cropping
  2012-10-12  7:18   ` Ricardo Ribalda Delgado
@ 2012-10-12 10:19     ` Laurent Pinchart
  2012-10-15 20:50     ` Sakari Ailus
  1 sibling, 0 replies; 6+ messages in thread
From: Laurent Pinchart @ 2012-10-12 10:19 UTC (permalink / raw)
  To: Ricardo Ribalda Delgado; +Cc: Sakari Ailus, linux-media

On Friday 12 October 2012 09:18:42 Ricardo Ribalda Delgado wrote:
> Hello
> 
> In fact, is the sensor, the one that supports multiple Areas of
> Interest. Unfortunatelly the userland v4l2 api only supports one area
> of interest for doing croping (or that is what I believe).
> 
> Is there any plan to support multiple AOI? or I have to make my own ioctl?

You should use the selection API (VIDIOC_SUBDEV_G_SELECTION and 
VIDIOC_SUBDEV_S_SELECTION). As a quick hack you can create custom selection 
rectangle types, but it might be worth creating new standard types.

-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Multiple Rectangle cropping
  2012-10-12  7:18   ` Ricardo Ribalda Delgado
  2012-10-12 10:19     ` Laurent Pinchart
@ 2012-10-15 20:50     ` Sakari Ailus
  2012-10-15 20:58       ` Ricardo Ribalda Delgado
  1 sibling, 1 reply; 6+ messages in thread
From: Sakari Ailus @ 2012-10-15 20:50 UTC (permalink / raw)
  To: Ricardo Ribalda Delgado; +Cc: linux-media

Hi Ricardo,

On Fri, Oct 12, 2012 at 09:18:42AM +0200, Ricardo Ribalda Delgado wrote:
> In fact, is the sensor, the one that supports multiple Areas of
> Interest. Unfortunatelly the userland v4l2 api only supports one area
> of interest for doing croping (or that is what I believe).
> 
> Is there any plan to support multiple AOI? or I have to make my own ioctl?

As a result, do you get two separate streams out of the device, or something
else? This is what I'd assume to get if I had two cropping rectangles.

Kind regards,

-- 
Sakari Ailus
e-mail: sakari.ailus@iki.fi	XMPP: sailus@retiisi.org.uk

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Multiple Rectangle cropping
  2012-10-15 20:50     ` Sakari Ailus
@ 2012-10-15 20:58       ` Ricardo Ribalda Delgado
  0 siblings, 0 replies; 6+ messages in thread
From: Ricardo Ribalda Delgado @ 2012-10-15 20:58 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: linux-media

Hello Sakari

I get the two areas sticked together. Of course both areas of interest
have the save width.

Kind Regards :)

On Mon, Oct 15, 2012 at 10:50 PM, Sakari Ailus <sakari.ailus@iki.fi> wrote:
> Hi Ricardo,
>
> On Fri, Oct 12, 2012 at 09:18:42AM +0200, Ricardo Ribalda Delgado wrote:
>> In fact, is the sensor, the one that supports multiple Areas of
>> Interest. Unfortunatelly the userland v4l2 api only supports one area
>> of interest for doing croping (or that is what I believe).
>>
>> Is there any plan to support multiple AOI? or I have to make my own ioctl?
>
> As a result, do you get two separate streams out of the device, or something
> else? This is what I'd assume to get if I had two cropping rectangles.
>
> Kind regards,
>
> --
> Sakari Ailus
> e-mail: sakari.ailus@iki.fi     XMPP: sailus@retiisi.org.uk



-- 
Ricardo Ribalda

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-10-15 20:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-11 10:40 Multiple Rectangle cropping Ricardo Ribalda Delgado
2012-10-11 22:32 ` Sakari Ailus
2012-10-12  7:18   ` Ricardo Ribalda Delgado
2012-10-12 10:19     ` Laurent Pinchart
2012-10-15 20:50     ` Sakari Ailus
2012-10-15 20:58       ` Ricardo Ribalda Delgado

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.