Re: [PATCH 1/1] ARM: EXYNOS4: JPEG: driver initial release

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

 



On Sat, Oct 15, 2011 at 01:40:46AM +0300, Sakari Ailus wrote:
> Hi Andrzej,
> 
> Thanks for the patch! Interesting to see a hardware jpeg encoder using V4L2!
> 
> I have a few comments below. As a whole, this driver looks quite good to me.
> 
> On Tue, Oct 11, 2011 at 02:51:32PM +0200, Andrzej Pietrasiewicz wrote:
...
> > +static struct s5p_jpeg_fmt *s5p_jpeg_find_format(struct s5p_jpeg_fmt *formats,
> > +						 int n, struct v4l2_format *f)
> > +{
> > +	struct s5p_jpeg_fmt *fmt;
> > +	unsigned int k;
> > +	for (k = 0; k < n; k++) {
> 
> You can define fmt here.
> 
> > +		fmt = &formats[k];
> > +		if (fmt->fourcc == f->fmt.pix.pixelformat)
> 
> If you're only interested in pixelformat then you should pass that to the
> function, not v4l2_format.

You could clean this up a lot if you just gave ctx->mode as the argument to
s5p_jpeg_find_format rather than the format table and it size: there are
only two alternatives for the table after all.

-- 
Sakari Ailus
e-mail: sakari.ailus@xxxxxx	jabber/XMPP/Gmail: sailus@xxxxxxxxxxxxxx
--
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