public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <j.w.r.degoede@hhs.nl>
To: Jean-Francois Moine <moinejf@free.fr>
Cc: video4linux-list@redhat.com
Subject: PATCH: gspca, spca561:  fix low res modes
Date: Thu, 03 Jul 2008 12:41:25 +0200	[thread overview]
Message-ID: <486CACD5.1020307@hhs.nl> (raw)

[-- Attachment #1: Type: text/plain, Size: 278 bytes --]

Hi All,

The low (half) res modes of the spca561 are not spca561 compressed, but are
raw bayer, this patches fixes this and adds a PIX_FMT define for the GBRG
bayer format used by the spca561 in low res mode.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>

Regards,

Hans

[-- Attachment #2: gspca-spca561-low-res.patch --]
[-- Type: text/plain, Size: 1650 bytes --]

The low (half) res modes of the spca561 are not spca561 compressed, but are
raw bayer, this patches fixes this and adds a PIX_FMT define for the GBRG
bayer format used by the spca561 in low res mode.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
--- gspca-2bbb47f61a95/linux/drivers/media/video/gspca/spca561.c~	2008-07-03 12:34:09.000000000 +0200
+++ gspca-2bbb47f61a95/linux/drivers/media/video/gspca/spca561.c	2008-07-03 12:34:09.000000000 +0200
@@ -98,8 +98,8 @@ static struct ctrl sd_ctrls[] = {
 };
 
 static struct cam_mode sif_mode[] = {
-	{V4L2_PIX_FMT_SPCA561, 160, 120, 3},
-	{V4L2_PIX_FMT_SPCA561, 176, 144, 2},
+	{V4L2_PIX_FMT_SGBRG8, 160, 120, 3},
+	{V4L2_PIX_FMT_SGBRG8, 176, 144, 2},
 	{V4L2_PIX_FMT_SPCA561, 320, 240, 1},
 	{V4L2_PIX_FMT_SPCA561, 352, 288, 0},
 };
@@ -808,7 +808,7 @@ static void sd_pkt_scan(struct gspca_dev
 			gspca_frame_add(gspca_dev, FIRST_PACKET,
 					frame, data, len);
 		} else {
-			/*fixme: which format?*/
+			/* raw bayer (with a header, which we skip) */
 			data += 20;
 			len -= 20;
 			gspca_frame_add(gspca_dev, FIRST_PACKET,
--- gspca-2bbb47f61a95/linux/include/linux/videodev2.h~	2008-07-03 12:34:06.000000000 +0200
+++ gspca-2bbb47f61a95/linux/include/linux/videodev2.h	2008-07-03 12:34:06.000000000 +0200
@@ -310,6 +310,7 @@ struct v4l2_pix_format
 
 /* see http://www.siliconimaging.com/RGB%20Bayer.htm */
 #define V4L2_PIX_FMT_SBGGR8  v4l2_fourcc('B','A','8','1') /*  8  BGBG.. GRGR.. */
+#define V4L2_PIX_FMT_SGBRG8  v4l2_fourcc('G','B','R','G') /*  8  GBGB.. RGRG.. */
 #define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B','Y','R','2') /* 16  BGBG.. GRGR.. */
 
 /* compressed formats */

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

                 reply	other threads:[~2008-07-03 10:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=486CACD5.1020307@hhs.nl \
    --to=j.w.r.degoede@hhs.nl \
    --cc=moinejf@free.fr \
    --cc=video4linux-list@redhat.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