Linux Media Controller development
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@iki.fi>
To: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Cc: linux-media@vger.kernel.org,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>
Subject: Re: [PATCH 1/1] ARM: EXYNOS4: JPEG: driver initial release
Date: Sat, 15 Oct 2011 13:07:47 +0300	[thread overview]
Message-ID: <20111015100747.GI10001@valkosipuli.localdomain> (raw)
In-Reply-To: <20111014224046.GH10001@valkosipuli.localdomain>

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@iki.fi	jabber/XMPP/Gmail: sailus@retiisi.org.uk

  reply	other threads:[~2011-10-15 10:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-11 12:51 [PATCH 0/1] ARM: EXYNOS4: JPEG: driver initial release Andrzej Pietrasiewicz
2011-10-11 12:51 ` [PATCH 1/1] " Andrzej Pietrasiewicz
2011-10-14 22:40   ` Sakari Ailus
2011-10-15 10:07     ` Sakari Ailus [this message]
2011-10-17  6:24       ` Andrzej Pietrasiewicz

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=20111015100747.GI10001@valkosipuli.localdomain \
    --to=sakari.ailus@iki.fi \
    --cc=andrzej.p@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-media@vger.kernel.org \
    --cc=m.szyprowski@samsung.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