* Pixel Formats
@ 2013-03-07 3:59 Christian Rhodin
2013-03-07 21:37 ` Guennadi Liakhovetski
0 siblings, 1 reply; 3+ messages in thread
From: Christian Rhodin @ 2013-03-07 3:59 UTC (permalink / raw)
To: linux-media
Hi,
I'm looking for some guidance on the correct way to handle a new pixel
format. What I'm dealing with is a CMOS image sensor that supports
dynamic switching between linear and iHDR modes. iHDR stands for
"interlaced High Dynamic Range" and is a mode where odd and even lines
have different exposure times, typically with an 8:1 ratio. When I
started implementing a driver for this sensor I used
"V4L2_MBUS_FMT_SGRBG10_1X10" as the format for the linear mode and
defined a new format "V4L2_MBUS_FMT_SGRBG10_IHDR_1X10" for the iHDR
mode. I used the format to control which mode I put the sensor in. But
now I'm having trouble switching modes without reinitializing the
sensor. Does anyone (everyone?) have an opinion about the correct way
to implement this? I'm thinking that the format is overloaded because
it represents both the size and type of the data. Should I use a single
format and add a control to switch the mode?
Chris Rhodin
Aptina Imaging
Aptina, LLC / 3080 North First Street, San Jose, CA 95134
This e-mail and any attachments contain confidential information and are solely for the review and use of the intended recipient. If you have received this e-mail in error, please notify the sender and destroy this e-mail and any copies.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Pixel Formats
2013-03-07 3:59 Pixel Formats Christian Rhodin
@ 2013-03-07 21:37 ` Guennadi Liakhovetski
2013-04-12 10:17 ` Laurent Pinchart
0 siblings, 1 reply; 3+ messages in thread
From: Guennadi Liakhovetski @ 2013-03-07 21:37 UTC (permalink / raw)
To: Christian Rhodin; +Cc: linux-media
Hi Christian
On Wed, 6 Mar 2013, Christian Rhodin wrote:
> Hi,
>
> I'm looking for some guidance on the correct way to handle a new pixel
> format. What I'm dealing with is a CMOS image sensor that supports
> dynamic switching between linear and iHDR modes. iHDR stands for
> "interlaced High Dynamic Range" and is a mode where odd and even lines
> have different exposure times, typically with an 8:1 ratio. When I
> started implementing a driver for this sensor I used
> "V4L2_MBUS_FMT_SGRBG10_1X10" as the format for the linear mode and
> defined a new format "V4L2_MBUS_FMT_SGRBG10_IHDR_1X10" for the iHDR
> mode. I used the format to control which mode I put the sensor in. But
> now I'm having trouble switching modes without reinitializing the
> sensor. Does anyone (everyone?) have an opinion about the correct way
> to implement this? I'm thinking that the format is overloaded because
> it represents both the size and type of the data. Should I use a single
> format and add a control to switch the mode?
I would vote for a single format with a control, maybe even somehow
cluster it with the normal exposure, but I'm not an expert in that, not
sure if it would make sense.
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Pixel Formats
2013-03-07 21:37 ` Guennadi Liakhovetski
@ 2013-04-12 10:17 ` Laurent Pinchart
0 siblings, 0 replies; 3+ messages in thread
From: Laurent Pinchart @ 2013-04-12 10:17 UTC (permalink / raw)
To: Guennadi Liakhovetski; +Cc: Christian Rhodin, linux-media
(A bit late, sorry)
On Thursday 07 March 2013 22:37:26 Guennadi Liakhovetski wrote:
> On Wed, 6 Mar 2013, Christian Rhodin wrote:
> > Hi,
> >
> > I'm looking for some guidance on the correct way to handle a new pixel
> > format. What I'm dealing with is a CMOS image sensor that supports
> > dynamic switching between linear and iHDR modes. iHDR stands for
> > "interlaced High Dynamic Range" and is a mode where odd and even lines
> > have different exposure times, typically with an 8:1 ratio. When I
> > started implementing a driver for this sensor I used
> > "V4L2_MBUS_FMT_SGRBG10_1X10" as the format for the linear mode and
> > defined a new format "V4L2_MBUS_FMT_SGRBG10_IHDR_1X10" for the iHDR
> > mode. I used the format to control which mode I put the sensor in. But
> > now I'm having trouble switching modes without reinitializing the
> > sensor. Does anyone (everyone?) have an opinion about the correct way
> > to implement this? I'm thinking that the format is overloaded because
> > it represents both the size and type of the data. Should I use a single
> > format and add a control to switch the mode?
>
> I would vote for a single format with a control, maybe even somehow
> cluster it with the normal exposure, but I'm not an expert in that, not
> sure if it would make sense.
>From the above explanation about iHDR I assume that enabling iHDR mode
produces an image with the same resolution as linear mode, not an image with 8
times the number of lines compared to the linear mode. Please correct me if
I'm wrong.
If my understanding of iHDR mode is correct, I agree with Guennadi. I don't
think enabling iHDR changes the format, it "just" modifies the exposure time
algorithm. A V4L2 control would thus be better than adding an iHDR variant to
all existing formats.
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-04-12 10:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-07 3:59 Pixel Formats Christian Rhodin
2013-03-07 21:37 ` Guennadi Liakhovetski
2013-04-12 10:17 ` Laurent Pinchart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).