From patchwork Sat Oct 3 18:11:33 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?TsODwqltZXRoIE3Dg8KhcnRvbg==?= X-Patchwork-Id: 51547 X-Patchwork-Delegate: dougsland@redhat.com Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n93IFbbl001070 for ; Sat, 3 Oct 2009 18:15:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756710AbZJCSMP (ORCPT ); Sat, 3 Oct 2009 14:12:15 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756698AbZJCSMP (ORCPT ); Sat, 3 Oct 2009 14:12:15 -0400 Received: from mail01a.mail.t-online.hu ([84.2.40.6]:49158 "EHLO mail01a.mail.t-online.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754769AbZJCSMO (ORCPT ); Sat, 3 Oct 2009 14:12:14 -0400 Received: from [192.168.1.64] (dsl54029FEE.pool.t-online.hu [84.2.159.238]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail01a.mail.t-online.hu (Postfix) with ESMTPSA id 31CFB797EB7; Sat, 3 Oct 2009 20:06:46 +0200 (CEST) Message-ID: <4AC793D5.3010305@freemail.hu> Date: Sat, 03 Oct 2009 20:11:33 +0200 From: =?ISO-8859-2?Q?N=E9meth_M=E1rton?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; hu-HU; rv:1.8.1.21) Gecko/20090402 SeaMonkey/1.1.16 MIME-Version: 1.0 To: Jean-Francois Moine , Thomas Kaiser CC: V4L Mailing List Subject: [PATCH] pac7311: add comment about JPEG header X-DCC-mail.t-online.hu-Metrics: mail01a.mail.t-online.hu 32721; Body=3 Fuz1=3 Fuz2=3 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org diff -upr e/drivers/media/video/gspca/pac7311.c f/drivers/media/video/gspca/pac7311.c --- e/drivers/media/video/gspca/pac7311.c 2009-10-03 16:23:37.000000000 +0200 +++ f/drivers/media/video/gspca/pac7311.c 2009-10-03 19:56:21.000000000 +0200 @@ -801,13 +801,32 @@ static void do_autogain(struct gspca_dev sd->autogain_ignore_frames = PAC_AUTOGAIN_IGNORE_FRAMES; } +/* JPEG header, part 1 */ static const unsigned char pac7311_jpeg_header1[] = { - 0xff, 0xd8, 0xff, 0xc0, 0x00, 0x11, 0x08 + 0xff, 0xd8, /* SOI: Start of Image */ + + 0xff, 0xc0, /* SOF0: Start of Frame (Baseline DCT) */ + 0x00, 0x11, /* length = 17 bytes (including this length field) */ + 0x08 /* Precision: 8 */ + /* 2 bytes is placed here: number of image lines */ + /* 2 bytes is placed here: samples per line */ }; +/* JPEG header, continued */ static const unsigned char pac7311_jpeg_header2[] = { - 0x03, 0x01, 0x21, 0x00, 0x02, 0x11, 0x01, 0x03, 0x11, 0x01, 0xff, 0xda, - 0x00, 0x0c, 0x03, 0x01, 0x00, 0x02, 0x11, 0x03, 0x11, 0x00, 0x3f, 0x00 + 0x03, /* Number of image components: 3 */ + 0x01, 0x21, 0x00, /* ID=1, Subsampling 1x1, Quantization table: 0 */ + 0x02, 0x11, 0x01, /* ID=2, Subsampling 2x1, Quantization table: 1 */ + 0x03, 0x11, 0x01, /* ID=3, Subsampling 2x1, Quantization table: 1 */ + + 0xff, 0xda, /* SOS: Start Of Scan */ + 0x00, 0x0c, /* length = 12 bytes (including this length field) */ + 0x03, /* number of components: 3 */ + 0x01, 0x00, /* selector 1, table 0x00 */ + 0x02, 0x11, /* selector 2, table 0x11 */ + 0x03, 0x11, /* selector 3, table 0x11 */ + 0x00, 0x3f, /* Spectral selection: 0 .. 63 */ + 0x00 /* Successive approximation: 0 */ }; /* this function is run at interrupt level */