From: khalasa@piap.pl (Krzysztof Hałasa)
To: Greg Kroah-Hartman <greg@kroah.com>
Cc: Ben Collins <bcollins@bluecherry.net>, linux-kernel@vger.kernel.org
Subject: [PATCH 1/7] Solo6x10: accept WxH >= screen dimentions.
Date: Fri, 11 Feb 2011 13:10:30 +0100 [thread overview]
Message-ID: <m3lj1mrcuh.fsf@t19.piap.pl> (raw)
In-Reply-To: <m3sjvurd2f.fsf@t19.piap.pl> ("Krzysztof Hałasa"'s message of "Fri, 11 Feb 2011 13:05:44 +0100")
This makes it possible to request full resolution (704x576 or 704x480)
independently of the color system used (PAL or NTSC).
Signed-off-by: Krzysztof Hałasa <khalasa@piap.pl>
diff --git a/drivers/staging/solo6x10/solo6010-v4l2-enc.c b/drivers/staging/solo6x10/solo6010-v4l2-enc.c
index 7bbb940..2b3d30b 100644
--- a/drivers/staging/solo6x10/solo6010-v4l2-enc.c
+++ b/drivers/staging/solo6x10/solo6010-v4l2-enc.c
@@ -1034,13 +1034,17 @@ static int solo_enc_try_fmt_cap(struct file *file, void *priv,
if (pix->width != solo_enc->width ||
pix->height != solo_enc->height)
return -EBUSY;
- } else if (!(pix->width == solo_dev->video_hsize &&
- pix->height == solo_dev->video_vsize << 1) &&
- !(pix->width == solo_dev->video_hsize >> 1 &&
- pix->height == solo_dev->video_vsize)) {
+ }
+
+ if (pix->width < solo_dev->video_hsize ||
+ pix->height < solo_dev->video_vsize << 1) {
/* Default to CIF 1/2 size */
pix->width = solo_dev->video_hsize >> 1;
pix->height = solo_dev->video_vsize;
+ } else {
+ /* Full frame */
+ pix->width = solo_dev->video_hsize;
+ pix->height = solo_dev->video_vsize << 1;
}
if (pix->field == V4L2_FIELD_ANY)
--
Krzysztof Halasa
Research Institute for Automation and Measurements
Al. Jerozolimskie 202, 02-486 Warsaw, Poland
next prev parent reply other threads:[~2011-02-11 12:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-11 12:05 [STAGING] Solo6x10 driver Krzysztof Hałasa
2011-02-11 12:10 ` Krzysztof Hałasa [this message]
2011-02-11 12:25 ` [PATCH 2/7] Solo6x10: Build MPEG4 headers on the fly Krzysztof Hałasa
2011-02-11 12:29 ` [PATCH 3/7] Solo6x10: Align MPEG video on 8-byte boundary instead of 32-byte Krzysztof Hałasa
2011-02-11 12:32 ` [PATCH 4/7] Solo6x10: Add support for SOLO6110 chip Krzysztof Hałasa
2011-02-11 12:33 ` [PATCH 5/7] Solo6x10: remove unneeded __solo parameter from SOLO_*_EXT_ADDR macros Krzysztof Hałasa
2011-02-11 12:36 ` [PATCH 6/7] Solo6x10: Stripped "solo6010-" from file names Krzysztof Hałasa
2011-02-11 12:38 ` [PATCH 7/7] Solo6x10: Changed solo6010* -> solo*, solo6x10* etc Krzysztof Hałasa
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=m3lj1mrcuh.fsf@t19.piap.pl \
--to=khalasa@piap.pl \
--cc=bcollins@bluecherry.net \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
/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