Re: [PATCH v2] media: i.MX27 camera: fix picture source width

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 12 Mar 2013, javier Martin wrote:

> Hi Guernnadi, Christoph,
> 
> On 12 March 2013 09:25, Christoph Fritz <chf.fritz@xxxxxxxxxxxxxx> wrote:
> > On Tue, 2013-03-12 at 08:58 +0100, Guennadi Liakhovetski wrote:
> >> On Thu, 7 Mar 2013, javier Martin wrote:
> >
> >> > What mbus format are you using? Could you please check if the s_width
> >> > value that your sensor mt9m001 returns is correct? Remember it should
> >> > be in pixels, not in bytes.
> >>
> >> Thanks for looking at this. But here's my question: for a pass-through
> >> mode mx2_camera uses a 16-bpp (RGB565) format. But what if it's actually
> >> an 8-bpp format, don't you then have to adjust line-width register
> >> settings? If you don't do that, the camera interface would expect a double
> >> number of bytes per line, so, it could get confused by HSYNC coming after
> >> half-line?
> 
> You are right.
> 
> > To emphasize this: I'm using here a mt9m001 (monochrome) camera with an
> > 8-bpp format.
> 
> Ok, now that makes sense.
> 
> Then, what you should do is apply your patch conditionally so that you
> don't break other working cases:
> - Channel 1 is being used.
> - Channel 1 is in pass-through mode.

which would be

	if (!prp->in_fmt && !prp->out_fmt)

> - The sensor uses an 8-bpp format.

No, the format in unimportant - you pretend to use a 16-bit format, so, 
your "simulated" line is always bytesperline / 2 pseudo-pixels long. 
Christoph, in your next comment please add a comment something like

	/*
	 * In pass-through we configure EMMA with a 16-bpp format,
	 * set the line-width accordingly.
	 */

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux