Trial settings in the table to select different quantization tables.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2266 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
@@ -10,27 +10,56 @@
|
||||
I need to figure out how to decode the image data by "hand"
|
||||
and then edit this header to fit
|
||||
*/
|
||||
|
||||
//* New table
|
||||
#define quantization_table1 \
|
||||
"\xFF\xDB\x00\x43\x00\x03\x02\x02" "\x03\x02\x02\x03\x03\x03\x03\x04" \
|
||||
"\x03\x03\x04\x05\x08\x05\x05\x04" "\x04\x05\x0A\x07\x07\x06\x08\x0C" \
|
||||
"\x0A\x0C\x0C\x0B\x0A\x0B\x0B\x0D" "\x0E\x12\x10\x0D\x0E\x11\x0E\x0B" \
|
||||
"\x0B\x10\x16\x10\x11\x13\x14\x15" "\x15\x15\x0C\x0F\x17\x18\x16\x14" \
|
||||
"\x18\x12\x14\x15\x14"
|
||||
//*/
|
||||
/* New table, but using a copy of quantization_table2 instead of 1
|
||||
#define quantization_table1 \
|
||||
"\xFF\xDB\x00\x43\x00\x03\x04\x04" "\x05\x04\x05\x09\x05\x05\x09\x14" \
|
||||
"\x0D\x0B\x0D\x14\x14\x14\x14\x14" "\x14\x14\x14\x14\x14\x14\x14\x14" \
|
||||
"\x14\x14\x14\x14\x14\x14\x14\x14" "\x14\x14\x14\x14\x14\x14\x14\x14" \
|
||||
"\x14\x14\x14\x14\x14\x14\x14\x14" "\x14\x14\x14\x14\x14\x14\x14\x14" \
|
||||
"\x14\x14\x14\x14\x14"
|
||||
*/
|
||||
|
||||
/* This is the old table that might be faulty
|
||||
#define quantization_table2 \
|
||||
"\xFF\xDB\x00\x43\x00\x01\x01\x01" "\x01\x01\x01\x01\x01\x01\x01\x01" \
|
||||
"\x01\x01\x01\x01\x01\x01\x01\x01" "\x01\x01\x01\x01\x01\x01\x01\x01" \
|
||||
"\x01\x01\x01\x01\x01\x01\x01\x01" "\x01\x01\x01\x01\x01\x01\x01\x01" \
|
||||
"\x01\x01\x01\x01\x01\x01\x01\x01" "\x01\x01\x01\x01\x01\x01\x01\x01" \
|
||||
"\x01\x01\x01\x01\x01",
|
||||
|
||||
"\x01\x01\x01\x01\x01"
|
||||
//*/
|
||||
///* New table
|
||||
#define quantization_table2 \
|
||||
"\xFF\xDB\x00\x43\x01\x03\x04\x04" "\x05\x04\x05\x09\x05\x05\x09\x14" \
|
||||
"\x0D\x0B\x0D\x14\x14\x14\x14\x14" "\x14\x14\x14\x14\x14\x14\x14\x14" \
|
||||
"\x14\x14\x14\x14\x14\x14\x14\x14" "\x14\x14\x14\x14\x14\x14\x14\x14" \
|
||||
"\x14\x14\x14\x14\x14\x14\x14\x14" "\x14\x14\x14\x14\x14\x14\x14\x14" \
|
||||
"\x14\x14\x14\x14\x14"
|
||||
//*/
|
||||
/* This is the old table that might be faulty
|
||||
#define quantization_table2 \
|
||||
"\xFF\xDB\x00\x43\x01\x01\x01\x01" "\x01\x01\x01\x01\x01\x01\x01\x01" \
|
||||
"\x01\x01\x01\x01\x01\x01\x01\x01" "\x01\x01\x01\x01\x01\x01\x01\x01" \
|
||||
"\x01\x01\x01\x01\x01\x01\x01\x01" "\x01\x01\x01\x01\x01\x01\x01\x01" \
|
||||
"\x01\x01\x01\x01\x01\x01\x01\x01" "\x01\x01\x01\x01\x01\x01\x01\x01" \
|
||||
"\x01\x01\x01\x01\x01",
|
||||
|
||||
"\x01\x01\x01\x01\x01"
|
||||
*/
|
||||
/* I am trying setting the SOFC0 so that component one uses quantization table 2
|
||||
* This seems to give it higher contrast that would be needed to understand the image.
|
||||
*/
|
||||
#define SOFCO_320x128 \
|
||||
"\xFF\xC0\x00\x11\x08\x00\x80\x01" "\x40\x03\x01\x11\x00\x02\x21\x01" \
|
||||
"\xFF\xC0\x00\x11\x08\x00\x80\x01" "\x40\x03\x01\x11\x01\x02\x21\x00" \
|
||||
"\x03\x11\x00"
|
||||
|
||||
#define SOFC0_640x248 \
|
||||
"\xFF\xC0\x00\x11\x08\x00\xf8\x02" "\x80\x03\x01\x11\x00\x02\x21\x01" \
|
||||
"\xFF\xC0\x00\x11\x08\x00\xf8\x02" "\x80\x03\x01\x11\x01\x02\x21\x01" \
|
||||
"\x03\x11\x00"
|
||||
|
||||
static struct {
|
||||
@@ -49,7 +78,7 @@ char *data;
|
||||
// 8 of the 128 is to get the pixels I think are for color correction
|
||||
// I have to wonder if the camera even makes actual 320x240 images
|
||||
{19, SOFCO_320x128},
|
||||
//Define Huffman Table 0x00
|
||||
//Define Huffman Table 0x00 (same in old and new)
|
||||
{33, "\xFF\xC4\x00\x1F\x00\x00\x01\x05" "\x01\x01\x01\x01\x01\x01\x00\x00"
|
||||
"\x00\x00\x00\x00\x00\x00\x01\x02" "\x03\x04\x05\x06\x07\x08\x09\x0A\x0B"},
|
||||
// Define Huffman Table 0x10
|
||||
@@ -67,7 +96,7 @@ char *data;
|
||||
"\xF4\xF5\xF6\xF7\xF8\xF9\xFA"},
|
||||
// Define Huffman Table 0x01
|
||||
{33, "\xFF\xC4\x00\x1F\x01\x00\x03\x01" "\x01\x01\x01\x01\x01\x01\x01\x01"
|
||||
"\x00\x00\x00\x00\x00\x00\x01\x02" "\x03\x04\x05\x06\x07\x08\x09\x0A" "\x0B"},
|
||||
"\x00\x00\x00\x00\x00\x00\x01\x02" "\x03\x04\x05\x06\x07\x08\x09\x0A\x0B"},
|
||||
// Define Huffman Table 0x11
|
||||
{183, "\xFF\xC4\x00\xB5\x11\x00\x02\x01" "\x02\x04\x04\x03\x04\x07\x05\x04"
|
||||
"\x04\x00\x01\x02\x77\x00\x01\x02" "\x03\x11\x04\x05\x21\x31\x06\x12"
|
||||
@@ -116,3 +145,6 @@ Start Of Scan: 3 components
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user