diff options
author | Marton Nemeth <nm127@freemail.hu> | 2009-10-04 12:58:19 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-12-05 15:40:27 -0500 |
commit | 56f6f5582f7f422f142035dd92b521e72ffdb348 (patch) | |
tree | 74224cb10bf445601bd6e876f6ce03f3c8521178 /drivers/media/video | |
parent | 4fc8b64823ef0c42213a89af6c4c13066f210981 (diff) |
V4L/DVB (13121): gspca - pac7311: add comment about JPEG header
Add comment about the meaning of the fixed JPEG header bytes used to
create each image.
Signed-off-by: Marton Nemeth <nm127@freemail.hu>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/gspca/pac7311.c | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/drivers/media/video/gspca/pac7311.c b/drivers/media/video/gspca/pac7311.c index b21c5e155f46..f954900c451b 100644 --- a/drivers/media/video/gspca/pac7311.c +++ b/drivers/media/video/gspca/pac7311.c | |||
@@ -801,13 +801,32 @@ static void do_autogain(struct gspca_dev *gspca_dev) | |||
801 | sd->autogain_ignore_frames = PAC_AUTOGAIN_IGNORE_FRAMES; | 801 | sd->autogain_ignore_frames = PAC_AUTOGAIN_IGNORE_FRAMES; |
802 | } | 802 | } |
803 | 803 | ||
804 | /* JPEG header, part 1 */ | ||
804 | static const unsigned char pac7311_jpeg_header1[] = { | 805 | static const unsigned char pac7311_jpeg_header1[] = { |
805 | 0xff, 0xd8, 0xff, 0xc0, 0x00, 0x11, 0x08 | 806 | 0xff, 0xd8, /* SOI: Start of Image */ |
807 | |||
808 | 0xff, 0xc0, /* SOF0: Start of Frame (Baseline DCT) */ | ||
809 | 0x00, 0x11, /* length = 17 bytes (including this length field) */ | ||
810 | 0x08 /* Precision: 8 */ | ||
811 | /* 2 bytes is placed here: number of image lines */ | ||
812 | /* 2 bytes is placed here: samples per line */ | ||
806 | }; | 813 | }; |
807 | 814 | ||
815 | /* JPEG header, continued */ | ||
808 | static const unsigned char pac7311_jpeg_header2[] = { | 816 | static const unsigned char pac7311_jpeg_header2[] = { |
809 | 0x03, 0x01, 0x21, 0x00, 0x02, 0x11, 0x01, 0x03, 0x11, 0x01, 0xff, 0xda, | 817 | 0x03, /* Number of image components: 3 */ |
810 | 0x00, 0x0c, 0x03, 0x01, 0x00, 0x02, 0x11, 0x03, 0x11, 0x00, 0x3f, 0x00 | 818 | 0x01, 0x21, 0x00, /* ID=1, Subsampling 1x1, Quantization table: 0 */ |
819 | 0x02, 0x11, 0x01, /* ID=2, Subsampling 2x1, Quantization table: 1 */ | ||
820 | 0x03, 0x11, 0x01, /* ID=3, Subsampling 2x1, Quantization table: 1 */ | ||
821 | |||
822 | 0xff, 0xda, /* SOS: Start Of Scan */ | ||
823 | 0x00, 0x0c, /* length = 12 bytes (including this length field) */ | ||
824 | 0x03, /* number of components: 3 */ | ||
825 | 0x01, 0x00, /* selector 1, table 0x00 */ | ||
826 | 0x02, 0x11, /* selector 2, table 0x11 */ | ||
827 | 0x03, 0x11, /* selector 3, table 0x11 */ | ||
828 | 0x00, 0x3f, /* Spectral selection: 0 .. 63 */ | ||
829 | 0x00 /* Successive approximation: 0 */ | ||
811 | }; | 830 | }; |
812 | 831 | ||
813 | /* this function is run at interrupt level */ | 832 | /* this function is run at interrupt level */ |